ALSA: hda/tegra: add driver flag for runtime PM

This change “ALSA: hda/tegra: add driver flag for runtime PM” in Linux kernel is authored by Sameer Pujar <spujar [at] nvidia.com> on Tue Jan 22 13:03:21 2019 +0530.

ALSA: hda/tegra: add driver flag for runtime PM

AZX_DCAPS_PM_RUNTIME flag is added to indicate support for runtime PM.
azx_has_pm_runtime() is used to check if above is enabled and thus
forbid runtime PM calls if needed.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 9935d55.

There are 3 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 sound/pci/hda/hda_tegra.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index a7fd4c6..c8d18dc 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -520,7 +520,8 @@ static int hda_tegra_create(struct snd_card *card,
 
 static int hda_tegra_probe(struct platform_device *pdev)
 {
-	const unsigned int driver_flags = AZX_DCAPS_CORBRP_SELF_CLEAR;
+	const unsigned int driver_flags = AZX_DCAPS_CORBRP_SELF_CLEAR |
+					  AZX_DCAPS_PM_RUNTIME;
 	struct snd_card *card;
 	struct azx *chip;
 	struct hda_tegra *hda;

The commit for this change in Linux stable tree is 9935d55 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *