From 2996bdbaa40c52c76ec9b981dfa1c9f3a6191fc3 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 18 Aug 2011 16:02:24 +0200
Subject: [PATCH] ALSA: hda - Remove ALC662 eeepc-p701 and ecs models
Git-commit: 2996bdbaa40c52c76ec9b981dfa1c9f3a6191fc3
Patch-mainline: 3.2-rc1
References: FATE#314311

These are confirmed to work with the auto-parser with pincfg fixups.

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

---
 Documentation/sound/alsa/HD-Audio-Models.txt |    2 --
 sound/pci/hda/patch_realtek.c                |   13 +++++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -74,9 +74,7 @@ ALC662/663/272
   3stack-6ch-dig 3-stack (6-channel) with SPDIF
   5stack-dig	 5-stack with SPDIF
   lenovo-101e	 Lenovo laptop
-  eeepc-p701	ASUS Eeepc P701
   eeepc-ep20	ASUS Eeepc EP20
-  ecs		ECS/Foxconn mobo
   m51va		ASUS M51VA
   g71v		ASUS G71V
   h13		ASUS H13
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5140,6 +5140,7 @@ enum {
 	ALC662_FIXUP_CZC_P10T,
 	ALC662_FIXUP_SKU_IGNORE,
 	ALC662_FIXUP_HP_RP5800,
+	ALC662_FIXUP_ECS,
 };
 
 static const struct alc_fixup alc662_fixups[] = {
@@ -5181,13 +5182,25 @@ static const struct alc_fixup alc662_fix
 		.chained = true,
 		.chain_id = ALC662_FIXUP_SKU_IGNORE
 	},
+	[ALC662_FIXUP_ECS] = {
+		.type = ALC_FIXUP_PINS,
+		.v.pins = (const struct alc_pincfg[]) {
+			{ 0x14, 0x99130110 }, /* speaker */
+			{ 0x18, 0x01a19820 }, /* mic */
+			{ 0x19, 0x99a3092f }, /* int-mic */
+			{ 0x1b, 0x0121401f }, /* HP out */
+			{ }
+		},
+	},
 };
 
 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
+	SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ECS),
 	SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),
 	SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE),
 	SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
 	SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
+	SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ECS),
 	SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
 	SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
 	SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
