All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohan Kumar <mkumard@nvidia.com>
To: <tiwai@suse.com>, <aplattner@nvidia.com>, <spujar@nvidia.com>
Cc: <alsa-devel@alsa-project.org>, <linux-tegra@vger.kernel.org>,
	<treding@nvidia.com>, <jonathanh@nvidia.com>,
	Mohan Kumar <mkumard@nvidia.com>
Subject: [PATCH 2/2] ALSA: hda/tegra: Program WAKEEN register for Tegra
Date: Tue, 25 Aug 2020 10:54:15 +0530	[thread overview]
Message-ID: <20200825052415.20626-3-mkumard@nvidia.com> (raw)
In-Reply-To: <20200825052415.20626-1-mkumard@nvidia.com>

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>
---
 sound/pci/hda/hda_tegra.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index c94553bcca88..70164d1428d4 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -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);
 	}
@@ -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;
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Mohan Kumar <mkumard@nvidia.com>
To: <tiwai@suse.com>, <aplattner@nvidia.com>, <spujar@nvidia.com>
Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org,
	treding@nvidia.com, Mohan Kumar <mkumard@nvidia.com>,
	jonathanh@nvidia.com
Subject: [PATCH 2/2] ALSA: hda/tegra: Program WAKEEN register for Tegra
Date: Tue, 25 Aug 2020 10:54:15 +0530	[thread overview]
Message-ID: <20200825052415.20626-3-mkumard@nvidia.com> (raw)
In-Reply-To: <20200825052415.20626-1-mkumard@nvidia.com>

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>
---
 sound/pci/hda/hda_tegra.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index c94553bcca88..70164d1428d4 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -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);
 	}
@@ -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;
-- 
2.17.1


  parent reply	other threads:[~2020-08-25  5:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25  5:24 [PATCH 0/2] Tegra HDA specific fixes Mohan Kumar
2020-08-25  5:24 ` Mohan Kumar
2020-08-25  5:24 ` [PATCH 1/2] ALSA: hda: Fix 2 channel swapping for Tegra Mohan Kumar
2020-08-25  5:24   ` Mohan Kumar
2020-08-25  7:36   ` Takashi Iwai
2020-08-25  7:36     ` Takashi Iwai
2020-08-25  5:24 ` Mohan Kumar [this message]
2020-08-25  5:24   ` [PATCH 2/2] ALSA: hda/tegra: Program WAKEEN register " Mohan Kumar
2020-08-25  7:36   ` Takashi Iwai
2020-08-25  7:36     ` Takashi Iwai
2020-08-25  5:31 ` [PATCH 0/2] Tegra HDA specific fixes Sameer Pujar
2020-08-25  5:31   ` Sameer Pujar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200825052415.20626-3-mkumard@nvidia.com \
    --to=mkumard@nvidia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=aplattner@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=spujar@nvidia.com \
    --cc=tiwai@suse.com \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.