summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_tegra.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-19 16:00:22 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-23 09:16:07 +0100
commitcc72da7d4d063ab9e690e56e0ef1ca1c24ee1635 (patch)
tree7dbde009e56e7e3c9d555df9cb41d1b434657218 /sound/pci/hda/hda_tegra.c
parent59ed1eade1d6ec24751baca99305f9713a5d779e (diff)
downloadlwn-cc72da7d4d063ab9e690e56e0ef1ca1c24ee1635.tar.gz
lwn-cc72da7d4d063ab9e690e56e0ef1ca1c24ee1635.zip
ALSA: hda - Use standard runtime PM for codec power-save control
Like the previous transition of suspend/resume, now move the power-save code to the standard runtime PM. As usual for runtime PM, it's a bit tricky, but this simplified codes a lot in the end. For keeping the usage compatibility, power_save module option still controls the whole power-saving behavior on all codecs. The value is translated to pm_runtime_*_autosuspend() and pm_runtime_allow() / pm_runtime_forbid() calls. snd_hda_power_up() and snd_hda_power_down() are translated to pm_runtime_get_sync() and pm_runtime_put_autosuspend(), respectively. Since we can do call pm_runtime_get_sync() more reliably, the sync version is used always and snd_hda_power_up_d3wait() is dropped. Another slight difference is that snd_hda_power_up()/down() don't call runtime_pm code during the suspend/resume transition phase. Calling them there isn't safe unlike our own code, resulted in unexpected behavior (endless wakeups). The hda_power_count tracepoint was removed, as it doesn't match well with the new code. Last but not least, we need to set ignore_children flag in the parent dev.power field so that the runtime PM of the controller chip won't get confused. The notification is still done in the bus pm_notify callback. We'll get rid of this hack in the later patch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_tegra.c')
0 files changed, 0 insertions, 0 deletions