[PATCH 4/4] ALSA: hda/via - Fix wrongly cleared pins after suspend onVT1802

From: Takashi Iwai
Date: Mon Jun 03 2013 - 05:17:38 EST


VIA driver has a special suspend handling only for VT1802 to reduce
the pop noise. During the transition to the generic parser, the
behavior of snd_hda_set_pin_ctl() was also changed to modify the
cached values, too. And this caused a regression where the pin is
still cleared even after the resume (including the resume from power
save), resulting in the silent output.

The fix is simply to replace snd_hda_set_pin_ctl() with the explicit
call of snd_hda_codec_write() again.

Reported-by: Alex Riesen <raa.lkml@xxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
sound/pci/hda/patch_via.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index a6c3856..e524554 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -484,7 +484,9 @@ static int via_suspend(struct hda_codec *codec)
/* Fix pop noise on headphones */
int i;
for (i = 0; i < spec->gen.autocfg.hp_outs; i++)
- snd_hda_set_pin_ctl(codec, spec->gen.autocfg.hp_pins[i], 0);
+ snd_hda_codec_write(codec, spec->gen.autocfg.hp_pins[i],
+ 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
+ 0x00);
}

return 0;
--
1.8.3


--Multipart_Mon_Jun__3_12:05:12_2013-1--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/