From d77668602b1027cec8e3c5f97205301ea9d1cda5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 16 Sep 2010 18:24:02 +0200 Subject: [PATCH] --- yaml --- r: 216692 b: refs/heads/master c: 5855fb8076e784a657bc2441cd29f166c7c1ea8c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_realtek.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 2c69b45812be..e3b518131e58 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3b119f662d9054d734e3c74d662e7de6d7b35687 +refs/heads/master: 5855fb8076e784a657bc2441cd29f166c7c1ea8c diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index ab2947d87232..945826da23b6 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/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 */