alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ALSA: hdmi - poll eld at resume time
@ 2013-06-24 11:45 Wang Xingchao
  2013-06-24 10:43 ` Wang, Xingchao
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Wang Xingchao @ 2013-06-24 11:45 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel, Wang Xingchao, xingchao.wang

Hdmi driver may not receive intrinsic event from gfx side when
it's in runtime suspend mode. There's no ELD info when exit from
runtime suspend. This patch avoid missing ELD info.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
---
 sound/pci/hda/patch_hdmi.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 7803ddd..cb8ac66 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1868,12 +1868,33 @@ static void generic_hdmi_free(struct hda_codec *codec)
 	kfree(spec);
 }
 
+#ifdef CONFIG_PM
+static int generic_hdmi_resume(struct hda_codec *codec)
+{
+	struct hdmi_spec *spec = codec->spec;
+	int pin_idx;
+
+	generic_hdmi_init(codec);
+	snd_hda_codec_resume_amp(codec);
+	snd_hda_codec_resume_cache(codec);
+
+	for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
+		struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
+		hdmi_present_sense(per_pin, 1);
+	}
+	return 0;
+}
+#endif
+
 static const struct hda_codec_ops generic_hdmi_patch_ops = {
 	.init			= generic_hdmi_init,
 	.free			= generic_hdmi_free,
 	.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
 };
 
 
-- 
1.8.1.2

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

end of thread, other threads:[~2013-07-18  6:42 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 11:45 [PATCH 1/2] ALSA: hdmi - poll eld at resume time Wang Xingchao
2013-06-24 10:43 ` Wang, Xingchao
2013-06-24 11:32 ` Takashi Iwai
2013-06-24 12:19   ` Wang, Xingchao
2013-06-24 12:49     ` Takashi Iwai
2013-06-25  4:54       ` Wang, Xingchao
2013-06-25  6:06         ` Takashi Iwai
2013-06-25  6:34           ` Wang, Xingchao
2013-06-25  7:06             ` Takashi Iwai
2013-06-25  7:09               ` Takashi Iwai
2013-06-25  8:30                 ` Wang, Xingchao
2013-06-26  4:28                   ` Wang, Xingchao
2013-06-25  6:15       ` Wang, Xingchao
2013-06-24 11:45 ` [PATCH 2/2] ALSA: hda - get realtime ELD info when codec suspended Wang Xingchao
2013-06-24 11:36   ` Takashi Iwai
2013-06-24 11:56     ` Wang, Xingchao
2013-06-24 12:00       ` Takashi Iwai
2013-06-24 12:47         ` David Henningsson
2013-06-24 13:00           ` Takashi Iwai
2013-06-25  7:45             ` David Henningsson
2013-06-25  7:55               ` Takashi Iwai
2013-06-25  9:02                 ` David Henningsson
2013-06-25  9:33                   ` Wang, Xingchao
2013-06-25  9:43                     ` David Henningsson
2013-07-12  6:13                       ` Wang Xingchao
2013-07-15  4:28                         ` David Henningsson
2013-07-15  8:54                           ` Wang, Xingchao
2013-07-17 10:15                             ` Wang, Xingchao
2013-07-18  5:47                               ` Wang, Xingchao
2013-07-18  6:43                                 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).