diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-29 09:44:01 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-08-02 09:06:05 +0200 |
commit | 3c69dc9134130deb9682279374d9d97de52b0731 (patch) | |
tree | 7c0c654b680fd82189a0879f6e4d254278872f5d /sound/usb/mixer.c | |
parent | 44e6fc64dfebf48811219a9c24666b4b87dc0ec5 (diff) | |
download | linux-3c69dc9134130deb9682279374d9d97de52b0731.tar.gz linux-3c69dc9134130deb9682279374d9d97de52b0731.tar.bz2 linux-3c69dc9134130deb9682279374d9d97de52b0731.zip |
ALSA: usb-audio: Move ignore_ctl_error check into quirk_flags
The mixer code has a flag ignore_ctl_error for ignoring the errors
returned from the device wrt mixer accesses, and this is set from the
entries in mixer_maps.c, as well as ignore_ctl_error module option.
Those can be well integrated into the new quirk_flags field, too.
Link: https://lore.kernel.org/r/20210729074404.19728-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 9b713b4a5ec4..db7cb6b6dc4e 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -3183,7 +3183,6 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer) state.map = map->map; state.selector_map = map->selector_map; mixer->connector_map = map->connector_map; - mixer->ignore_ctl_error |= map->ignore_ctl_error; break; } } @@ -3508,8 +3507,7 @@ static int snd_usb_mixer_status_create(struct usb_mixer_interface *mixer) return 0; } -int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, - int ignore_error) +int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif) { static const struct snd_device_ops dev_ops = { .dev_free = snd_usb_mixer_dev_free @@ -3523,7 +3521,7 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, if (!mixer) return -ENOMEM; mixer->chip = chip; - mixer->ignore_ctl_error = ignore_error; + mixer->ignore_ctl_error = !!(chip->quirk_flags & QUIRK_FLAG_IGNORE_CTL_ERROR); mixer->id_elems = kcalloc(MAX_ID_ELEMS, sizeof(*mixer->id_elems), GFP_KERNEL); if (!mixer->id_elems) { |