[PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper

Vijendar Mukunda posted 1 patch 4 weeks ago
sound/soc/amd/acp/Kconfig                    |  6 +++
sound/soc/amd/acp/Makefile                   |  2 +
sound/soc/amd/acp/amd-acp70-acpi-match.c     | 50 ++++++++++++++++++++
sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c | 42 ++++++++++++++++
sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 14 ++++++
5 files changed, 114 insertions(+)
create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
[PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
Posted by Vijendar Mukunda 4 weeks ago
Add a filter to skip the RT172 VB configuration if a SmartMic Function
is not found in the SDCA descriptors.

If the ACPI information is incorrect this can only be quirked further
with DMI information.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/Kconfig                    |  6 +++
 sound/soc/amd/acp/Makefile                   |  2 +
 sound/soc/amd/acp/amd-acp70-acpi-match.c     | 50 ++++++++++++++++++++
 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c | 42 ++++++++++++++++
 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 14 ++++++
 5 files changed, 114 insertions(+)
 create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
 create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h

diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
index c2a60bc80ee6..ed2fa055f7f6 100644
--- a/sound/soc/amd/acp/Kconfig
+++ b/sound/soc/amd/acp/Kconfig
@@ -15,8 +15,14 @@ config SND_SOC_AMD_ACP_COMMON
 
 config SND_SOC_ACPI_AMD_MATCH
 	tristate
+	select SND_SOC_ACPI_AMD_SDCA_QUIRKS
 	select SND_SOC_ACPI if ACPI
 
+config SND_SOC_ACPI_AMD_SDCA_QUIRKS
+	tristate
+	depends on ACPI
+	depends on SND_SOC_SDCA
+
 if SND_SOC_AMD_ACP_COMMON
 
 config SND_SOC_AMD_ACP_PDM
diff --git a/sound/soc/amd/acp/Makefile b/sound/soc/amd/acp/Makefile
index 08220b9a3802..81d23aded348 100644
--- a/sound/soc/amd/acp/Makefile
+++ b/sound/soc/amd/acp/Makefile
@@ -27,6 +27,7 @@ snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o amd-acp70-acpi-match.o
 snd-acp-sdw-mach-y     := acp-sdw-mach-common.o
 snd-acp-sdw-sof-mach-y += acp-sdw-sof-mach.o
 snd-acp-sdw-legacy-mach-y += acp-sdw-legacy-mach.o
+snd-soc-acpi-amd-sdca-quirks-y += soc-acpi-amd-sdca-quirks.o
 
 obj-$(CONFIG_SND_SOC_AMD_ACP_PCM) += snd-acp-pcm.o
 obj-$(CONFIG_SND_SOC_AMD_ACP_I2S) += snd-acp-i2s.o
@@ -40,6 +41,7 @@ obj-$(CONFIG_SND_AMD_ASOC_REMBRANDT) += snd-acp-rembrandt.o
 obj-$(CONFIG_SND_AMD_ASOC_ACP63) += snd-acp63.o
 obj-$(CONFIG_SND_AMD_ASOC_ACP70) += snd-acp70.o
 
+obj-$(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS) += snd-soc-acpi-amd-sdca-quirks.o
 obj-$(CONFIG_SND_AMD_SOUNDWIRE_ACPI) += snd-amd-sdw-acpi.o
 obj-$(CONFIG_SND_SOC_AMD_MACH_COMMON) += snd-acp-mach.o
 obj-$(CONFIG_SND_SOC_AMD_LEGACY_MACH) += snd-acp-legacy-mach.o
diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c b/sound/soc/amd/acp/amd-acp70-acpi-match.c
index 871b4f054a84..fa39f18578ca 100644
--- a/sound/soc/amd/acp/amd-acp70-acpi-match.c
+++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c
@@ -7,6 +7,7 @@
  */
 
 #include <sound/soc-acpi.h>
+#include "soc-acpi-amd-sdca-quirks.h"
 #include "../mach-config.h"
 
 static const struct snd_soc_acpi_endpoint single_endpoint = {
@@ -44,6 +45,39 @@ static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
 	.group_id = 1
 };
 
+static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints[] = {
+	/* Jack Endpoint */
+	{
+		.num = 0,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+	/* Amp Endpoint, work as spk_l_endpoint */
+	{
+		.num = 1,
+		.aggregated = 1,
+		.group_position = 0,
+		.group_id = 1,
+	},
+	/* DMIC Endpoint */
+	{
+		.num = 2,
+		.aggregated = 0,
+		.group_position = 0,
+		.group_id = 0,
+	},
+};
+
+static const struct snd_soc_acpi_adr_device rt712_vb_1_group1_adr[] = {
+	{
+		.adr = 0x000130025D071201ull,
+		.num_endpoints = ARRAY_SIZE(jack_amp_g1_dmic_endpoints),
+		.endpoints = jack_amp_g1_dmic_endpoints,
+		.name_prefix = "rt712"
+	}
+};
+
 static const struct snd_soc_acpi_adr_device rt711_rt1316_group_adr[] = {
 	{
 		.adr = 0x000030025D071101ull,
@@ -254,6 +288,15 @@ static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1[] = {
 	{}
 };
 
+static const struct snd_soc_acpi_link_adr acp70_alc712_vb_l1[] = {
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt712_vb_1_group1_adr),
+		.adr_d = rt712_vb_1_group1_adr,
+	},
+	{}
+};
+
 static const struct snd_soc_acpi_link_adr acp70_rt722_only[] = {
 	{
 		.mask = BIT(0),
@@ -308,6 +351,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = {
 		.links = acp70_cs35l56x4_l1,
 		.drv_name = "amd_sdw",
 	},
+	{
+		.link_mask = BIT(1),
+		.links = acp70_alc712_vb_l1,
+		.machine_check = snd_soc_acpi_amd_sdca_is_device_rt712_vb,
+		.drv_name = "amd_sdw",
+	},
 	{},
 };
 EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sdw_machines);
@@ -327,3 +376,4 @@ EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sof_sdw_machines);
 MODULE_DESCRIPTION("AMD ACP7.0 & ACP7.1 tables and support for ACPI enumeration");
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
+MODULE_IMPORT_NS("SND_SOC_ACPI_AMD_SDCA_QUIRKS");
diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
new file mode 100644
index 000000000000..63bf9e3c0ae1
--- /dev/null
+++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * soc-acpi-amd-sdca-quirks.c - tables and support for SDCA quirks
+ *
+ * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.
+ *
+ */
+
+#include <linux/soundwire/sdw_amd.h>
+#include <sound/sdca.h>
+#include <sound/soc-acpi.h>
+#include "soc-acpi-amd-sdca-quirks.h"
+
+/*
+ * Pretend machine quirk. The argument type is not the traditional
+ * 'struct snd_soc_acpi_mach' pointer but instead the sdw_amd_ctx
+ * which contains the peripheral information required for the
+ * SoundWire/SDCA filter on the SMART_MIC setup and interface
+ * revision. When the return value is false, the entry in the
+ * 'snd_soc_acpi_mach' table needs to be skipped.
+ */
+bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg)
+{
+	struct sdw_amd_ctx *ctx = arg;
+	int i;
+
+	if (!ctx)
+		return false;
+
+	for (i = 0; i < ctx->peripherals->num_peripherals; i++) {
+		if (sdca_device_quirk_match(ctx->peripherals->array[i],
+					    SDCA_QUIRKS_RT712_VB))
+			return true;
+	}
+
+	return false;
+}
+EXPORT_SYMBOL_NS(snd_soc_acpi_amd_sdca_is_device_rt712_vb, "SND_SOC_ACPI_AMD_SDCA_QUIRKS");
+
+MODULE_DESCRIPTION("ASoC ACPI AMD SDCA quirks");
+MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("SND_SOC_SDCA");
diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
new file mode 100644
index 000000000000..7e345a236da1
--- /dev/null
+++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * soc-acpi-amd-sdca-quirks.h - tables and support for SDCA quirks
+ *
+ * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.
+ *
+ */
+
+#ifndef _SND_SOC_ACPI_AMD_SDCA_QUIRKS
+#define _SND_SOC_ACPI_AMD_SDCA_QUIRKS
+
+bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg);
+
+#endif
-- 
2.45.2
Re: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
Posted by Mark Brown 3 weeks, 4 days ago
On Sat, 10 Jan 2026 12:14:14 +0530, Vijendar Mukunda wrote:
> Add a filter to skip the RT172 VB configuration if a SmartMic Function
> is not found in the SDCA descriptors.
> 
> If the ACPI information is incorrect this can only be quirked further
> with DMI information.
> 
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
      commit: e7c30ac379b429d439eb62ae1bb69720a6701e26

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Re: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
Posted by kernel test robot 3 weeks, 4 days ago
Hi Vijendar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on next-20260113]
[cannot apply to linus/master v6.16-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Vijendar-Mukunda/ASoC-amd-acp-soc-acpi-add-is_device_rt712_vb-helper/20260110-144723
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20260110064505.1485927-1-Vijendar.Mukunda%40amd.com
patch subject: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
config: x86_64-kismet-CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS-CONFIG_SND_SOC_ACPI_AMD_MATCH-0-0 (https://download.01.org/0day-ci/archive/20260113/202601131155.RXGj4KHv-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20260113/202601131155.RXGj4KHv-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601131155.RXGj4KHv-lkp@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for SND_SOC_ACPI_AMD_SDCA_QUIRKS when selected by SND_SOC_ACPI_AMD_MATCH
   WARNING: unmet direct dependencies detected for SND_SOC_ACPI_AMD_SDCA_QUIRKS
     Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && ACPI [=y] && SND_SOC_SDCA [=n]
     Selected by [y]:
     - SND_SOC_ACPI_AMD_MATCH [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y]

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
Posted by Mukunda,Vijendar 3 weeks, 4 days ago
On 13/01/26 15:55, kernel test robot wrote:
> Hi Vijendar,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on broonie-sound/for-next]
> [also build test WARNING on next-20260113]
> [cannot apply to linus/master v6.16-rc1]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Vijendar-Mukunda/ASoC-amd-acp-soc-acpi-add-is_device_rt712_vb-helper/20260110-144723
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
> patch link:    https://lore.kernel.org/r/20260110064505.1485927-1-Vijendar.Mukunda%40amd.com
> patch subject: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
> config: x86_64-kismet-CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS-CONFIG_SND_SOC_ACPI_AMD_MATCH-0-0 (https://download.01.org/0day-ci/archive/20260113/202601131155.RXGj4KHv-lkp@intel.com/config)
> reproduce: (https://download.01.org/0day-ci/archive/20260113/202601131155.RXGj4KHv-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202601131155.RXGj4KHv-lkp@intel.com/
>
> kismet warnings: (new ones prefixed by >>)
>>> kismet: WARNING: unmet direct dependencies detected for SND_SOC_ACPI_AMD_SDCA_QUIRKS when selected by SND_SOC_ACPI_AMD_MATCH
Will check this issue.
>    WARNING: unmet direct dependencies detected for SND_SOC_ACPI_AMD_SDCA_QUIRKS
>      Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && ACPI [=y] && SND_SOC_SDCA [=n]
>      Selected by [y]:
>      - SND_SOC_ACPI_AMD_MATCH [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y]
>
Re: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
Posted by Mario Limonciello 3 weeks, 6 days ago

On 1/10/2026 12:44 AM, Vijendar Mukunda wrote:
> Add a filter to skip the RT172 VB configuration if a SmartMic Function
> is not found in the SDCA descriptors.
> 
> If the ACPI information is incorrect this can only be quirked further
> with DMI information.
> 
> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> ---
>   sound/soc/amd/acp/Kconfig                    |  6 +++
>   sound/soc/amd/acp/Makefile                   |  2 +
>   sound/soc/amd/acp/amd-acp70-acpi-match.c     | 50 ++++++++++++++++++++
>   sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c | 42 ++++++++++++++++
>   sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 14 ++++++
>   5 files changed, 114 insertions(+)
>   create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>   create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
> 
> diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
> index c2a60bc80ee6..ed2fa055f7f6 100644
> --- a/sound/soc/amd/acp/Kconfig
> +++ b/sound/soc/amd/acp/Kconfig
> @@ -15,8 +15,14 @@ config SND_SOC_AMD_ACP_COMMON
>   
>   config SND_SOC_ACPI_AMD_MATCH
>   	tristate
> +	select SND_SOC_ACPI_AMD_SDCA_QUIRKS
>   	select SND_SOC_ACPI if ACPI
>   
> +config SND_SOC_ACPI_AMD_SDCA_QUIRKS
> +	tristate
> +	depends on ACPI
> +	depends on SND_SOC_SDCA

Does this need a description?

> +
>   if SND_SOC_AMD_ACP_COMMON
>   
>   config SND_SOC_AMD_ACP_PDM
> diff --git a/sound/soc/amd/acp/Makefile b/sound/soc/amd/acp/Makefile
> index 08220b9a3802..81d23aded348 100644
> --- a/sound/soc/amd/acp/Makefile
> +++ b/sound/soc/amd/acp/Makefile
> @@ -27,6 +27,7 @@ snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o amd-acp70-acpi-match.o
>   snd-acp-sdw-mach-y     := acp-sdw-mach-common.o
>   snd-acp-sdw-sof-mach-y += acp-sdw-sof-mach.o
>   snd-acp-sdw-legacy-mach-y += acp-sdw-legacy-mach.o
> +snd-soc-acpi-amd-sdca-quirks-y += soc-acpi-amd-sdca-quirks.o
>   
>   obj-$(CONFIG_SND_SOC_AMD_ACP_PCM) += snd-acp-pcm.o
>   obj-$(CONFIG_SND_SOC_AMD_ACP_I2S) += snd-acp-i2s.o
> @@ -40,6 +41,7 @@ obj-$(CONFIG_SND_AMD_ASOC_REMBRANDT) += snd-acp-rembrandt.o
>   obj-$(CONFIG_SND_AMD_ASOC_ACP63) += snd-acp63.o
>   obj-$(CONFIG_SND_AMD_ASOC_ACP70) += snd-acp70.o
>   
> +obj-$(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS) += snd-soc-acpi-amd-sdca-quirks.o
>   obj-$(CONFIG_SND_AMD_SOUNDWIRE_ACPI) += snd-amd-sdw-acpi.o
>   obj-$(CONFIG_SND_SOC_AMD_MACH_COMMON) += snd-acp-mach.o
>   obj-$(CONFIG_SND_SOC_AMD_LEGACY_MACH) += snd-acp-legacy-mach.o
> diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c b/sound/soc/amd/acp/amd-acp70-acpi-match.c
> index 871b4f054a84..fa39f18578ca 100644
> --- a/sound/soc/amd/acp/amd-acp70-acpi-match.c
> +++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c
> @@ -7,6 +7,7 @@
>    */
>   
>   #include <sound/soc-acpi.h>
> +#include "soc-acpi-amd-sdca-quirks.h"
>   #include "../mach-config.h"
>   
>   static const struct snd_soc_acpi_endpoint single_endpoint = {
> @@ -44,6 +45,39 @@ static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
>   	.group_id = 1
>   };
>   
> +static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints[] = {
> +	/* Jack Endpoint */
> +	{
> +		.num = 0,
> +		.aggregated = 0,
> +		.group_position = 0,
> +		.group_id = 0,
> +	},
> +	/* Amp Endpoint, work as spk_l_endpoint */
> +	{
> +		.num = 1,
> +		.aggregated = 1,
> +		.group_position = 0,
> +		.group_id = 1,
> +	},
> +	/* DMIC Endpoint */
> +	{
> +		.num = 2,
> +		.aggregated = 0,
> +		.group_position = 0,
> +		.group_id = 0,
> +	},
> +};
> +
> +static const struct snd_soc_acpi_adr_device rt712_vb_1_group1_adr[] = {
> +	{
> +		.adr = 0x000130025D071201ull,
> +		.num_endpoints = ARRAY_SIZE(jack_amp_g1_dmic_endpoints),
> +		.endpoints = jack_amp_g1_dmic_endpoints,
> +		.name_prefix = "rt712"
> +	}
> +};
> +
>   static const struct snd_soc_acpi_adr_device rt711_rt1316_group_adr[] = {
>   	{
>   		.adr = 0x000030025D071101ull,
> @@ -254,6 +288,15 @@ static const struct snd_soc_acpi_link_adr acp70_cs35l56x4_l1[] = {
>   	{}
>   };
>   
> +static const struct snd_soc_acpi_link_adr acp70_alc712_vb_l1[] = {
> +	{
> +		.mask = BIT(1),
> +		.num_adr = ARRAY_SIZE(rt712_vb_1_group1_adr),
> +		.adr_d = rt712_vb_1_group1_adr,
> +	},
> +	{}
> +};
> +
>   static const struct snd_soc_acpi_link_adr acp70_rt722_only[] = {
>   	{
>   		.mask = BIT(0),
> @@ -308,6 +351,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = {
>   		.links = acp70_cs35l56x4_l1,
>   		.drv_name = "amd_sdw",
>   	},
> +	{
> +		.link_mask = BIT(1),
> +		.links = acp70_alc712_vb_l1,
> +		.machine_check = snd_soc_acpi_amd_sdca_is_device_rt712_vb,
> +		.drv_name = "amd_sdw",
> +	},
>   	{},
>   };
>   EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sdw_machines);
> @@ -327,3 +376,4 @@ EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sof_sdw_machines);
>   MODULE_DESCRIPTION("AMD ACP7.0 & ACP7.1 tables and support for ACPI enumeration");
>   MODULE_LICENSE("GPL");
>   MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
> +MODULE_IMPORT_NS("SND_SOC_ACPI_AMD_SDCA_QUIRKS");
> diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
> new file mode 100644
> index 000000000000..63bf9e3c0ae1
> --- /dev/null
> +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
> @@ -0,0 +1,42 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * soc-acpi-amd-sdca-quirks.c - tables and support for SDCA quirks
> + *
> + * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.

2026 now

> + *
> + */
> +
> +#include <linux/soundwire/sdw_amd.h>
> +#include <sound/sdca.h>
> +#include <sound/soc-acpi.h>
> +#include "soc-acpi-amd-sdca-quirks.h"
> +
> +/*
> + * Pretend machine quirk. The argument type is not the traditional
> + * 'struct snd_soc_acpi_mach' pointer but instead the sdw_amd_ctx
> + * which contains the peripheral information required for the
> + * SoundWire/SDCA filter on the SMART_MIC setup and interface
> + * revision. When the return value is false, the entry in the
> + * 'snd_soc_acpi_mach' table needs to be skipped.
> + */
> +bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg)
> +{
> +	struct sdw_amd_ctx *ctx = arg;
> +	int i;
> +
> +	if (!ctx)
> +		return false;
> +
> +	for (i = 0; i < ctx->peripherals->num_peripherals; i++) {
> +		if (sdca_device_quirk_match(ctx->peripherals->array[i],
> +					    SDCA_QUIRKS_RT712_VB))
> +			return true;
> +	}
> +
> +	return false;
> +}
> +EXPORT_SYMBOL_NS(snd_soc_acpi_amd_sdca_is_device_rt712_vb, "SND_SOC_ACPI_AMD_SDCA_QUIRKS");
> +
> +MODULE_DESCRIPTION("ASoC ACPI AMD SDCA quirks");
> +MODULE_LICENSE("GPL");
> +MODULE_IMPORT_NS("SND_SOC_SDCA");
> diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
> new file mode 100644
> index 000000000000..7e345a236da1
> --- /dev/null
> +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
> @@ -0,0 +1,14 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * soc-acpi-amd-sdca-quirks.h - tables and support for SDCA quirks
> + *
> + * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.

2026


> + *
> + */
> +
> +#ifndef _SND_SOC_ACPI_AMD_SDCA_QUIRKS
> +#define _SND_SOC_ACPI_AMD_SDCA_QUIRKS
> +
> +bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg);
> +
> +#endif
Re: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
Posted by Mukunda,Vijendar 3 weeks, 5 days ago
On 11/01/26 04:17, Mario Limonciello wrote:
>
>
> On 1/10/2026 12:44 AM, Vijendar Mukunda wrote:
>> Add a filter to skip the RT172 VB configuration if a SmartMic Function
>> is not found in the SDCA descriptors.
>>
>> If the ACPI information is incorrect this can only be quirked further
>> with DMI information.
>>
>> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
>> ---
>>   sound/soc/amd/acp/Kconfig                    |  6 +++
>>   sound/soc/amd/acp/Makefile                   |  2 +
>>   sound/soc/amd/acp/amd-acp70-acpi-match.c     | 50 ++++++++++++++++++++
>>   sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c | 42 ++++++++++++++++
>>   sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 14 ++++++
>>   5 files changed, 114 insertions(+)
>>   create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>>   create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>>
>> diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
>> index c2a60bc80ee6..ed2fa055f7f6 100644
>> --- a/sound/soc/amd/acp/Kconfig
>> +++ b/sound/soc/amd/acp/Kconfig
>> @@ -15,8 +15,14 @@ config SND_SOC_AMD_ACP_COMMON
>>     config SND_SOC_ACPI_AMD_MATCH
>>       tristate
>> +    select SND_SOC_ACPI_AMD_SDCA_QUIRKS
>>       select SND_SOC_ACPI if ACPI
>>   +config SND_SOC_ACPI_AMD_SDCA_QUIRKS
>> +    tristate
>> +    depends on ACPI
>> +    depends on SND_SOC_SDCA
>
> Does this need a description? 
Not required. This Config is not directly populated where user can go and select.
>
>> +
>>   if SND_SOC_AMD_ACP_COMMON
>>     config SND_SOC_AMD_ACP_PDM
>> diff --git a/sound/soc/amd/acp/Makefile b/sound/soc/amd/acp/Makefile
>> index 08220b9a3802..81d23aded348 100644
>> --- a/sound/soc/amd/acp/Makefile
>> +++ b/sound/soc/amd/acp/Makefile
>> @@ -27,6 +27,7 @@ snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o
>> amd-acp70-acpi-match.o
>>   snd-acp-sdw-mach-y     := acp-sdw-mach-common.o
>>   snd-acp-sdw-sof-mach-y += acp-sdw-sof-mach.o
>>   snd-acp-sdw-legacy-mach-y += acp-sdw-legacy-mach.o
>> +snd-soc-acpi-amd-sdca-quirks-y += soc-acpi-amd-sdca-quirks.o
>>     obj-$(CONFIG_SND_SOC_AMD_ACP_PCM) += snd-acp-pcm.o
>>   obj-$(CONFIG_SND_SOC_AMD_ACP_I2S) += snd-acp-i2s.o
>> @@ -40,6 +41,7 @@ obj-$(CONFIG_SND_AMD_ASOC_REMBRANDT) += snd-acp-rembrandt.o
>>   obj-$(CONFIG_SND_AMD_ASOC_ACP63) += snd-acp63.o
>>   obj-$(CONFIG_SND_AMD_ASOC_ACP70) += snd-acp70.o
>>   +obj-$(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS) += snd-soc-acpi-amd-sdca-quirks.o
>>   obj-$(CONFIG_SND_AMD_SOUNDWIRE_ACPI) += snd-amd-sdw-acpi.o
>>   obj-$(CONFIG_SND_SOC_AMD_MACH_COMMON) += snd-acp-mach.o
>>   obj-$(CONFIG_SND_SOC_AMD_LEGACY_MACH) += snd-acp-legacy-mach.o
>> diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c
>> b/sound/soc/amd/acp/amd-acp70-acpi-match.c
>> index 871b4f054a84..fa39f18578ca 100644
>> --- a/sound/soc/amd/acp/amd-acp70-acpi-match.c
>> +++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c
>> @@ -7,6 +7,7 @@
>>    */
>>     #include <sound/soc-acpi.h>
>> +#include "soc-acpi-amd-sdca-quirks.h"
>>   #include "../mach-config.h"
>>     static const struct snd_soc_acpi_endpoint single_endpoint = {
>> @@ -44,6 +45,39 @@ static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
>>       .group_id = 1
>>   };
>>   +static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints[] = {
>> +    /* Jack Endpoint */
>> +    {
>> +        .num = 0,
>> +        .aggregated = 0,
>> +        .group_position = 0,
>> +        .group_id = 0,
>> +    },
>> +    /* Amp Endpoint, work as spk_l_endpoint */
>> +    {
>> +        .num = 1,
>> +        .aggregated = 1,
>> +        .group_position = 0,
>> +        .group_id = 1,
>> +    },
>> +    /* DMIC Endpoint */
>> +    {
>> +        .num = 2,
>> +        .aggregated = 0,
>> +        .group_position = 0,
>> +        .group_id = 0,
>> +    },
>> +};
>> +
>> +static const struct snd_soc_acpi_adr_device rt712_vb_1_group1_adr[] = {
>> +    {
>> +        .adr = 0x000130025D071201ull,
>> +        .num_endpoints = ARRAY_SIZE(jack_amp_g1_dmic_endpoints),
>> +        .endpoints = jack_amp_g1_dmic_endpoints,
>> +        .name_prefix = "rt712"
>> +    }
>> +};
>> +
>>   static const struct snd_soc_acpi_adr_device rt711_rt1316_group_adr[] = {
>>       {
>>           .adr = 0x000030025D071101ull,
>> @@ -254,6 +288,15 @@ static const struct snd_soc_acpi_link_adr
>> acp70_cs35l56x4_l1[] = {
>>       {}
>>   };
>>   +static const struct snd_soc_acpi_link_adr acp70_alc712_vb_l1[] = {
>> +    {
>> +        .mask = BIT(1),
>> +        .num_adr = ARRAY_SIZE(rt712_vb_1_group1_adr),
>> +        .adr_d = rt712_vb_1_group1_adr,
>> +    },
>> +    {}
>> +};
>> +
>>   static const struct snd_soc_acpi_link_adr acp70_rt722_only[] = {
>>       {
>>           .mask = BIT(0),
>> @@ -308,6 +351,12 @@ struct snd_soc_acpi_mach
>> snd_soc_acpi_amd_acp70_sdw_machines[] = {
>>           .links = acp70_cs35l56x4_l1,
>>           .drv_name = "amd_sdw",
>>       },
>> +    {
>> +        .link_mask = BIT(1),
>> +        .links = acp70_alc712_vb_l1,
>> +        .machine_check = snd_soc_acpi_amd_sdca_is_device_rt712_vb,
>> +        .drv_name = "amd_sdw",
>> +    },
>>       {},
>>   };
>>   EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sdw_machines);
>> @@ -327,3 +376,4 @@ EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sof_sdw_machines);
>>   MODULE_DESCRIPTION("AMD ACP7.0 & ACP7.1 tables and support for ACPI
>> enumeration");
>>   MODULE_LICENSE("GPL");
>>   MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
>> +MODULE_IMPORT_NS("SND_SOC_ACPI_AMD_SDCA_QUIRKS");
>> diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>> b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>> new file mode 100644
>> index 000000000000..63bf9e3c0ae1
>> --- /dev/null
>> +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>> @@ -0,0 +1,42 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * soc-acpi-amd-sdca-quirks.c - tables and support for SDCA quirks
>> + *
>> + * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.
>
> 2026 now 
 This patch was implemented and posted as a PR in SOF GitHub last month.
That's why the year was mentioned as 2025.
>
>> + *
>> + */
>> +
>> +#include <linux/soundwire/sdw_amd.h>
>> +#include <sound/sdca.h>
>> +#include <sound/soc-acpi.h>
>> +#include "soc-acpi-amd-sdca-quirks.h"
>> +
>> +/*
>> + * Pretend machine quirk. The argument type is not the traditional
>> + * 'struct snd_soc_acpi_mach' pointer but instead the sdw_amd_ctx
>> + * which contains the peripheral information required for the
>> + * SoundWire/SDCA filter on the SMART_MIC setup and interface
>> + * revision. When the return value is false, the entry in the
>> + * 'snd_soc_acpi_mach' table needs to be skipped.
>> + */
>> +bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg)
>> +{
>> +    struct sdw_amd_ctx *ctx = arg;
>> +    int i;
>> +
>> +    if (!ctx)
>> +        return false;
>> +
>> +    for (i = 0; i < ctx->peripherals->num_peripherals; i++) {
>> +        if (sdca_device_quirk_match(ctx->peripherals->array[i],
>> +                        SDCA_QUIRKS_RT712_VB))
>> +            return true;
>> +    }
>> +
>> +    return false;
>> +}
>> +EXPORT_SYMBOL_NS(snd_soc_acpi_amd_sdca_is_device_rt712_vb,
>> "SND_SOC_ACPI_AMD_SDCA_QUIRKS");
>> +
>> +MODULE_DESCRIPTION("ASoC ACPI AMD SDCA quirks");
>> +MODULE_LICENSE("GPL");
>> +MODULE_IMPORT_NS("SND_SOC_SDCA");
>> diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>> b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>> new file mode 100644
>> index 000000000000..7e345a236da1
>> --- /dev/null
>> +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>> @@ -0,0 +1,14 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +/*
>> + * soc-acpi-amd-sdca-quirks.h - tables and support for SDCA quirks
>> + *
>> + * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.
>
> 2026
>
>
>> + *
>> + */
>> +
>> +#ifndef _SND_SOC_ACPI_AMD_SDCA_QUIRKS
>> +#define _SND_SOC_ACPI_AMD_SDCA_QUIRKS
>> +
>> +bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg);
>> +
>> +#endif
>

Re: [PATCH] ASoC: amd: acp: soc-acpi: add is_device_rt712_vb() helper
Posted by Mario Limonciello 3 weeks, 5 days ago
On 1/11/26 11:52 PM, Mukunda,Vijendar wrote:
> On 11/01/26 04:17, Mario Limonciello wrote:
>>
>>
>> On 1/10/2026 12:44 AM, Vijendar Mukunda wrote:
>>> Add a filter to skip the RT172 VB configuration if a SmartMic Function
>>> is not found in the SDCA descriptors.
>>>
>>> If the ACPI information is incorrect this can only be quirked further
>>> with DMI information.
>>>
>>> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>

Thanks for the comments below, no remaining concerns by me.

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

>>> ---
>>>    sound/soc/amd/acp/Kconfig                    |  6 +++
>>>    sound/soc/amd/acp/Makefile                   |  2 +
>>>    sound/soc/amd/acp/amd-acp70-acpi-match.c     | 50 ++++++++++++++++++++
>>>    sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c | 42 ++++++++++++++++
>>>    sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 14 ++++++
>>>    5 files changed, 114 insertions(+)
>>>    create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>>>    create mode 100644 sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>>>
>>> diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
>>> index c2a60bc80ee6..ed2fa055f7f6 100644
>>> --- a/sound/soc/amd/acp/Kconfig
>>> +++ b/sound/soc/amd/acp/Kconfig
>>> @@ -15,8 +15,14 @@ config SND_SOC_AMD_ACP_COMMON
>>>      config SND_SOC_ACPI_AMD_MATCH
>>>        tristate
>>> +    select SND_SOC_ACPI_AMD_SDCA_QUIRKS
>>>        select SND_SOC_ACPI if ACPI
>>>    +config SND_SOC_ACPI_AMD_SDCA_QUIRKS
>>> +    tristate
>>> +    depends on ACPI
>>> +    depends on SND_SOC_SDCA
>>
>> Does this need a description?
> Not required. This Config is not directly populated where user can go and select.
>>
>>> +
>>>    if SND_SOC_AMD_ACP_COMMON
>>>      config SND_SOC_AMD_ACP_PDM
>>> diff --git a/sound/soc/amd/acp/Makefile b/sound/soc/amd/acp/Makefile
>>> index 08220b9a3802..81d23aded348 100644
>>> --- a/sound/soc/amd/acp/Makefile
>>> +++ b/sound/soc/amd/acp/Makefile
>>> @@ -27,6 +27,7 @@ snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o
>>> amd-acp70-acpi-match.o
>>>    snd-acp-sdw-mach-y     := acp-sdw-mach-common.o
>>>    snd-acp-sdw-sof-mach-y += acp-sdw-sof-mach.o
>>>    snd-acp-sdw-legacy-mach-y += acp-sdw-legacy-mach.o
>>> +snd-soc-acpi-amd-sdca-quirks-y += soc-acpi-amd-sdca-quirks.o
>>>      obj-$(CONFIG_SND_SOC_AMD_ACP_PCM) += snd-acp-pcm.o
>>>    obj-$(CONFIG_SND_SOC_AMD_ACP_I2S) += snd-acp-i2s.o
>>> @@ -40,6 +41,7 @@ obj-$(CONFIG_SND_AMD_ASOC_REMBRANDT) += snd-acp-rembrandt.o
>>>    obj-$(CONFIG_SND_AMD_ASOC_ACP63) += snd-acp63.o
>>>    obj-$(CONFIG_SND_AMD_ASOC_ACP70) += snd-acp70.o
>>>    +obj-$(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS) += snd-soc-acpi-amd-sdca-quirks.o
>>>    obj-$(CONFIG_SND_AMD_SOUNDWIRE_ACPI) += snd-amd-sdw-acpi.o
>>>    obj-$(CONFIG_SND_SOC_AMD_MACH_COMMON) += snd-acp-mach.o
>>>    obj-$(CONFIG_SND_SOC_AMD_LEGACY_MACH) += snd-acp-legacy-mach.o
>>> diff --git a/sound/soc/amd/acp/amd-acp70-acpi-match.c
>>> b/sound/soc/amd/acp/amd-acp70-acpi-match.c
>>> index 871b4f054a84..fa39f18578ca 100644
>>> --- a/sound/soc/amd/acp/amd-acp70-acpi-match.c
>>> +++ b/sound/soc/amd/acp/amd-acp70-acpi-match.c
>>> @@ -7,6 +7,7 @@
>>>     */
>>>      #include <sound/soc-acpi.h>
>>> +#include "soc-acpi-amd-sdca-quirks.h"
>>>    #include "../mach-config.h"
>>>      static const struct snd_soc_acpi_endpoint single_endpoint = {
>>> @@ -44,6 +45,39 @@ static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
>>>        .group_id = 1
>>>    };
>>>    +static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints[] = {
>>> +    /* Jack Endpoint */
>>> +    {
>>> +        .num = 0,
>>> +        .aggregated = 0,
>>> +        .group_position = 0,
>>> +        .group_id = 0,
>>> +    },
>>> +    /* Amp Endpoint, work as spk_l_endpoint */
>>> +    {
>>> +        .num = 1,
>>> +        .aggregated = 1,
>>> +        .group_position = 0,
>>> +        .group_id = 1,
>>> +    },
>>> +    /* DMIC Endpoint */
>>> +    {
>>> +        .num = 2,
>>> +        .aggregated = 0,
>>> +        .group_position = 0,
>>> +        .group_id = 0,
>>> +    },
>>> +};
>>> +
>>> +static const struct snd_soc_acpi_adr_device rt712_vb_1_group1_adr[] = {
>>> +    {
>>> +        .adr = 0x000130025D071201ull,
>>> +        .num_endpoints = ARRAY_SIZE(jack_amp_g1_dmic_endpoints),
>>> +        .endpoints = jack_amp_g1_dmic_endpoints,
>>> +        .name_prefix = "rt712"
>>> +    }
>>> +};
>>> +
>>>    static const struct snd_soc_acpi_adr_device rt711_rt1316_group_adr[] = {
>>>        {
>>>            .adr = 0x000030025D071101ull,
>>> @@ -254,6 +288,15 @@ static const struct snd_soc_acpi_link_adr
>>> acp70_cs35l56x4_l1[] = {
>>>        {}
>>>    };
>>>    +static const struct snd_soc_acpi_link_adr acp70_alc712_vb_l1[] = {
>>> +    {
>>> +        .mask = BIT(1),
>>> +        .num_adr = ARRAY_SIZE(rt712_vb_1_group1_adr),
>>> +        .adr_d = rt712_vb_1_group1_adr,
>>> +    },
>>> +    {}
>>> +};
>>> +
>>>    static const struct snd_soc_acpi_link_adr acp70_rt722_only[] = {
>>>        {
>>>            .mask = BIT(0),
>>> @@ -308,6 +351,12 @@ struct snd_soc_acpi_mach
>>> snd_soc_acpi_amd_acp70_sdw_machines[] = {
>>>            .links = acp70_cs35l56x4_l1,
>>>            .drv_name = "amd_sdw",
>>>        },
>>> +    {
>>> +        .link_mask = BIT(1),
>>> +        .links = acp70_alc712_vb_l1,
>>> +        .machine_check = snd_soc_acpi_amd_sdca_is_device_rt712_vb,
>>> +        .drv_name = "amd_sdw",
>>> +    },
>>>        {},
>>>    };
>>>    EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sdw_machines);
>>> @@ -327,3 +376,4 @@ EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sof_sdw_machines);
>>>    MODULE_DESCRIPTION("AMD ACP7.0 & ACP7.1 tables and support for ACPI
>>> enumeration");
>>>    MODULE_LICENSE("GPL");
>>>    MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
>>> +MODULE_IMPORT_NS("SND_SOC_ACPI_AMD_SDCA_QUIRKS");
>>> diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>>> b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>>> new file mode 100644
>>> index 000000000000..63bf9e3c0ae1
>>> --- /dev/null
>>> +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.c
>>> @@ -0,0 +1,42 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only
>>> +/*
>>> + * soc-acpi-amd-sdca-quirks.c - tables and support for SDCA quirks
>>> + *
>>> + * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.
>>
>> 2026 now
>   This patch was implemented and posted as a PR in SOF GitHub last month.
> That's why the year was mentioned as 2025.
>>
>>> + *
>>> + */
>>> +
>>> +#include <linux/soundwire/sdw_amd.h>
>>> +#include <sound/sdca.h>
>>> +#include <sound/soc-acpi.h>
>>> +#include "soc-acpi-amd-sdca-quirks.h"
>>> +
>>> +/*
>>> + * Pretend machine quirk. The argument type is not the traditional
>>> + * 'struct snd_soc_acpi_mach' pointer but instead the sdw_amd_ctx
>>> + * which contains the peripheral information required for the
>>> + * SoundWire/SDCA filter on the SMART_MIC setup and interface
>>> + * revision. When the return value is false, the entry in the
>>> + * 'snd_soc_acpi_mach' table needs to be skipped.
>>> + */
>>> +bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg)
>>> +{
>>> +    struct sdw_amd_ctx *ctx = arg;
>>> +    int i;
>>> +
>>> +    if (!ctx)
>>> +        return false;
>>> +
>>> +    for (i = 0; i < ctx->peripherals->num_peripherals; i++) {
>>> +        if (sdca_device_quirk_match(ctx->peripherals->array[i],
>>> +                        SDCA_QUIRKS_RT712_VB))
>>> +            return true;
>>> +    }
>>> +
>>> +    return false;
>>> +}
>>> +EXPORT_SYMBOL_NS(snd_soc_acpi_amd_sdca_is_device_rt712_vb,
>>> "SND_SOC_ACPI_AMD_SDCA_QUIRKS");
>>> +
>>> +MODULE_DESCRIPTION("ASoC ACPI AMD SDCA quirks");
>>> +MODULE_LICENSE("GPL");
>>> +MODULE_IMPORT_NS("SND_SOC_SDCA");
>>> diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>>> b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>>> new file mode 100644
>>> index 000000000000..7e345a236da1
>>> --- /dev/null
>>> +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h
>>> @@ -0,0 +1,14 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +/*
>>> + * soc-acpi-amd-sdca-quirks.h - tables and support for SDCA quirks
>>> + *
>>> + * Copyright(c) 2025 Advanced Micro Devices, Inc. All rights reserved.
>>
>> 2026
>>
>>
>>> + *
>>> + */
>>> +
>>> +#ifndef _SND_SOC_ACPI_AMD_SDCA_QUIRKS
>>> +#define _SND_SOC_ACPI_AMD_SDCA_QUIRKS
>>> +
>>> +bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg);
>>> +
>>> +#endif
>>
>