From: Takashi Iwai Date: Mon, 23 Nov 2020 08:53:23 +0000 (+0100) Subject: ALSA: usb-audio: Don't set altsetting before initializing sample rate X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c7f902015e1e86117e6cd3dde17d5964d88a9559;p=linux.git ALSA: usb-audio: Don't set altsetting before initializing sample rate Setting the active altsetting at changing sample rate seems unrecommended. The host should deselect the altsetting at first before that, then select it again. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-18-tiwai@suse.de Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 816fd3e5aada9..4501e042a9440 100644 --- a/sound/usb/stream.c +++ b/sound/usb/stream.c @@ -1223,9 +1223,10 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip, } /* try to set the interface... */ - usb_set_interface(chip->dev, iface_no, altno); + usb_set_interface(chip->dev, iface_no, 0); snd_usb_init_pitch(chip, iface_no, alts, fp); snd_usb_init_sample_rate(chip, iface_no, alts, fp, fp->rate_max); + usb_set_interface(chip->dev, iface_no, altno); } return 0; }