diff options
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index aca8d3193b95..0ec9248165bc 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -139,10 +139,36 @@ void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir, | |||
139 | unsigned int *tlv); | 139 | unsigned int *tlv); |
140 | struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, | 140 | struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, |
141 | const char *name); | 141 | const char *name); |
142 | int snd_hda_add_vmaster(struct hda_codec *codec, char *name, | 142 | int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, |
143 | unsigned int *tlv, const char * const *slaves); | 143 | unsigned int *tlv, const char * const *slaves, |
144 | const char *suffix, bool init_slave_vol, | ||
145 | struct snd_kcontrol **ctl_ret); | ||
146 | #define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix) \ | ||
147 | __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true, NULL) | ||
144 | int snd_hda_codec_reset(struct hda_codec *codec); | 148 | int snd_hda_codec_reset(struct hda_codec *codec); |
145 | 149 | ||
150 | enum { | ||
151 | HDA_VMUTE_OFF, | ||
152 | HDA_VMUTE_ON, | ||
153 | HDA_VMUTE_FOLLOW_MASTER, | ||
154 | }; | ||
155 | |||
156 | struct hda_vmaster_mute_hook { | ||
157 | /* below two fields must be filled by the caller of | ||
158 | * snd_hda_add_vmaster_hook() beforehand | ||
159 | */ | ||
160 | struct snd_kcontrol *sw_kctl; | ||
161 | void (*hook)(void *, int); | ||
162 | /* below are initialized automatically */ | ||
163 | unsigned int mute_mode; /* HDA_VMUTE_XXX */ | ||
164 | struct hda_codec *codec; | ||
165 | }; | ||
166 | |||
167 | int snd_hda_add_vmaster_hook(struct hda_codec *codec, | ||
168 | struct hda_vmaster_mute_hook *hook, | ||
169 | bool expose_enum_ctl); | ||
170 | void snd_hda_sync_vmaster_hook(struct hda_vmaster_mute_hook *hook); | ||
171 | |||
146 | /* amp value bits */ | 172 | /* amp value bits */ |
147 | #define HDA_AMP_MUTE 0x80 | 173 | #define HDA_AMP_MUTE 0x80 |
148 | #define HDA_AMP_UNMUTE 0x00 | 174 | #define HDA_AMP_UNMUTE 0x00 |