[PATCH 11/11] intelhdmi - keep power on to avoid losing hot plug event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The intelhdmi patch relies on reliable pin presence detection to
conditionally generate infoframe for the connected pins. However
the codec power off risks losing the hot plug event. Interestingly
if such hot plug event is missed (it may not be generated by hardware
at all), we cannot even get correct pin presence info with the
AC_VERB_GET_PIN_SENSE query some time later.

So always keep the HDMI codec power on. This also avoids losing
0.5s audio samples if start playing immediately after powering
on the codec.

Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
 sound/pci/hda/patch_intelhdmi.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- sound-2.6.orig/sound/pci/hda/patch_intelhdmi.c	2009-11-13 18:21:41.000000000 +0800
+++ sound-2.6/sound/pci/hda/patch_intelhdmi.c	2009-11-13 18:21:47.000000000 +0800
@@ -868,6 +868,15 @@ static int intel_hdmi_init(struct hda_co
 	struct intel_hdmi_spec *spec = codec->spec;
 	int i;
 
+	/*
+	 * never power off at idle time:
+	 * - if powered off, the monitor hot plug events will be ignored,
+	 *   after that AC_VERB_GET_PIN_SENSE returns inaccurate value
+	 * - we need to keep the HDMI link active to avoid the loss of first
+	 *   0.5s audio samples (due to slow responding HDMI sinks)
+	 */
+	codec->power_count++;
+
 	for (i = 0; spec->pin[i]; i++) {
 		hdmi_enable_output(codec, spec->pin[i]);
 		snd_hda_codec_write(codec, spec->pin[i], 0,


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux