diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-09 17:51:10 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-09 17:55:30 +0100 |
commit | 18478e8b626edc2d181dcb1b93e1f99ad72095e9 (patch) | |
tree | 572587c5e3ce39669e4dff26b165e93ba3181946 /sound/pci/hda/hda_local.h | |
parent | 785f857d1cb0856b612b46a0545b74aa2596e44a (diff) | |
download | blackbird-op-linux-18478e8b626edc2d181dcb1b93e1f99ad72095e9.tar.gz blackbird-op-linux-18478e8b626edc2d181dcb1b93e1f99ad72095e9.zip |
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.h | 6 |
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, unsigned int *tlv); struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, const char *name); -int snd_hda_add_vmaster(struct hda_codec *codec, char *name, +int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, unsigned int *tlv, const char * const *slaves, - const char *suffix); + const char *suffix, bool init_slave_vol); +#define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix) \ + __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true) int snd_hda_codec_reset(struct hda_codec *codec); /* amp value bits */ |