[PATCH 17/41] ALSA: usb-audio: Don't set altsetting before initializing sample rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <kamilner@xxxxxxxxxxxxxxx>
Tested-by: Dylan Robinson <dylan_robinson@xxxxxxxx>
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
 sound/usb/stream.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 816fd3e5aada..4501e042a944 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;
 }
-- 
2.16.4




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux