OSDN Git Service

ALSA: hda/conexant: Use the new vmaster mute LED helper
authorTakashi Iwai <tiwai@suse.de>
Thu, 18 Jun 2020 11:08:39 +0000 (13:08 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 18 Jun 2020 11:23:58 +0000 (13:23 +0200)
commit929f718cb3901ad50f4bc9ddbca73b03345cca48
treeaa79d62890f70c1376f91cf6251a40fc5702bf99
parent8d3d1ece311837591341544e458b2dd9628fe6e0
ALSA: hda/conexant: Use the new vmaster mute LED helper

Convert the mute LED handling in Conexant codec to the new vmaster
mute helper.  A point to be cautiously handled is that the value
passed to the callback is inverted; the vmaster passes "enabled"
(0 = mute), while LED classdev passes "brightness" (1 = mute).

Also the assignment of the default vmaster hook is moved at a later
point after the mute hook is set up.  This assures no nested hook.

Finally, since we enable the mute-LED kcontrols always in the helper
side, the extra vmaster_mute_enum flag set up is dropped.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_conexant.c