ALSA: hda: call runtime_allow() for all hda controllers
PATCH v2 1/1 ALSA: hda: call runtime_allow() for all hda controllers
Before the pci_driver->probe() is called, the pci subsystem calls runtime_forbid() and runtime_get_sync() on this pci dev, so only call runtime_put_autosuspend() is not enough to enable the runtime_pm on this device.
For controllers with vgaswitcheroo feature, the pci/quirks.c will call runtime_allow() for this dev, then the controllers could enter rt_idle/suspend/resume, but for non-vgaswitcheroo controllers like Intel hda controllers, the runtime_pm is not enabled because the runtime_allow() is not called.
Since it is no harm calling runtime_allow() twice, here let hda driver call runtime_allow() for all controllers. Then the runtime_pm is enabled on all controllers after the put_autosuspend() is called.
--- sound/pci/hda/hda_intel.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/hda_intel.c +1 -0
@@ -2356,6 +2356,7 @@ static int azx_probe_continue(struct azx *chip)if (azx_has_pm_runtime (chip)) {pm_runtime_use_autosuspend (&pci->dev); +pm_runtime_allow (&pci->dev);pm_runtime_put_autosuspend (&pci->dev); }
Signature · 1 line
2.17.1
Quoted 12 lines · Hui Wang
Before the
pci_driver->probe()is called, the pci subsystem callsruntime_forbid()andruntime_get_sync()on this pci dev, so only callruntime_put_autosuspend()is not enough to enable theruntime_pmon this device.For controllers with vgaswitcheroo feature, the
pci/quirks.cwill callruntime_allow()for this dev, then the controllers could enter rt_idle/suspend/resume, but for non-vgaswitcheroo controllers like Intel hda controllers, theruntime_pmis not enabled because theruntime_allow()is not called.
Quoted 5 lines
Since it is no harm calling
runtime_allow()twice, here let hda driver callruntime_allow()for all controllers. Then theruntime_pmis enabled on all controllers after theput_autosuspend()is called.Signed-off-by Hui Wang <[email protected]>
Applied now. Thanks.
Takashi