Skip to content

Commit

Permalink
ALSA: hda/tegra: Program WAKEEN register for Tegra
Browse files Browse the repository at this point in the history
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: Mohan Kumar <mkumard@nvidia.com>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20200825052415.20626-3-mkumard@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Mohan Kumar authored and Takashi Iwai committed Aug 25, 2020
1 parent 216116e commit 23d63a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/pci/hda/hda_tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

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_enter_link_reset(chip);
}
Expand All @@ -200,6 +204,9 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev)
if (chip && chip->running) {
hda_tegra_init(hda);
azx_init_chip(chip, 1);
/* disable controller wake up event*/
azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
~STATESTS_INT_MASK);
}

return 0;
Expand Down

0 comments on commit 23d63a3

Please sign in to comment.