* [PATCH v1] ASoC: amd: acp-legacy-mach: skip dai link for amp reference stream
@ 2026-10-06 4:23 Niranjan Holalu Yogendra
2026-10-06 14:10 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Niranjan Holalu Yogendra @ 2026-10-06 4:23 UTC (permalink / raw)
To: linux-sound
Cc: linux-kernel, broonie, ckeepax, lgirdwood, perex, tiwai,
cezary.rojewski, peter.ujfalusi, yung-chuan.liao, kai.vehmanen,
pierre-louis.bossart, baojun.xu, shenghao-ding, sandeepk,
v-hampiholi, Niranjan H Y, Vijendar Mukunda
From: Niranjan H Y <niranjan.hy@ti.com>
Amps can provide reference stream to hosts DSP which
can be used for input audio proocessing. But legacy AMD soc
doesn't support such a feature. So skip adding the dai link
for the same.
Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
Suggested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
sound/soc/amd/acp/acp-sdw-legacy-mach.c | 32 +++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
index 1a05d4288..a8b62817b 100644
--- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
@@ -265,6 +265,14 @@ static int create_sdw_dailink(struct snd_soc_card *card,
if (!soc_end->dai_info->direction[stream])
continue;
+ /*
+ * skip adding reference stream for amp type
+ * as legacy AMD doesn't use the DSP.
+ */
+ if (soc_end->dai_info->dai_type == SOC_SDW_DAI_TYPE_AMP &&
+ stream == SNDRV_PCM_STREAM_CAPTURE)
+ continue;
+
int link_num = ffs(soc_end->link_mask) - 1;
cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL,
@@ -448,6 +456,30 @@ static int soc_card_dai_links_create(struct snd_soc_card *card)
sdw_be_num = ret;
+ /*
+ * Legacy AMD has no DSP, so AMP reference capture streams are not
+ * supported. Subtract them from num_devs so create_sdw_dailink()
+ * uses the correct count directly, and decrement sdw_be_num when
+ * all capture endpoints on a DAI are AMP type.
+ */
+ for (int i = 0; i < num_ends; i++) {
+ struct asoc_sdw_dailink *d = &soc_dais[i];
+ struct asoc_sdw_endpoint *e;
+
+ if (!d->initialised)
+ break;
+ if (!d->num_devs[SNDRV_PCM_STREAM_CAPTURE])
+ continue;
+
+ list_for_each_entry(e, &d->endpoints, list) {
+ if (e->dai_info->direction[SNDRV_PCM_STREAM_CAPTURE] &&
+ e->dai_info->dai_type == SOC_SDW_DAI_TYPE_AMP)
+ d->num_devs[SNDRV_PCM_STREAM_CAPTURE]--;
+ }
+ if (!d->num_devs[SNDRV_PCM_STREAM_CAPTURE])
+ sdw_be_num--;
+ }
+
/* enable dmic */
if (soc_sdw_quirk & ASOC_SDW_ACP_DMIC)
dmic_num = 1;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] ASoC: amd: acp-legacy-mach: skip dai link for amp reference stream
2026-10-06 4:23 [PATCH v1] ASoC: amd: acp-legacy-mach: skip dai link for amp reference stream Niranjan Holalu Yogendra
@ 2026-10-06 14:10 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-10-06 14:10 UTC (permalink / raw)
To: linux-sound, Niranjan Holalu Yogendra
Cc: linux-kernel, ckeepax, lgirdwood, perex, tiwai, cezary.rojewski,
peter.ujfalusi, yung-chuan.liao, kai.vehmanen,
pierre-louis.bossart, baojun.xu, shenghao-ding, sandeepk,
v-hampiholi, Vijendar Mukunda
On Tue, 06 Oct 2026 09:53:15 +0530, Niranjan Holalu Yogendra wrote:
> ASoC: amd: acp-legacy-mach: skip dai link for amp reference stream
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/1] ASoC: amd: acp-legacy-mach: skip dai link for amp reference stream
https://git.kernel.org/broonie/sound/c/9867312e9fd2
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-07 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 4:23 [PATCH v1] ASoC: amd: acp-legacy-mach: skip dai link for amp reference stream Niranjan Holalu Yogendra
2026-10-06 14:10 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox