Skip to content

Commit 23d63a3

Browse files
mkumardtiwai
authored andcommitted
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: Mohan Kumar <[email protected]> Acked-by: Sameer Pujar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 216116e commit 23d63a3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sound/pci/hda/hda_tegra.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ static int __maybe_unused hda_tegra_runtime_suspend(struct device *dev)
179179
struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
180180

181181
if (chip && chip->running) {
182+
/* enable controller wake up event */
183+
azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) |
184+
STATESTS_INT_MASK);
185+
182186
azx_stop_chip(chip);
183187
azx_enter_link_reset(chip);
184188
}
@@ -200,6 +204,9 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev)
200204
if (chip && chip->running) {
201205
hda_tegra_init(hda);
202206
azx_init_chip(chip, 1);
207+
/* disable controller wake up event*/
208+
azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
209+
~STATESTS_INT_MASK);
203210
}
204211

205212
return 0;

0 commit comments

Comments
 (0)