aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r--sound/pci/hda/patch_hdmi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index f86b9b0a0607..d21a4eb1ca49 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2326,6 +2326,18 @@ static void generic_hdmi_free(struct hda_codec *codec)
2326} 2326}
2327 2327
2328#ifdef CONFIG_PM 2328#ifdef CONFIG_PM
2329static int generic_hdmi_suspend(struct hda_codec *codec)
2330{
2331 struct hdmi_spec *spec = codec->spec;
2332 int pin_idx;
2333
2334 for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
2335 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
2336 cancel_delayed_work_sync(&per_pin->work);
2337 }
2338 return 0;
2339}
2340
2329static int generic_hdmi_resume(struct hda_codec *codec) 2341static int generic_hdmi_resume(struct hda_codec *codec)
2330{ 2342{
2331 struct hdmi_spec *spec = codec->spec; 2343 struct hdmi_spec *spec = codec->spec;
@@ -2349,6 +2361,7 @@ static const struct hda_codec_ops generic_hdmi_patch_ops = {
2349 .build_controls = generic_hdmi_build_controls, 2361 .build_controls = generic_hdmi_build_controls,
2350 .unsol_event = hdmi_unsol_event, 2362 .unsol_event = hdmi_unsol_event,
2351#ifdef CONFIG_PM 2363#ifdef CONFIG_PM
2364 .suspend = generic_hdmi_suspend,
2352 .resume = generic_hdmi_resume, 2365 .resume = generic_hdmi_resume,
2353#endif 2366#endif
2354}; 2367};