]>
Commit | Line | Data |
---|---|---|
7cb15094 GKH |
1 | From c48a8fb0d31d6147d8d76b8e2ad7f51a2fbb5c4d Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Wed, 27 Jul 2011 16:41:57 +0200 | |
4 | Subject: ALSA: hda - Fix duplicated DAC assignments for Realtek | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit c48a8fb0d31d6147d8d76b8e2ad7f51a2fbb5c4d upstream. | |
9 | ||
10 | Copying hp_pins and speaker_pins from line_out_pins may confuse the | |
11 | parser, and it can lead to duplicated initializations for the same pin | |
12 | with a wrong DAC assignment. The problem appears in 3.0 kernel code. | |
13 | ||
14 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
16 | ||
17 | --- | |
18 | sound/pci/hda/patch_realtek.c | 7 +++++-- | |
19 | 1 file changed, 5 insertions(+), 2 deletions(-) | |
20 | ||
21 | --- a/sound/pci/hda/patch_realtek.c | |
22 | +++ b/sound/pci/hda/patch_realtek.c | |
23 | @@ -1578,13 +1578,15 @@ static void alc_init_auto_hp(struct hda_ | |
24 | if (present == 3) | |
25 | spec->automute_hp_lo = 1; /* both HP and LO automute */ | |
26 | ||
27 | - if (!cfg->speaker_pins[0]) { | |
28 | + if (!cfg->speaker_pins[0] && | |
29 | + cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) { | |
30 | memcpy(cfg->speaker_pins, cfg->line_out_pins, | |
31 | sizeof(cfg->speaker_pins)); | |
32 | cfg->speaker_outs = cfg->line_outs; | |
33 | } | |
34 | ||
35 | - if (!cfg->hp_pins[0]) { | |
36 | + if (!cfg->hp_pins[0] && | |
37 | + cfg->line_out_type == AUTO_PIN_HP_OUT) { | |
38 | memcpy(cfg->hp_pins, cfg->line_out_pins, | |
39 | sizeof(cfg->hp_pins)); | |
40 | cfg->hp_outs = cfg->line_outs; | |
41 | @@ -1603,6 +1605,7 @@ static void alc_init_auto_hp(struct hda_ | |
42 | spec->automute_mode = ALC_AUTOMUTE_PIN; | |
43 | } | |
44 | if (spec->automute && cfg->line_out_pins[0] && | |
45 | + cfg->speaker_pins[0] && | |
46 | cfg->line_out_pins[0] != cfg->hp_pins[0] && | |
47 | cfg->line_out_pins[0] != cfg->speaker_pins[0]) { | |
48 | for (i = 0; i < cfg->line_outs; i++) { |