aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-03-09 11:51:10 -0500
committerTakashi Iwai <tiwai@suse.de>2012-03-09 11:55:30 -0500
commit18478e8b626edc2d181dcb1b93e1f99ad72095e9 (patch)
tree572587c5e3ce39669e4dff26b165e93ba3181946 /sound/pci/hda/hda_local.h
parent785f857d1cb0856b612b46a0545b74aa2596e44a (diff)
ALSA: hda - Initialize vmaster slave volumes
When the driver is changed to use vmaster or a new slave element is added by the improvement of the parser code, user may face often the silent output because of the muted slave mixer although Master volume is properly set. And they complain. And I get upset. Although such a mixer element should be initialized via "alsactl init", it'd be more user-friendly if the known output slaves are unmuted and set to 0dB so that user can control the volume only with Master as default. Since Master is still set muted as default even with this change, no risk of the speaker blow up, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r--sound/pci/hda/hda_local.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 6094dea82bc3..caa64686267b 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -139,9 +139,11 @@ void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir,
139 unsigned int *tlv); 139 unsigned int *tlv);
140struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, 140struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
141 const char *name); 141 const char *name);
142int snd_hda_add_vmaster(struct hda_codec *codec, char *name, 142int __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); 144 const char *suffix, bool init_slave_vol);
145#define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix) \
146 __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true)
145int snd_hda_codec_reset(struct hda_codec *codec); 147int snd_hda_codec_reset(struct hda_codec *codec);
146 148
147/* amp value bits */ 149/* amp value bits */