X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fhda%2Fhda_codec.c;h=a9ebefd60cf68a0e773af8fdad276226566456ea;hb=0d290223a6c77107b1c3988959e49279a8dafaba;hp=7a717e15115697987adb430568a626f69963346b;hpb=e24c567b7ecff1c8b6023a10d7f78256cef742c4;p=linux-2.6-microblaze.git diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 7a717e151156..a9ebefd60cf6 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2981,6 +2981,18 @@ const struct dev_pm_ops hda_codec_driver_pm = { NULL) }; +/* suspend the codec at shutdown; called from driver's shutdown callback */ +void snd_hda_codec_shutdown(struct hda_codec *codec) +{ + struct hda_pcm *cpcm; + + list_for_each_entry(cpcm, &codec->pcm_list_head, list) + snd_pcm_suspend_all(cpcm->pcm); + + pm_runtime_force_suspend(hda_codec_dev(codec)); + pm_runtime_disable(hda_codec_dev(codec)); +} + /* * add standard channel maps if not specified */