aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2011-03-04 10:54:52 -0500
committerTakashi Iwai <tiwai@suse.de>2011-03-10 11:35:53 -0500
commit0a3fabe30e1a3b2037a12b863b8c45fffce38ee9 (patch)
tree0ca3b3d4bd66d8d885af4657a45f880df7b52708
parent7e59e097c09b82760bb0fe08b0fa2b704d76c3f4 (diff)
ALSA: HDA: Realtek ALC88x: Do not over-initialize speakers and hp that are primary outputs
Do not initialize again the what has already been initialized as multi outs, as this breaks surround speakers. Tested-by: Bartłomiej Żogała <nusch88@gmail.com> Cc: <stable@kernel.org> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 24bbc47dcea2..d403ee825ef6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10773,23 +10773,28 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
10773 hda_nid_t pin, dac; 10773 hda_nid_t pin, dac;
10774 int i; 10774 int i;
10775 10775
10776 for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) { 10776 if (spec->autocfg.line_out_type != AUTO_PIN_HP_OUT) {
10777 pin = spec->autocfg.hp_pins[i]; 10777 for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
10778 if (!pin) 10778 pin = spec->autocfg.hp_pins[i];
10779 break; 10779 if (!pin)
10780 dac = spec->multiout.hp_nid; 10780 break;
10781 if (!dac) 10781 dac = spec->multiout.hp_nid;
10782 dac = spec->multiout.dac_nids[0]; /* to front */ 10782 if (!dac)
10783 alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); 10783 dac = spec->multiout.dac_nids[0]; /* to front */
10784 alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
10785 }
10784 } 10786 }
10785 for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) { 10787
10786 pin = spec->autocfg.speaker_pins[i]; 10788 if (spec->autocfg.line_out_type != AUTO_PIN_SPEAKER_OUT) {
10787 if (!pin) 10789 for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
10788 break; 10790 pin = spec->autocfg.speaker_pins[i];
10789 dac = spec->multiout.extra_out_nid[0]; 10791 if (!pin)
10790 if (!dac) 10792 break;
10791 dac = spec->multiout.dac_nids[0]; /* to front */ 10793 dac = spec->multiout.extra_out_nid[0];
10792 alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac); 10794 if (!dac)
10795 dac = spec->multiout.dac_nids[0]; /* to front */
10796 alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
10797 }
10793 } 10798 }
10794} 10799}
10795 10800