]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: hda: call runtime_allow() for all hda controllers
authorHui Wang <hui.wang@canonical.com>
Tue, 14 Apr 2020 14:27:25 +0000 (22:27 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Apr 2020 15:15:07 +0000 (17:15 +0200)
commit9a6418487b566503c772cb6e7d3d44e652b019b0
tree37c612d928e695b7c9be9041e1ab4cc908905101
parentf8e4ae10de43fbb7ce85f79e04eca2988b6b2c40
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.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200414142725.6020-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c