From e21af48583380ed9b5ca07b6dd962dbcd3748e0a Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Mon, 5 Mar 2012 11:38:46 +0100
Subject: [PATCH] ALSA: hda - fix broken automute/autoswitch for Realtek
Git-commit: e21af48583380ed9b5ca07b6dd962dbcd3748e0a
Patch-mainline: 3.4-rc3
References: FATE#314311

The recent addition of volume-knob widget in the auto-parser broke
automute/autoswitch for some Realtek devices.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_realtek.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -685,7 +685,7 @@ static void alc_sku_unsol_event(struct h
 	else
 		res >>= 26;
 	action = snd_hda_jack_get_action(codec, res);
-	if (res == ALC_DCVOL_EVENT) {
+	if (action == ALC_DCVOL_EVENT) {
 		/* Execute the dc-vol event here as it requires the NID
 		 * but we don't pass NID to alc_exec_unsol_event().
 		 * Once when we convert all static quirks to the auto-parser,
