summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-12-18 17:33:04 +0100
committerTakashi Iwai <tiwai@suse.de>2013-01-12 08:30:36 +0100
commit52a8efab10637ae5f58123be3ab3b9cb6a9ff2b0 (patch)
tree1bb59fbd765bbee1f328956e657e3217acf88abc /sound
parent3bd7b644d049feb8df4225492689a324963f42f4 (diff)
ALSA: hda/realtek - Assign Master mixer when possible
There are a few more cases where we can assign "Master" mixer element safely, e.g. when a single DAC is used in the whole output paths. Also, when vmaster hook is present, avoid "Master" but assign "PCM" instead. Otherwise vmaster hook won't work properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a3046144f149..f21c53d437db 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2306,7 +2306,14 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch,
*index = 0;
if (cfg->line_outs == 1 && !spec->multi_ios &&
!cfg->hp_outs && !cfg->speaker_outs && can_be_master)
- return "Master";
+ return spec->vmaster_mute.hook ? "PCM" : "Master";
+
+ /* if there is really a single DAC used in the whole output paths,
+ * use it master (or "PCM" if a vmaster hook is present)
+ */
+ if (spec->multiout.num_dacs == 1 && !spec->mixer_nid &&
+ !spec->multiout.hp_out_nid[0] && !spec->multiout.extra_out_nid[0])
+ return spec->vmaster_mute.hook ? "PCM" : "Master";
switch (cfg->line_out_type) {
case AUTO_PIN_SPEAKER_OUT: