Skip to content
Snippets Groups Projects
Commit 23d63a31 authored by Mohan Kumar's avatar Mohan Kumar Committed by Takashi Iwai
Browse files

ALSA: hda/tegra: Program WAKEEN register for Tegra


The WAKEEN bits are used to indicate which bits in the
STATESTS register may cause wake event during the codec
state change request. Configure the WAKEEN register for
the Tegra to detect the wake events.

Signed-off-by: default avatarMohan Kumar <mkumard@nvidia.com>
Acked-by: default avatarSameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20200825052415.20626-3-mkumard@nvidia.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 216116ea
No related branches found
No related tags found
No related merge requests found
...@@ -179,6 +179,10 @@ static int __maybe_unused hda_tegra_runtime_suspend(struct device *dev) ...@@ -179,6 +179,10 @@ static int __maybe_unused hda_tegra_runtime_suspend(struct device *dev)
struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
if (chip && chip->running) { if (chip && chip->running) {
/* enable controller wake up event */
azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) |
STATESTS_INT_MASK);
azx_stop_chip(chip); azx_stop_chip(chip);
azx_enter_link_reset(chip); azx_enter_link_reset(chip);
} }
...@@ -200,6 +204,9 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev) ...@@ -200,6 +204,9 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev)
if (chip && chip->running) { if (chip && chip->running) {
hda_tegra_init(hda); hda_tegra_init(hda);
azx_init_chip(chip, 1); azx_init_chip(chip, 1);
/* disable controller wake up event*/
azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
~STATESTS_INT_MASK);
} }
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment