Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 765e8db0 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Takashi Iwai
Browse files

sound: usb-audio: do not make URBs longer than sync packet interval



Using more packets in one URB do avoid interrupts does not make sense
when we have a sync pipe whose packets generate interrupts more often.
Therefore, limit the URB size to the synchronization packet interval.

Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a65dd997
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1083,6 +1083,8 @@ static int init_substream_urbs(struct snd_usb_substream *subs, unsigned int peri
	} else
		urb_packs = 1;
	urb_packs *= packs_per_ms;
	if (subs->syncpipe)
		urb_packs = min(urb_packs, 1 << subs->syncinterval);

	/* decide how many packets to be used */
	if (is_playback) {