aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-08-25 10:12:15 -0400
committerTakashi Iwai <tiwai@suse.de>2009-08-25 10:12:15 -0400
commita4fcd491098603356e7600b021bdb6acbb53adb4 (patch)
tree69ed1adf5b627a52177240dda3f0455f54b4ae04 /sound
parentc3fc1f502a1f1a751c891d3b757a24dc76943539 (diff)
ALSA: hda - Improve auto-cfg mixer name for ALC861-VD
One more patch to give a better name for the primary output controls, this time for ALC861-VD codec. The change is simple, just checking the pin connection whether it's a speaker-out. When both speaker and HP are assigned, we name the volume as "PCM" as this influences on both outputs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 407475941fd3..206fcb930a65 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -15233,13 +15233,25 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec,
15233 if (err < 0) 15233 if (err < 0)
15234 return err; 15234 return err;
15235 } else { 15235 } else {
15236 sprintf(name, "%s Playback Volume", chname[i]); 15236 const char *pfx;
15237 if (cfg->line_outs == 1 &&
15238 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) {
15239 if (!cfg->hp_pins)
15240 pfx = "Speaker";
15241 else
15242 pfx = "PCM";
15243 } else
15244 pfx = chname[i];
15245 sprintf(name, "%s Playback Volume", pfx);
15237 err = add_control(spec, ALC_CTL_WIDGET_VOL, name, 15246 err = add_control(spec, ALC_CTL_WIDGET_VOL, name,
15238 HDA_COMPOSE_AMP_VAL(nid_v, 3, 0, 15247 HDA_COMPOSE_AMP_VAL(nid_v, 3, 0,
15239 HDA_OUTPUT)); 15248 HDA_OUTPUT));
15240 if (err < 0) 15249 if (err < 0)
15241 return err; 15250 return err;
15242 sprintf(name, "%s Playback Switch", chname[i]); 15251 if (cfg->line_outs == 1 &&
15252 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
15253 pfx = "Speaker";
15254 sprintf(name, "%s Playback Switch", pfx);
15243 err = add_control(spec, ALC_CTL_BIND_MUTE, name, 15255 err = add_control(spec, ALC_CTL_BIND_MUTE, name,
15244 HDA_COMPOSE_AMP_VAL(nid_s, 3, 2, 15256 HDA_COMPOSE_AMP_VAL(nid_s, 3, 2,
15245 HDA_INPUT)); 15257 HDA_INPUT));