Skip to content
/ linux Public

Commit 3a74f6b

Browse files
tiwaiSasha Levin
authored andcommitted
ALSA: usb-audio: Update the number of packets properly at receiving
[ Upstream commit cf044e4 ] At receiving the packets from the implicit feedback source, we didn't update ctx->packets field but only the ctx->packet_size[] data. In exceptional cases, this might lead to unexpectedly superfluous data transfer (although this won't happen usually due to the nature of USB isochronous transfer). Fix it to update the field properly. Link: https://patch.msgid.link/20260216141209.1849200-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 889ba93 commit 3a74f6b

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
@@ -489,6 +489,7 @@ int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
489489

490490
/* copy over the length information */
491491
if (implicit_fb) {
492+
ctx->packets = packet->packets;
492493
for (i = 0; i < packet->packets; i++)
493494
ctx->packet_size[i] = packet->packet_size[i];
494495
}

0 commit comments

Comments
 (0)