summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-08-23 15:16:22 +0200
committerTakashi Iwai <tiwai@suse.de>2011-08-23 15:16:22 +0200
commit8cd0775da2e884cf01f0649402dd725224b308bf (patch)
treec22010c350c69eed6b6aade401eb783784073b70 /sound/pci
parent5fa9b1511216282e27e048defae78c0f44c148d1 (diff)
ALSA: hda - Fix initialization of multi-speaker output paths for Realtek
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c3e5af955620..f79a6d1cf524 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3223,6 +3223,7 @@ static void alc_auto_init_multi_out(struct hda_codec *codec)
static void alc_auto_init_extra_out(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
+ int i;
hda_nid_t pin, dac;
pin = spec->autocfg.hp_pins[0];
@@ -3232,11 +3233,17 @@ static void alc_auto_init_extra_out(struct hda_codec *codec)
dac = spec->multiout.dac_nids[0];
alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
}
- pin = spec->autocfg.speaker_pins[0];
- if (pin) {
- dac = spec->multiout.extra_out_nid[0];
- if (!dac)
- dac = spec->multiout.dac_nids[0];
+ for (i = 0; i < spec->autocfg.speaker_outs; i++) {
+ pin = spec->autocfg.speaker_pins[i];
+ if (!pin)
+ break;
+ dac = spec->multiout.extra_out_nid[i];
+ if (!dac) {
+ if (i > 0 && spec->multiout.extra_out_nid[0])
+ dac = spec->multiout.extra_out_nid[0];
+ else
+ dac = spec->multiout.dac_nids[0];
+ }
alc_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
}
}