ALSA: usb-audio: fix detection of vendor-specific device protocol settings
The Audio Class v2 support code in 2.6.35 added checks for the bInterfaceProtocol field. However, there are devices (usually those detected by vendor-specific quirks) that do not have one of the predefined values in this field, which made the driver reject them. To fix this regression, restore the old behaviour, i.e., assume that a device with an unknown bInterfaceProtocol field (other than UAC_VERSION_2) has more or less UAC-v1-compatible descriptors. [compile warning fixes by tiwai] Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Daniel Mack <daniel@caiaq.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
committed by
Takashi Iwai
parent
7b6717e144
commit
a2acad8298
@ -295,12 +295,11 @@ int snd_usb_init_sample_rate(struct snd_usb_audio *chip, int iface,
|
||||
|
||||
switch (altsd->bInterfaceProtocol) {
|
||||
case UAC_VERSION_1:
|
||||
default:
|
||||
return set_sample_rate_v1(chip, iface, alts, fmt, rate);
|
||||
|
||||
case UAC_VERSION_2:
|
||||
return set_sample_rate_v2(chip, iface, alts, fmt, rate);
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user