[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230516103543.2515097-10-Vijendar.Mukunda@amd.com>
Date: Tue, 16 May 2023 16:05:43 +0530
From: Vijendar Mukunda <Vijendar.Mukunda@....com>
To: <--to=broonie@...nel.org>
CC: <alsa-devel@...a-project.org>, <Basavaraj.Hiregoudar@....com>,
<Sunil-kumar.Dommati@....com>, <Mastan.Katragadda@....com>,
<Arungopal.kondaveeti@....com>,
Vijendar Mukunda <Vijendar.Mukunda@....com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
"Syed Saba Kareem" <Syed.SabaKareem@....com>,
open list <linux-kernel@...r.kernel.org>
Subject: [PATCH 9/9] ASoC: amd: ps: Add soundwire specific checks in pci driver in pm ops.
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@....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
Powered by blists - more mailing lists