summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-06-06 18:09:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-14 18:36:24 +0200
commit2ee0b454fda766bfb6a40cd52765aa5414eafe06 (patch)
treee26faa5ae57e0300568faaa050675584f811d77b /sound/usb
parent8fe1ee5818461652a8abef700cca60e6775dde44 (diff)
downloadlinux-stable-2ee0b454fda766bfb6a40cd52765aa5414eafe06.tar.gz
linux-stable-2ee0b454fda766bfb6a40cd52765aa5414eafe06.tar.bz2
linux-stable-2ee0b454fda766bfb6a40cd52765aa5414eafe06.zip
ALSA: usb-audio: Skip generic sync EP parse for secondary EP
commit efb75df105e82f076a85b9f2d81410428bcb55fc upstream. When ep_idx is already non-zero, it means usually a capture stream that is set up explicity by a fixed-format quirk, and applying the check for generic (non-implicit-fb) sync EPs might hit incorrectly, resulting in a bogus sync endpoint for the capture stream. This patch adds a check for the ep_idx and skip if it's a secondary endpoint. It's a part of the fixes for regressions on Saffire 6. Fixes: 7b0efea4baf0 ("ALSA: usb-audio: Add missing ep_idx in fixed EP quirks") Reported-and-tested-by: André Kapelrud <a.kapelrud@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220606160910.6926-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 9e65a42cc9b7..00c1f2960ab7 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -304,7 +304,7 @@ int snd_usb_audioformat_set_sync_ep(struct snd_usb_audio *chip,
* Generic sync EP handling
*/
- if (altsd->bNumEndpoints < 2)
+ if (fmt->ep_idx > 0 || altsd->bNumEndpoints < 2)
return 0;
is_playback = !(get_endpoint(alts, 0)->bEndpointAddress & USB_DIR_IN);