diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-10-14 15:06:36 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-10-14 16:51:56 +0200 |
commit | b96681bd58276e1c7ca4ca37bbaab9f8f1738d61 (patch) | |
tree | 179f9e7e79dccf1f67b4c7711167304fc0cb2232 /sound/core | |
parent | ALSA: usb-audio: Drop superfluous error message after disconnection (diff) | |
download | linux-b96681bd58276e1c7ca4ca37bbaab9f8f1738d61.tar.xz linux-b96681bd58276e1c7ca4ca37bbaab9f8f1738d61.zip |
ALSA: usb-audio: Initialize every feature unit once at probe time
So far we used to read the current value of the mixer element
dynamically at the first access, and the error from a GET_CUR message
is treated as a fatal error (unless QUIRK_IGNORE_CTL_ERROR is set).
It's rather inconvenient, as most of GET_CUR errors are no fatal, and
we can continue operation with assumption of some fixed value.
This patch makes the USB-audio driver to change the behavior at probe
time; now it tries to initialize the current value of each mixer
element that is built from a feature unit (those for typically for
mixer volumes and switches). When a read failure happens, it tries to
set the known minimum value. After that point, a cached value is used
always, hence we won't hit GET_CUR message error any longer.
The error from GET_CUR message is still shown as a warning normally,
but only once at the probe time, and it'll keep operating. If the
message is confirmed to be harmless, it can be shut up by
QUIRK_IGNORE_CTL_ERROR quirk flag, too.
Tested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211014130636.17860-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
0 files changed, 0 insertions, 0 deletions