Re: [PATCH 5/5] ASoC: amd: acp7x: add system and runtime PM ops

From: Mario Limonciello

Date: Thu May 21 2026 - 07:48:44 EST




On 5/21/26 06:41, Mukunda,Vijendar wrote:
On 08/05/26 01:03, Mario Limonciello wrote:


On 5/7/26 13:11, Vijendar Mukunda wrote:
Add ACP7.x PM callbacks and hook up system sleep and runtime PM ops for
the PCI driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
---
  sound/soc/amd/acp7x/acp7x-common.c | 43 ++++++++++++++++++++++++++++++
  sound/soc/amd/acp7x/acp7x.h        |  3 +++
  sound/soc/amd/acp7x/pci-acp7x.c    | 31 +++++++++++++++++++++
  3 files changed, 77 insertions(+)

diff --git a/sound/soc/amd/acp7x/acp7x-common.c
b/sound/soc/amd/acp7x/acp7x-common.c
index 68f9b47766c4..df94864a1693 100644
--- a/sound/soc/amd/acp7x/acp7x-common.c
+++ b/sound/soc/amd/acp7x/acp7x-common.c
@@ -75,8 +75,51 @@ static int acp7x_deinit(void __iomem *acp_base, struct
device *dev)
      return 0;
  }
  +static int __maybe_unused snd_acp7x_suspend(struct device *dev)
+{
+    struct acp7x_dev_data *adata;
+    int ret;
+
+    adata = dev_get_drvdata(dev);
+    ret = acp_hw_deinit(adata, dev);
+    if (ret)
+        dev_err(dev, "ACP de-init failed\n");
+    return ret;
+}
+
+static int __maybe_unused snd_acp7x_runtime_resume(struct device *dev)
+{
+    struct acp7x_dev_data *adata;
+    int ret;
+
+    adata = dev_get_drvdata(dev);
+    ret = acp_hw_init(adata, dev);
+    if (ret) {
+        dev_err(dev, "ACP init failed\n");
+        return ret;
+    }
+    return 0;
+}
+
+static int __maybe_unused snd_acp7x_resume(struct device *dev)
+{
+    struct acp7x_dev_data *adata;
+    int ret;
+
+    adata = dev_get_drvdata(dev);
+    ret = acp_hw_init(adata, dev);
+    if (ret)
+        dev_err(dev, "ACP init failed\n");
+
+    return ret;
+}

Both of snd_acp7x_runtime_resume and snd_acp7x_resume look identical. Will
there be later code (when machine driver and IO enablement come) that makes
them different?

Yes, when IO enablement code is updated, both the functions are going to be
different.
We need to keep it separately.


Thanks, no concerns with the series then.

Reviewed-by: Mario Limonciello (AMD) <superm1@xxxxxxxxxx>