diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-13 07:55:10 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-13 07:55:10 +0100 |
commit | f29735cbef4eb6072e5ae459b556f3a061efc47e (patch) | |
tree | 0ba2bdd1da5f21b41d5dfc0f0d952dc07e26dfdf /sound/pci/hda/hda_codec.c | |
parent | d2f344b5e0a933b5b1d12f863406ee1d63e5bf8e (diff) |
ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()
Since it's not always safe to assume that the vmaster hook is purely the
mute-LED control, add the flag indicating whether to expose the mute-LED
enum control or not. Currently, conexant codec sets this off for non-HP
laptops where EAPD may be used really as EAPD.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index b981ea9c644c..7a8fcc4c15f8 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2508,7 +2508,8 @@ static struct snd_kcontrol_new vmaster_mute_mode = { * the given hook. */ int snd_hda_add_vmaster_hook(struct hda_codec *codec, - struct hda_vmaster_mute_hook *hook) + struct hda_vmaster_mute_hook *hook, + bool expose_enum_ctl) { struct snd_kcontrol *kctl; @@ -2517,6 +2518,8 @@ int snd_hda_add_vmaster_hook(struct hda_codec *codec, snd_ctl_add_vmaster_hook(hook->sw_kctl, hook->hook, codec); hook->codec = codec; hook->mute_mode = HDA_VMUTE_FOLLOW_MASTER; + if (!expose_enum_ctl) + return 0; kctl = snd_ctl_new1(&vmaster_mute_mode, hook); if (!kctl) return -ENOMEM; |