diff options
author | Rahul Mittal <rmittal@nvidia.com> | 2013-04-09 19:47:21 +0530 |
---|---|---|
committer | Mrutyunjay Sawant <msawant@nvidia.com> | 2013-04-10 04:10:46 -0700 |
commit | 529d36f0d90d38f3cf788c250a7d66c9c68603a2 (patch) | |
tree | c173d0820408058415f971a49682b72a6c157809 /sound | |
parent | 899cb78401467cd6605d2151ca90c581383236c9 (diff) |
ALSA: hda: Cancel delayed work during suspend
Register hda codec suspend callback which does
cancel_delayed_work_sync() during suspend
Bug 1266206
Change-Id: Ie3f17156ebf0f648f4db1cfa2bfb0081bd4b0ed7
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/217860
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index f943889afbec..fe7c1ec37494 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1410,9 +1410,26 @@ static void generic_hdmi_free(struct hda_codec *codec) kfree(spec); } +static int generic_hdmi_suspend(struct hda_codec *codec, pm_message_t state) +{ + struct hdmi_spec *spec = codec->spec; + int pin_idx; + + for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { + struct hdmi_spec_per_pin *per_pin = &spec->pins[pin_idx]; + struct hdmi_eld *eld = &per_pin->sink_eld; + + cancel_delayed_work_sync(&per_pin->work); + snd_hda_eld_proc_free(codec, eld); + } + + return 0; +} + static const struct hda_codec_ops generic_hdmi_patch_ops = { .init = generic_hdmi_init, .free = generic_hdmi_free, + .suspend = generic_hdmi_suspend, .build_pcms = generic_hdmi_build_pcms, .build_controls = generic_hdmi_build_controls, .unsol_event = hdmi_unsol_event, |