summaryrefslogtreecommitdiff
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-11-23 09:53:29 +0100
committerTakashi Iwai <tiwai@suse.de>2020-11-23 15:14:54 +0100
commit75c16b5147ee42270b18b5f32bc3f17f8b74b5eb (patch)
tree2e62f536d49b7249a7c4500916f28be129da391a /sound/usb/pcm.c
parent96e221f379e887f58d29969f10ed330ae1be4d80 (diff)
ALSA: usb-audio: Always set up the parameters after resume
The commit 92adc96f8eec ("ALSA: usb-audio: set the interface format after resume on Dell WD19") introduced the workaround for the broken setup after the resume specifically on a Dell dock model. However, the full setup should have been performed after the resume on all devices, as we can't guarantee the same state. So this patch removes the conditional check and applies the workaround always. Tested-by: Keith Milner <kamilner@superlative.org> Tested-by: Dylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-24-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 32237623de96..ac6385a4eb70 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1835,6 +1835,9 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea
subs);
subs->running = 1;
return 0;
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ subs->need_setup_fmt = true;
+ fallthrough;
case SNDRV_PCM_TRIGGER_STOP:
stop_endpoints(subs);
snd_usb_endpoint_set_callback(subs->data_endpoint,
@@ -1849,13 +1852,6 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea
subs);
subs->running = 0;
return 0;
- case SNDRV_PCM_TRIGGER_SUSPEND:
- if (subs->stream->chip->setup_fmt_after_resume_quirk) {
- stop_endpoints(subs);
- subs->need_setup_fmt = true;
- return 0;
- }
- break;
}
return -EINVAL;
@@ -1879,6 +1875,9 @@ static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream
subs);
subs->running = 1;
return 0;
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ subs->need_setup_fmt = true;
+ fallthrough;
case SNDRV_PCM_TRIGGER_STOP:
stop_endpoints(subs);
fallthrough;
@@ -1887,13 +1886,6 @@ static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream
NULL, NULL, NULL);
subs->running = 0;
return 0;
- case SNDRV_PCM_TRIGGER_SUSPEND:
- if (subs->stream->chip->setup_fmt_after_resume_quirk) {
- stop_endpoints(subs);
- subs->need_setup_fmt = true;
- return 0;
- }
- break;
}
return -EINVAL;