summaryrefslogtreecommitdiff
path: root/sound/usb/card.h
diff options
context:
space:
mode:
authorHui Wang <hui.wang@canonical.com>2019-12-18 16:26:50 +0300
committerTakashi Iwai <tiwai@suse.de>2019-12-18 22:04:37 +0300
commit92adc96f8eecd9522a907c197cc3d62e405539fe (patch)
treef5521e07eee4b8dfe8a1c5d8a2aa8c19ee169ce0 /sound/usb/card.h
parent7c497d799267134786afdf719d9230b7d6f77d84 (diff)
downloadlinux-92adc96f8eecd9522a907c197cc3d62e405539fe.tar.xz
ALSA: usb-audio: set the interface format after resume on Dell WD19
Recently we found the headset-mic on the Dell Dock WD19 doesn't work anymore after s3 (s2i or deep), this problem could be workarounded by closing (pcm_close) the app and then reopening (pcm_open) the app, so this bug is not easy to be detected by users. When problem happens, retire_capture_urb() could still be called periodically, but the size of captured data is always 0, it could be a firmware bug on the dock. Anyway I found after resuming, the snd_usb_pcm_prepare() will be called, and if we forcibly run set_format() to set the interface and its endpoint, the capture size will be normal again. This problem and workaound also apply to playback. To fix it in the kernel, add a quirk to let set_format() run forcibly once after resume. Signed-off-by: Hui Wang <hui.wang@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191218132650.6303-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r--sound/usb/card.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 2991b9986f66..395403a2d33f 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -145,6 +145,7 @@ struct snd_usb_substream {
struct snd_usb_endpoint *sync_endpoint;
unsigned long flags;
bool need_setup_ep; /* (re)configure EP at prepare? */
+ bool need_setup_fmt; /* (re)configure fmt after resume? */
unsigned int speed; /* USB_SPEED_XXX */
u64 formats; /* format bitmasks (all or'ed) */