diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-08-25 16:14:35 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-08-25 16:14:35 +0200 |
commit | 0d884cb936e8e36c47bc7ee86eb6750261bd5438 (patch) | |
tree | 06630baa41e781791989cc478dfe5b6f644e0df7 /sound | |
parent | a4fcd491098603356e7600b021bdb6acbb53adb4 (diff) | |
download | blackbird-op-linux-0d884cb936e8e36c47bc7ee86eb6750261bd5438.tar.gz blackbird-op-linux-0d884cb936e8e36c47bc7ee86eb6750261bd5438.zip |
ALSA: hda - Improve auto-cfg mixer name for ALC662
The last patch in this series is for ALC662; pretty similar as the
previous patch for ALC861-VD.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 206fcb930a65..ce098b20cdfb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -17018,13 +17018,25 @@ static int alc662_auto_create_multi_out_ctls(struct alc_spec *spec, if (err < 0) return err; } else { - sprintf(name, "%s Playback Volume", chname[i]); + const char *pfx; + if (cfg->line_outs == 1 && + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) { + if (!cfg->hp_pins) + pfx = "Speaker"; + else + pfx = "PCM"; + } else + pfx = chname[i]; + sprintf(name, "%s Playback Volume", pfx); err = add_control(spec, ALC_CTL_WIDGET_VOL, name, HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT)); if (err < 0) return err; - sprintf(name, "%s Playback Switch", chname[i]); + if (cfg->line_outs == 1 && + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) + pfx = "Speaker"; + sprintf(name, "%s Playback Switch", pfx); err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, HDA_COMPOSE_AMP_VAL(alc880_idx_to_mixer(i), 3, 0, HDA_INPUT)); |