[PATCH 2/2] ASoC: amd: acp: move ACP7X_PDM_DMIC0/1 to acp-mach-common.h

From: Vijendar Mukunda

Date: Wed Oct 14 2026 - 07:48:05 EST


ACP7X_PDM_DMIC0 and ACP7X_PDM_DMIC1 identify the active PDM controller
on ACP7.B/7.F platforms. They are carried in amd_pdm_pdata.pdm_sel,
which is defined in acp-mach-common.h, and in amd_mc_ctx.pdm_sel, which
is defined in soc_amd_sdw_common.h.

Move the constants to acp-mach-common.h so there is a single shared
location for all PDM types and values, accessible to every AMD ACP
machine driver (I2S, SoundWire, and SOF paths) without driver-specific
header duplication. Remove the duplicate definition from
sound/soc/sof/amd/acp.h.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
---
sound/soc/amd/acp/acp-mach-common.h | 4 ++++
sound/soc/sof/amd/acp.h | 3 ---
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/amd/acp/acp-mach-common.h b/sound/soc/amd/acp/acp-mach-common.h
index a2cb25be6bf8..c5f1bb41c826 100644
--- a/sound/soc/amd/acp/acp-mach-common.h
+++ b/sound/soc/amd/acp/acp-mach-common.h
@@ -9,6 +9,10 @@
#ifndef __ACP_MACH_COMMON_H
#define __ACP_MACH_COMMON_H

+/* ACP7X PDM controller selection values for pdm_sel; 0 = not set */
+#define ACP7X_PDM_DMIC0 1
+#define ACP7X_PDM_DMIC1 2
+
/**
* struct amd_pdm_pdata - PDM controller platform data passed via mach->pdata
* @pdm_sel: active PDM controller (ACP7X_PDM_DMIC0 or ACP7X_PDM_DMIC1),
diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h
index 4eefc9cdba1b..b17a36b31ee0 100644
--- a/sound/soc/sof/amd/acp.h
+++ b/sound/soc/sof/amd/acp.h
@@ -159,9 +159,6 @@

/* ACPI child device address for the ACP7x PDM/DMIC device */
#define ACP7X_DMIC_ADDR 2
-/* ACP7X PDM controller selection values for acp_dev_data.pdm_sel; 0 = not set */
-#define ACP7X_PDM_DMIC0 1
-#define ACP7X_PDM_DMIC1 2
#define ACP_DSP_MSG_SET 1
#define ACP_DSP_ACK_SET 1

--
2.48.1