]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.6.2/alsa-hda-realtek-fix-detection-of-alc271x-codec.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.6.2 / alsa-hda-realtek-fix-detection-of-alc271x-codec.patch
1 From 9f720bb9409ea5923361fbd3fdbc505ca36cf012 Mon Sep 17 00:00:00 2001
2 From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
3 Date: Thu, 27 Sep 2012 10:38:14 -0300
4 Subject: ALSA: hda/realtek - Fix detection of ALC271X codec
5
6 From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
7
8 commit 9f720bb9409ea5923361fbd3fdbc505ca36cf012 upstream.
9
10 In commit af741c1 ("ALSA: hda/realtek - Call alc_auto_parse_customize_define()
11 always after fixup"), alc_auto_parse_customize_define was moved after
12 detection of ALC271X.
13
14 The problem is that detection of ALC271X relies on spec->cdefine.platform_type,
15 and it's set on alc_auto_parse_customize_define.
16
17 Move the alc_auto_parse_customize_define and its required fixup setup
18 before the block doing the ALC271X and other codec setup.
19
20 BugLink: https://bugs.launchpad.net/bugs/1006690
21 Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
22 Reviewed-by: David Henningsson <david.henningsson@canonical.com>
23 Signed-off-by: Takashi Iwai <tiwai@suse.de>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25
26 ---
27 sound/pci/hda/patch_realtek.c | 12 ++++++------
28 1 file changed, 6 insertions(+), 6 deletions(-)
29
30 --- a/sound/pci/hda/patch_realtek.c
31 +++ b/sound/pci/hda/patch_realtek.c
32 @@ -6334,6 +6334,12 @@ static int patch_alc269(struct hda_codec
33
34 spec = codec->spec;
35
36 + alc_pick_fixup(codec, alc269_fixup_models,
37 + alc269_fixup_tbl, alc269_fixups);
38 + alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
39 +
40 + alc_auto_parse_customize_define(codec);
41 +
42 if (codec->vendor_id == 0x10ec0269) {
43 spec->codec_variant = ALC269_TYPE_ALC269VA;
44 switch (alc_get_coef0(codec) & 0x00f0) {
45 @@ -6361,12 +6367,6 @@ static int patch_alc269(struct hda_codec
46 alc269_fill_coef(codec);
47 }
48
49 - alc_pick_fixup(codec, alc269_fixup_models,
50 - alc269_fixup_tbl, alc269_fixups);
51 - alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
52 -
53 - alc_auto_parse_customize_define(codec);
54 -
55 /* automatic parse from the BIOS config */
56 err = alc269_parse_auto_config(codec);
57 if (err < 0)