]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
fe11e4e99023ac8daceea20f597d23c08f4fdfc5
[thirdparty/kernel/stable-queue.git] /
1 From 0a3fabe30e1a3b2037a12b863b8c45fffce38ee9 Mon Sep 17 00:00:00 2001
2 From: David Henningsson <david.henningsson@canonical.com>
3 Date: Fri, 4 Mar 2011 16:54:52 +0100
4 Subject: ALSA: HDA: Realtek ALC88x: Do not over-initialize speakers and hp that are primary outputs
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: David Henningsson <david.henningsson@canonical.com>
10
11 commit 0a3fabe30e1a3b2037a12b863b8c45fffce38ee9 upstream.
12
13 Do not initialize again the what has already been initialized as
14 multi outs, as this breaks surround speakers.
15
16 Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
17 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
18 Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20
21 ---
22 sound/pci/hda/patch_realtek.c | 37 +++++++++++++++++++++----------------
23 1 file changed, 21 insertions(+), 16 deletions(-)
24
25 --- a/sound/pci/hda/patch_realtek.c
26 +++ b/sound/pci/hda/patch_realtek.c
27 @@ -10736,23 +10736,28 @@ static void alc882_auto_init_hp_out(stru
28 hda_nid_t pin, dac;
29 int i;
30
31 - for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
32 - pin = spec->autocfg.hp_pins[i];
33 - if (!pin)
34 - break;
35 - dac = spec->multiout.hp_nid;
36 - if (!dac)
37 - dac = spec->multiout.dac_nids[0]; /* to front */
38 - alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
39 + if (spec->autocfg.line_out_type != AUTO_PIN_HP_OUT) {
40 + for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
41 + pin = spec->autocfg.hp_pins[i];
42 + if (!pin)
43 + break;
44 + dac = spec->multiout.hp_nid;
45 + if (!dac)
46 + dac = spec->multiout.dac_nids[0]; /* to front */
47 + alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
48 + }
49 }
50 - for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
51 - pin = spec->autocfg.speaker_pins[i];
52 - if (!pin)
53 - break;
54 - dac = spec->multiout.extra_out_nid[0];
55 - if (!dac)
56 - dac = spec->multiout.dac_nids[0]; /* to front */
57 - alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
58 +
59 + if (spec->autocfg.line_out_type != AUTO_PIN_SPEAKER_OUT) {
60 + for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
61 + pin = spec->autocfg.speaker_pins[i];
62 + if (!pin)
63 + break;
64 + dac = spec->multiout.extra_out_nid[0];
65 + if (!dac)
66 + dac = spec->multiout.dac_nids[0]; /* to front */
67 + alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
68 + }
69 }
70 }
71