summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2023-06-12 12:59:03 +0300
committerMark Brown <broonie@kernel.org>2023-06-21 01:30:32 +0300
commit198c93e2fc0b74ae520393118d7cb02762c04bf3 (patch)
treea9075b3b8f3aa88c9311f20bdc7317ed7deb3e30 /sound
parent6e8f7cb4cbae8e2b03190d26674a14be22d7df53 (diff)
downloadlinux-198c93e2fc0b74ae520393118d7cb02762c04bf3.tar.xz
ASoC: amd: ps: add acp_reset flag check in acp pci driver pm ops.
AMD SoundWire manager supports different power modes. acp_reset flag will be set to false only when SoundWire manager power mode is selected as ClockStop Mode. For rest of the combinations (ACP PDM + SDW), acp_reset flag will be set to true. When acp_reset flag is set, acp de-init and acp init sequence should be invoked during suspend/resume callbacks. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230612095903.2113464-10-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/amd/ps/pci-ps.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c
index ff734a90951b..5b46dc8573f8 100644
--- a/sound/soc/amd/ps/pci-ps.c
+++ b/sound/soc/amd/ps/pci-ps.c
@@ -669,24 +669,28 @@ disable_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 (ret)
- dev_err(dev, "ACP de-init failed\n");
+ if (adata->acp_reset) {
+ ret = acp63_deinit(adata->acp63_base, dev);
+ if (ret)
+ dev_err(dev, "ACP de-init failed\n");
+ }
return ret;
}
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 (ret)
- dev_err(dev, "ACP init failed\n");
+ if (adata->acp_reset) {
+ ret = acp63_init(adata->acp63_base, dev);
+ if (ret)
+ dev_err(dev, "ACP init failed\n");
+ }
return ret;
}