mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 21:20:51 +07:00
ALSA: usb-audio: Assume first control interface is for audio
For devices with more than one control interface, let's assume the first one contains the audio controls. Unfortunately, there is no field in any of the descriptors to tell us whether a control interface is for audio or MIDI controls, so a better check is not easy to implement. On a composite device with audio and MIDI functions, for example, the code currently overwrites chip->ctrl_intf, causing operations on the control interface to fail if they are issued after the device probe. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2bfc96a127
commit
7b6717e144
@ -465,6 +465,12 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
|
|||||||
goto __error;
|
goto __error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For devices with more than one control interface, we assume the
|
||||||
|
* first contains the audio controls. We might need a more specific
|
||||||
|
* check here in the future.
|
||||||
|
*/
|
||||||
|
if (!chip->ctrl_intf)
|
||||||
chip->ctrl_intf = alts;
|
chip->ctrl_intf = alts;
|
||||||
|
|
||||||
if (err > 0) {
|
if (err > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user