ALSA: usb-audio: Drop superfluous interface setup at parsing
authorTakashi Iwai <tiwai@suse.de>
Wed, 31 Aug 2022 13:00:21 +0000 (15:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 1 Sep 2022 08:23:44 +0000 (10:23 +0200)
We reset each interface that is being parsed for each stream, but this
is superfluous and even can lead to spurious errors.  Since the
interface is set up properly at opening the endpoint for each actual
stream operation, let's drop the superfluous one.

Link: https://lore.kernel.org/r/20220831130021.4762-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/stream.c

index ceb93d798182cfba087848a86609dd23bfbd7ce9..99578e9a8af0718a1c91c4e3e0e605ec053d1440 100644 (file)
@@ -1221,12 +1221,6 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
                        if (err < 0)
                                return err;
                }
-
-               /* try to set the interface... */
-               usb_set_interface(chip->dev, iface_no, 0);
-               snd_usb_init_pitch(chip, fp);
-               snd_usb_init_sample_rate(chip, fp, fp->rate_max);
-               usb_set_interface(chip->dev, iface_no, altno);
        }
        return 0;
 }