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@intel.com --- 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,