aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-16 12:24:02 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-16 12:24:02 -0400
commit5855fb8076e784a657bc2441cd29f166c7c1ea8c (patch)
treed62b5ca58523404db3a8c244f0a710ee5a1af17f /sound/pci
parent3b119f662d9054d734e3c74d662e7de6d7b35687 (diff)
ALSA: hda - Fix initialization of secondary headphone and speaker
The secondary or later headphones or speakers aren't initialized preoprly for some codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ab2947d87232..945826da23b6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10634,16 +10634,21 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
10634{ 10634{
10635 struct alc_spec *spec = codec->spec; 10635 struct alc_spec *spec = codec->spec;
10636 hda_nid_t pin, dac; 10636 hda_nid_t pin, dac;
10637 int i;
10637 10638
10638 pin = spec->autocfg.hp_pins[0]; 10639 for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
10639 if (pin) { 10640 pin = spec->autocfg.hp_pins[i];
10641 if (!pin)
10642 break;
10640 dac = spec->multiout.hp_nid; 10643 dac = spec->multiout.hp_nid;
10641 if (!dac) 10644 if (!dac)
10642 dac = spec->multiout.dac_nids[0]; /* to front */ 10645 dac = spec->multiout.dac_nids[0]; /* to front */
10643 alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); 10646 alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
10644 } 10647 }
10645 pin = spec->autocfg.speaker_pins[0]; 10648 for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
10646 if (pin) { 10649 pin = spec->autocfg.speaker_pins[i];
10650 if (!pin)
10651 break;
10647 dac = spec->multiout.extra_out_nid[0]; 10652 dac = spec->multiout.extra_out_nid[0];
10648 if (!dac) 10653 if (!dac)
10649 dac = spec->multiout.dac_nids[0]; /* to front */ 10654 dac = spec->multiout.dac_nids[0]; /* to front */