summaryrefslogtreecommitdiffstats
path: root/sound/soc/ux500
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-09-10 12:51:55 +0200
committerTakashi Iwai <tiwai@suse.de>2021-09-13 15:00:31 +0200
commit7b9cf9036609428e845dc300aec13822ba2c4ab3 (patch)
tree2985c41791de5090080745743e530f5ad6bec7ce /sound/soc/ux500
parent6f44578430d7888ade1e3bd919c1c2c0724409e5 (diff)
downloadlinux-7b9cf9036609428e845dc300aec13822ba2c4ab3.tar.bz2
ALSA: usb-audio: Unify mixer resume and reset_resume procedure
USB-audio driver assumes that the normal resume would preserve the device configuration while reset_resume wouldn't, and tries to restore the mixer elements only at reset_resume callback. However, this seems too naive, and some devices do behave differently, resetting the volume at the normal resume; this resulted in the inconsistent volume that surprised users. This patch changes the mixer resume code to handle both the normal and reset resume in the same way, always restoring the original mixer element values. This allows us to unify the both callbacks as well as dropping the no longer used reset_resume field, which ends up with a good code reduction. A slight behavior change by this patch is that now we assign restore_mixer_value() as the default resume callback, and the function is no longer called at reset-resume when the resume callback is overridden by the quirk function. That is, if needed, the quirk resume function would have to handle similarly as restore_mixer_value() by itself. Reported-by: En-Shuo Hsu <enshuo@chromium.org> Cc: Yu-Hsuan Hsu <yuhsuan@chromium.org> Link: https://lore.kernel.org/r/CADDZ45UPsbpAAqP6=ZkTT8BE-yLii4Y7xSDnjK550G2DhQsMew@mail.gmail.com Link: https://lore.kernel.org/r/20210910105155.12862-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/ux500')
0 files changed, 0 insertions, 0 deletions