From ba5338185dd522696f1c0d0957a724a1fdd1f39d Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 20 Feb 2012 16:36:52 +0100
Subject: [PATCH] ALSA: hda/realtek - Rewrite ALC880 model=F1734 with auto-parser
Git-commit: ba5338185dd522696f1c0d0957a724a1fdd1f39d
Patch-mainline: 3.4-rc3
References: FATE#314311

Similar as the previous patch for model=fujitsu, we can now move the
static quirk for F1734 to the auto-parser.  The only difference is the
default pin configurations: F1734 has less pins than Amilo's.

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

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

--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -14,7 +14,6 @@ ALC880
   asus-dig	ASUS with SPDIF out
   asus-dig2	ASUS with SPDIF out (using GPIO2)
   uniwill	3-jack
-  F1734		2-jack
   test		for testing/debugging purpose, almost all controls can be
 		adjusted.  Appearing only when compiled with
 		$CONFIG_SND_DEBUG=y
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4449,6 +4449,7 @@ enum {
 	ALC880_FIXUP_TCL_S700,
 	ALC880_FIXUP_VOL_KNOB,
 	ALC880_FIXUP_FUJITSU,
+	ALC880_FIXUP_F1734,
 };
 
 /* enable the volume-knob widget support on NID 0x21 */
@@ -4538,14 +4539,37 @@ static const struct alc_fixup alc880_fix
 		.chained = true,
 		.chain_id = ALC880_FIXUP_VOL_KNOB,
 	},
+	[ALC880_FIXUP_F1734] = {
+		/* almost compatible with FUJITSU, but no bass and SPDIF */
+		.type = ALC_FIXUP_PINS,
+		.v.pins = (const struct alc_pincfg[]) {
+			{ 0x14, 0x0121411f }, /* HP */
+			{ 0x15, 0x99030120 }, /* speaker */
+			{ 0x16, 0x411111f0 }, /* N/A */
+			{ 0x17, 0x411111f0 }, /* N/A */
+			{ 0x18, 0x411111f0 }, /* N/A */
+			{ 0x19, 0x01a19950 }, /* mic-in */
+			{ 0x1a, 0x411111f0 }, /* N/A */
+			{ 0x1b, 0x411111f0 }, /* N/A */
+			{ 0x1c, 0x411111f0 }, /* N/A */
+			{ 0x1d, 0x411111f0 }, /* N/A */
+			{ 0x1e, 0x411111f0 }, /* N/A */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC880_FIXUP_VOL_KNOB,
+	},
 };
 
 static const struct snd_pci_quirk alc880_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810),
 	SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", ALC880_FIXUP_EAPD_COEF),
+	SND_PCI_QUIRK(0x1584, 0x9054, "Uniwill", ALC880_FIXUP_F1734),
 	SND_PCI_QUIRK(0x161f, 0x203d, "W810", ALC880_FIXUP_W810),
 	SND_PCI_QUIRK(0x161f, 0x205d, "Medion Rim 2150", ALC880_FIXUP_MEDION_RIM),
+	SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_FIXUP_F1734),
 	SND_PCI_QUIRK(0x1734, 0x1094, "FSC Amilo M1451G", ALC880_FIXUP_FUJITSU),
+	SND_PCI_QUIRK(0x1734, 0x10ac, "FSC AMILO Xi 1526", ALC880_FIXUP_F1734),
 	SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU),
 	SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_FIXUP_LG),
 	SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_FIXUP_LG),
