Currently there is no mechanism to read dmic_num in mach_params
structure. In this scenario mach_params->dmic_num check always
returns 0 which fails to add component string for dmic.
Update the condition check with acp pdm dmic quirk check and
pass the dmic_num as 1.
Fixes: 2981d9b0789c ("ASoC: amd: acp: add soundwire machine driver for legacy stack")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
sound/soc/amd/acp/acp-sdw-legacy-mach.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
index 6388cd7cb28e..fa9b4b994e41 100644
--- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
@@ -535,11 +535,11 @@ static int mc_probe(struct platform_device *pdev)
" cfg-amp:%d", amp_num);
if (!card->components)
return -ENOMEM;
- if (mach->mach_params.dmic_num) {
+ if (soc_sdw_quirk & ASOC_SDW_ACP_DMIC) {
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
"%s mic:dmic cfg-mics:%d",
card->components,
- mach->mach_params.dmic_num);
+ 1);
if (!card->components)
return -ENOMEM;
}
--
2.48.1
On Mon, Mar 30, 2026 at 12:50:27PM +0530, Vijendar Mukunda wrote:
> +++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
> @@ -535,11 +535,11 @@ static int mc_probe(struct platform_device *pdev)
> " cfg-amp:%d", amp_num);
> if (!card->components)
> return -ENOMEM;
> - if (mach->mach_params.dmic_num) {
> + if (soc_sdw_quirk & ASOC_SDW_ACP_DMIC) {
soc_card_dai_links_create() (which could perhaps use better namespacing)
checks both dmic_num and the quirk. This doesn't seem properly joined
up (and perhaps the code shouldn't be as spread out as it is)?
On 30/03/26 19:13, Mark Brown wrote:
> On Mon, Mar 30, 2026 at 12:50:27PM +0530, Vijendar Mukunda wrote:
>
>> +++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
>> @@ -535,11 +535,11 @@ static int mc_probe(struct platform_device *pdev)
>> " cfg-amp:%d", amp_num);
>> if (!card->components)
>> return -ENOMEM;
>> - if (mach->mach_params.dmic_num) {
>> + if (soc_sdw_quirk & ASOC_SDW_ACP_DMIC) {
> soc_card_dai_links_create() (which could perhaps use better namespacing)
> checks both dmic_num and the quirk. This doesn't seem properly joined
> up (and perhaps the code shouldn't be as spread out as it is)?
Need to drop the mach_params->dmic_num check in soc_card_dai_links_create().
Will push a separate patch for the same.
© 2016 - 2026 Red Hat, Inc.