Skip to content

Commit 695cf5a

Browse files
puleglottiwai
authored andcommitted
ALSA: usb-audio: Fix packet size calculation
Commit f0bd62b ("ALSA: usb-audio: Improve frames size computation") introduced a regression for devices which have playback endpoints with bInterval > 1. Fix this by taking ep->datainterval into account. Note that frame and fps are actually mean packet and packets per second in the code introduces by the mentioned commit. This will be fixed in a follow-up patch. Fixes: f0bd62b ("ALSA: usb-audio: Improve frames size computation") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208353 Signed-off-by: Alexander Tsoy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 6a6ca78 commit 695cf5a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sound/usb/endpoint.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
10931093
ep->freqn = get_usb_high_speed_rate(rate);
10941094
ep->fps = 8000;
10951095
}
1096+
ep->fps >>= ep->datainterval;
10961097

10971098
ep->sample_rem = rate % ep->fps;
10981099
ep->framesize[0] = rate / ep->fps;

0 commit comments

Comments
 (0)