All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda - fix broken HDMI jack detection after S3
@ 2012-08-22 12:01 David Henningsson
  2012-08-22 12:22 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: David Henningsson @ 2012-08-22 12:01 UTC (permalink / raw)
  To: tiwai, alsa-devel, 1040030; +Cc: 3.3+, David Henningsson

The HDMI codec (an NVIDIA one in this case) forgot that its pins
were unsol enabled, while it was suspended. Therefore jack detection
was broken after S3.
With this patch, we reenable the unsol events on resume,
and also do an extra check afterwards, to see if the HDMI monitor was
plugged/unplugged while in S3.

Cc: stable@kernel.org (3.3+)
BugLink: https://bugs.launchpad.net/bugs/1040030
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 sound/pci/hda/patch_hdmi.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 8f23374..6a3ac05 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1315,6 +1315,16 @@ static int generic_hdmi_init(struct hda_codec *codec)
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static int generic_hdmi_resume(struct hda_codec *codec)
+{
+	snd_hda_codec_resume_cache(codec);
+	snd_hda_jack_set_dirty_all(codec);
+	snd_hda_jack_report_sync(codec);
+	return 0;
+}
+#endif
+
 static void generic_hdmi_free(struct hda_codec *codec)
 {
 	struct hdmi_spec *spec = codec->spec;
@@ -1338,6 +1348,9 @@ static const struct hda_codec_ops generic_hdmi_patch_ops = {
 	.build_pcms		= generic_hdmi_build_pcms,
 	.build_controls		= generic_hdmi_build_controls,
 	.unsol_event		= hdmi_unsol_event,
+#ifdef CONFIG_PM
+	.resume			= generic_hdmi_resume,
+#endif
 };
 
 static int patch_generic_hdmi(struct hda_codec *codec)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-08-22 17:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-22 12:01 [PATCH] ALSA: hda - fix broken HDMI jack detection after S3 David Henningsson
2012-08-22 12:22 ` Takashi Iwai
2012-08-22 12:39   ` David Henningsson
2012-08-22 12:58     ` Takashi Iwai
2012-08-22 13:46       ` David Henningsson
2012-08-22 13:52         ` Takashi Iwai
2012-08-22 14:27           ` David Henningsson
2012-08-22 14:49             ` Takashi Iwai
2012-08-22 17:00               ` David Henningsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.