summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-08-25 16:05:03 +0200
committerTakashi Iwai <tiwai@suse.de>2009-08-25 16:05:03 +0200
commitcb162b6bf2f445d67a45f5485d4ce32addaf8fe0 (patch)
tree477f5bb9c11846fd7c16beeaf65784d688781203 /sound/pci
parent05f5f477082f0b192dab5ac25ccc5d468d98ecbd (diff)
downloadop-kernel-dev-cb162b6bf2f445d67a45f5485d4ce32addaf8fe0.zip
op-kernel-dev-cb162b6bf2f445d67a45f5485d4ce32addaf8fe0.tar.gz
ALSA: hda - Improve auto-cfg mixer name for ALC880
When there is only one DAC is used for ALC880, try to assign a better name, either Speaker or Front, depending on the output pin type. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3c8773a..07fbf7d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4398,13 +4398,19 @@ static int alc880_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)
+ pfx = "Speaker";
+ 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]);
+ sprintf(name, "%s Playback Switch", pfx);
err = add_control(spec, ALC_CTL_BIND_MUTE, name,
HDA_COMPOSE_AMP_VAL(nid, 3, 2,
HDA_INPUT));
OpenPOWER on IntegriCloud