summaryrefslogtreecommitdiff
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorAi Chao <aichao@kylinos.cn>2022-11-10 09:34:52 +0300
committerTakashi Iwai <tiwai@suse.de>2022-11-10 09:50:30 +0300
commitbf990c10231937c0f51e5da5558e08cf5adc6a78 (patch)
tree7dfca9f68b266ed2ea53a53cc4c2f90efb2d2cdb /sound/usb/endpoint.c
parent79e28f2ab3440e08f5fbf65648b008341c37b496 (diff)
downloadlinux-bf990c10231937c0f51e5da5558e08cf5adc6a78.tar.xz
ALSA: usb-audio: add quirk to fix Hamedal C20 disconnect issue
For Hamedal C20, the current rate is different from the runtime rate, snd_usb_endpoint stop and close endpoint to resetting rate. if snd_usb_endpoint close the endpoint, sometimes usb will disconnect the device. Signed-off-by: Ai Chao <aichao@kylinos.cn> Link: https://lore.kernel.org/r/20221110063452.295110-1-aichao@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r--sound/usb/endpoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index d0b8d61d1d22..310cd6fb0038 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -931,7 +931,8 @@ void snd_usb_endpoint_close(struct snd_usb_audio *chip,
usb_audio_dbg(chip, "Closing EP 0x%x (count %d)\n",
ep->ep_num, ep->opened);
- if (!--ep->iface_ref->opened)
+ if (!--ep->iface_ref->opened &&
+ !(chip->quirk_flags & QUIRK_FLAG_IFACE_SKIP_CLOSE))
endpoint_set_interface(chip, ep, false);
if (!--ep->opened) {