summaryrefslogtreecommitdiff
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-11-23 09:53:21 +0100
committerTakashi Iwai <tiwai@suse.de>2020-11-23 15:13:37 +0100
commit982150560c7c1310d8826abf73857b76000e7db8 (patch)
tree315865539896ee8189c8d7d7dcf181beac8f509d /sound/usb/pcm.c
parent54cb31901b831befb4f9347dd002dcc8ff2cc263 (diff)
ALSA: usb-audio: Drop keep_interface flag again
This behavior turned out to be invalid from the USB spec POV and shouldn't be applied. As it's an optional flag that is set only via an card control element that must be hardly used, let's drop it again. Tested-by: Keith Milner <kamilner@superlative.org> Tested-by: Dylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-16-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 03b1a02bcff4..392aa1cba61c 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -648,14 +648,12 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
/* close the old interface */
if (subs->interface >= 0 && (subs->interface != fmt->iface || subs->need_setup_fmt)) {
- if (!subs->stream->chip->keep_iface) {
- err = usb_set_interface(subs->dev, subs->interface, 0);
- if (err < 0) {
- dev_err(&dev->dev,
- "%d:%d: return to setting 0 failed (%d)\n",
- fmt->iface, fmt->altsetting, err);
- return -EIO;
- }
+ err = usb_set_interface(subs->dev, subs->interface, 0);
+ if (err < 0) {
+ dev_err(&dev->dev,
+ "%d:%d: return to setting 0 failed (%d)\n",
+ fmt->iface, fmt->altsetting, err);
+ return -EIO;
}
subs->interface = -1;
subs->altset_idx = 0;
@@ -1483,8 +1481,7 @@ static int snd_usb_pcm_close(struct snd_pcm_substream *substream)
snd_media_stop_pipeline(subs);
- if (!as->chip->keep_iface &&
- subs->interface >= 0 &&
+ if (subs->interface >= 0 &&
!snd_usb_lock_shutdown(subs->stream->chip)) {
usb_set_interface(subs->dev, subs->interface, 0);
subs->interface = -1;