summaryrefslogtreecommitdiffstats
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-20 09:41:33 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-20 09:41:33 +0200
commit22fe2b36493f195b3f705043877f6c1456f1fd90 (patch)
tree58634858f4c9a707d06b80ad54cb7b5285675c68 /sound/usb/pcm.c
parent235a6d80f021d9c3bb5652fb6b19d092a7339248 (diff)
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e (diff)
downloadlinux-22fe2b36493f195b3f705043877f6c1456f1fd90.tar.bz2
Merge v5.19-rc3 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index b470404a5376..e692ae04436a 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -291,6 +291,9 @@ int snd_usb_audioformat_set_sync_ep(struct snd_usb_audio *chip,
bool is_playback;
int err;
+ if (fmt->sync_ep)
+ return 0; /* already set up */
+
alts = snd_usb_get_host_interface(chip, fmt->iface, fmt->altsetting);
if (!alts)
return 0;
@@ -304,7 +307,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);