diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-08-25 10:14:35 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-08-25 10:14:35 -0400 |
commit | 0d884cb936e8e36c47bc7ee86eb6750261bd5438 (patch) | |
tree | 06630baa41e781791989cc478dfe5b6f644e0df7 /sound | |
parent | a4fcd491098603356e7600b021bdb6acbb53adb4 (diff) |
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, | |||
17018 | if (err < 0) | 17018 | if (err < 0) |
17019 | return err; | 17019 | return err; |
17020 | } else { | 17020 | } else { |
17021 | sprintf(name, "%s Playback Volume", chname[i]); | 17021 | const char *pfx; |
17022 | if (cfg->line_outs == 1 && | ||
17023 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) { | ||
17024 | if (!cfg->hp_pins) | ||
17025 | pfx = "Speaker"; | ||
17026 | else | ||
17027 | pfx = "PCM"; | ||
17028 | } else | ||
17029 | pfx = chname[i]; | ||
17030 | sprintf(name, "%s Playback Volume", pfx); | ||
17022 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, | 17031 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, |
17023 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, | 17032 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, |
17024 | HDA_OUTPUT)); | 17033 | HDA_OUTPUT)); |
17025 | if (err < 0) | 17034 | if (err < 0) |
17026 | return err; | 17035 | return err; |
17027 | sprintf(name, "%s Playback Switch", chname[i]); | 17036 | if (cfg->line_outs == 1 && |
17037 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) | ||
17038 | pfx = "Speaker"; | ||
17039 | sprintf(name, "%s Playback Switch", pfx); | ||
17028 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, | 17040 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, |
17029 | HDA_COMPOSE_AMP_VAL(alc880_idx_to_mixer(i), | 17041 | HDA_COMPOSE_AMP_VAL(alc880_idx_to_mixer(i), |
17030 | 3, 0, HDA_INPUT)); | 17042 | 3, 0, HDA_INPUT)); |