aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Xingchao <xingchao.wang@linux.intel.com>2013-06-24 07:45:23 -0400
committerTakashi Iwai <tiwai@suse.de>2013-06-25 03:07:57 -0400
commit28cb72e5b86bb8340568c2ceb940eb165a9791b3 (patch)
tree1956a0e8cd03368b377a3aea62e5678e84843b7b
parent7295b26438ec018a16159e45d514e1c94c554c5b (diff)
ALSA: hda/hdmi - poll eld at resume time
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_hdmi.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 8428763de153..540bdef2f904 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1864,12 +1864,33 @@ static void generic_hdmi_free(struct hda_codec *codec)
1864 kfree(spec); 1864 kfree(spec);
1865} 1865}
1866 1866
1867#ifdef CONFIG_PM
1868static int generic_hdmi_resume(struct hda_codec *codec)
1869{
1870 struct hdmi_spec *spec = codec->spec;
1871 int pin_idx;
1872
1873 generic_hdmi_init(codec);
1874 snd_hda_codec_resume_amp(codec);
1875 snd_hda_codec_resume_cache(codec);
1876
1877 for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
1878 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
1879 hdmi_present_sense(per_pin, 1);
1880 }
1881 return 0;
1882}
1883#endif
1884
1867static const struct hda_codec_ops generic_hdmi_patch_ops = { 1885static const struct hda_codec_ops generic_hdmi_patch_ops = {
1868 .init = generic_hdmi_init, 1886 .init = generic_hdmi_init,
1869 .free = generic_hdmi_free, 1887 .free = generic_hdmi_free,
1870 .build_pcms = generic_hdmi_build_pcms, 1888 .build_pcms = generic_hdmi_build_pcms,
1871 .build_controls = generic_hdmi_build_controls, 1889 .build_controls = generic_hdmi_build_controls,
1872 .unsol_event = hdmi_unsol_event, 1890 .unsol_event = hdmi_unsol_event,
1891#ifdef CONFIG_PM
1892 .resume = generic_hdmi_resume,
1893#endif
1873}; 1894};
1874 1895
1875 1896