diff options
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 21 |
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 | ||
1868 | static 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 | |||
1867 | static const struct hda_codec_ops generic_hdmi_patch_ops = { | 1885 | static 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 | ||