diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-16 20:24:02 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-16 20:24:02 +0400 |
commit | 5855fb8076e784a657bc2441cd29f166c7c1ea8c (patch) | |
tree | d62b5ca58523404db3a8c244f0a710ee5a1af17f /sound/pci/hda/patch_realtek.c | |
parent | 3b119f662d9054d734e3c74d662e7de6d7b35687 (diff) | |
download | linux-5855fb8076e784a657bc2441cd29f166c7c1ea8c.tar.xz |
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/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 13 |
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) { struct alc_spec *spec = codec->spec; hda_nid_t pin, dac; + int i; - pin = spec->autocfg.hp_pins[0]; - if (pin) { + for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) { + pin = spec->autocfg.hp_pins[i]; + if (!pin) + break; dac = spec->multiout.hp_nid; if (!dac) dac = spec->multiout.dac_nids[0]; /* to front */ alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); } - pin = spec->autocfg.speaker_pins[0]; - if (pin) { + for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) { + pin = spec->autocfg.speaker_pins[i]; + if (!pin) + break; dac = spec->multiout.extra_out_nid[0]; if (!dac) dac = spec->multiout.dac_nids[0]; /* to front */ |