From 8e5a050901a16a62a7d2d4d4ef285eec8ae7203e Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 21 Jun 2012 15:49:33 +0200
Subject: [PATCH] ALSA: hda - Fix ALC272X codec detection
Git-commit: 8e5a050901a16a62a7d2d4d4ef285eec8ae7203e
Patch-mainline: 3.5-rc7
References: FATE#314311

The codec ALC272X is a special codec for some Dell machines, and its
detection got broken in the recent kernel because SSID check (required
by ALC272X check) was moved to the later point.  Now we need to move
this codec check to the right place, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_realtek.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6704,6 +6704,12 @@ static int patch_alc662(struct hda_codec
 
 	alc_fix_pll_init(codec, 0x20, 0x04, 15);
 
+	alc_pick_fixup(codec, alc662_fixup_models,
+		       alc662_fixup_tbl, alc662_fixups);
+	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
+
+	alc_auto_parse_customize_define(codec);
+
 	if ((alc_get_coef0(codec) & (1 << 14)) &&
 	    codec->bus->pci->subsystem_vendor == 0x1025 &&
 	    spec->cdefine.platform_type == 1) {
@@ -6711,12 +6717,6 @@ static int patch_alc662(struct hda_codec
 			goto error;
 	}
 
-	alc_pick_fixup(codec, alc662_fixup_models,
-		       alc662_fixup_tbl, alc662_fixups);
-	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
-
-	alc_auto_parse_customize_define(codec);
-
 	/* automatic parse from the BIOS config */
 	err = alc662_parse_auto_config(codec);
 	if (err < 0)
