Commit 15548cc5 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] use cached idVendor/idProduct values

USB generic driver
use the vendor/product IDs in the state structure instead of
reading them again from the device
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
parent bdd8a80b
...@@ -1519,7 +1519,7 @@ int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif) ...@@ -1519,7 +1519,7 @@ int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif)
/* check the mapping table */ /* check the mapping table */
for (map = usbmix_ctl_maps; map->vendor; map++) { for (map = usbmix_ctl_maps; map->vendor; map++) {
if (map->vendor == le16_to_cpu(dev->idVendor) && map->product == le16_to_cpu(dev->idProduct)) { if (map->vendor == state.vendor && map->product == state.product) {
state.map = map->map; state.map = map->map;
chip->ignore_ctl_error = map->ignore_ctl_error; chip->ignore_ctl_error = map->ignore_ctl_error;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment