mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <--to=broonie@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <Basavaraj.Hiregoudar@amd.com>,
	<Sunil-kumar.Dommati@amd.com>, <Mastan.Katragadda@amd.com>,
	<Arungopal.kondaveeti@amd.com>,
	Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	"Syed Saba Kareem" <Syed.SabaKareem@amd.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 9/9] ASoC: amd: ps: Add soundwire specific checks in pci driver in pm ops.
Date: Tue, 16 May 2023 16:05:43 +0530	[thread overview]
Message-ID: <20230516103543.2515097-10-Vijendar.Mukunda@amd.com> (raw)
In-Reply-To: <20230516103543.2515097-1-Vijendar.Mukunda@amd.com>

AMD Soundwire manager supports different power modes.
In case of Soundwire Power off Mode, ACP pci parent driver
should invoke acp de-init and init sequence during suspend/resume
callbacks.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/ps/pci-ps.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c
index ba8ec8442a6e..6d688821b3c4 100644
--- a/sound/soc/amd/ps/pci-ps.c
+++ b/sound/soc/amd/ps/pci-ps.c
@@ -656,10 +656,15 @@ static int snd_acp63_probe(struct pci_dev *pci,
 static int __maybe_unused snd_acp63_suspend(struct device *dev)
 {
 	struct acp63_dev_data *adata;
-	int ret;
+	int ret = 0;
 
 	adata = dev_get_drvdata(dev);
-	ret = acp63_deinit(adata->acp63_base, dev);
+	if (adata->pdev_mask & ACP63_SDW_DEV_MASK) {
+		if (adata->acp_reset)
+			ret = acp63_deinit(adata->acp63_base, dev);
+	} else {
+		ret = acp63_deinit(adata->acp63_base, dev);
+	}
 	if (ret)
 		dev_err(dev, "ACP de-init failed\n");
 	return ret;
@@ -668,10 +673,15 @@ static int __maybe_unused snd_acp63_suspend(struct device *dev)
 static int __maybe_unused snd_acp63_resume(struct device *dev)
 {
 	struct acp63_dev_data *adata;
-	int ret;
+	int ret = 0;
 
 	adata = dev_get_drvdata(dev);
-	ret = acp63_init(adata->acp63_base, dev);
+	if (adata->pdev_mask & ACP63_SDW_DEV_MASK) {
+		if (adata->acp_reset)
+			ret = acp63_init(adata->acp63_base, dev);
+	} else {
+		ret = acp63_init(adata->acp63_base, dev);
+	}
 	if (ret)
 		dev_err(dev, "ACP init failed\n");
 	return ret;
-- 
2.34.1


      parent reply	other threads:[~2023-05-16 10:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230516103543.2515097-1-Vijendar.Mukunda@amd.com>
2023-05-16 10:35 ` [PATCH 1/9] ASoC: amd: ps: create platform devices based on acp config Vijendar Mukunda
2023-05-16 14:32   ` Pierre-Louis Bossart
2023-05-17  8:38     ` Mukunda,Vijendar
2023-05-17 13:40       ` Pierre-Louis Bossart
2023-05-16 10:35 ` [PATCH 2/9] ASoC: amd: ps: handle soundwire interrupts in acp pci driver Vijendar Mukunda
2023-05-16 14:39   ` Pierre-Louis Bossart
2023-05-17  7:18     ` Mukunda,Vijendar
2023-05-17 13:36       ` Pierre-Louis Bossart
2023-05-16 10:35 ` [PATCH 3/9] ASoC: amd: ps: add soundwire dma driver Vijendar Mukunda
2023-05-16 14:40   ` Pierre-Louis Bossart
2023-05-16 16:50     ` Limonciello, Mario
2023-05-17  6:29       ` Mukunda,Vijendar
2023-05-16 10:35 ` [PATCH 4/9] ASoC: amd: ps: add soundwire dma driver dma ops Vijendar Mukunda
2023-05-16 10:35 ` [PATCH 5/9] ASoC: amd: ps: add support for Soundwire DMA interrupts Vijendar Mukunda
2023-05-16 10:35 ` [PATCH 6/9] ASoC: amd: ps: add pm ops support for soundwire dma driver Vijendar Mukunda
2023-05-16 10:35 ` [PATCH 7/9] ASoC: amd: ps: enable SoundWire dma driver build Vijendar Mukunda
2023-05-17 16:17   ` kernel test robot
2023-05-18  5:01     ` Mukunda,Vijendar
2023-05-16 10:35 ` [PATCH 8/9] ASoC: amd: update comments in Kconfig file Vijendar Mukunda
2023-05-16 10:35 ` Vijendar Mukunda [this message]

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=20230516103543.2515097-10-Vijendar.Mukunda@amd.com \
    --to=vijendar.mukunda@amd.com \
    --cc=--to=broonie@kernel.org \
    --cc=Arungopal.kondaveeti@amd.com \
    --cc=Basavaraj.Hiregoudar@amd.com \
    --cc=Mastan.Katragadda@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=Syed.SabaKareem@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®