From 94c142a160d63edac0e1fca7848960dcf75dd2a9 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Thu, 9 Aug 2012 10:56:12 +0200
Subject: [PATCH] ALSA: hda - Fix pop noise in headphones on S3 for Asus X55A, X55V
Git-commit: 94c142a160d63edac0e1fca7848960dcf75dd2a9
Patch-mainline: 3.6-rc3
References: FATE#314106

To turn off pin control for the pin was tested, and helped against
this issue.

Buglink: https://bugs.launchpad.net/bugs/1034779
Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_via.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1751,6 +1751,14 @@ static int via_suspend(struct hda_codec
 {
 	struct via_spec *spec = codec->spec;
 	vt1708_stop_hp_work(spec);
+
+	if (spec->codec_type == VT1802) {
+		/* Fix pop noise on headphones */
+		int i;
+		for (i = 0; i < spec->autocfg.hp_outs; i++)
+			snd_hda_set_pin_ctl(codec, spec->autocfg.hp_pins[i], 0);
+	}
+
 	return 0;
 }
 #endif
