From: Niranjan Holalu Yogendra <niranjan.hy@ti.com>
To: <linux-sound@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <broonie@kernel.org>,
<ckeepax@opensource.cirrus.com>, <lgirdwood@gmail.com>,
<perex@perex.cz>, <tiwai@suse.com>, <cezary.rojewski@intel.com>,
<peter.ujfalusi@linux.intel.com>,
<yung-chuan.liao@linux.intel.com>, <kai.vehmanen@linux.intel.com>,
<pierre-louis.bossart@linux.dev>, <baojun.xu@ti.com>,
<shenghao-ding@ti.com>, <sandeepk@ti.com>, <v-hampiholi@ti.com>,
Niranjan H Y <niranjan.hy@ti.com>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Subject: [PATCH v1] ASoC: amd: acp-legacy-mach: skip dai link for amp reference stream
Date: Tue, 6 Oct 2026 09:53:15 +0530 [thread overview]
Message-ID: <20261006042315.1038-1-niranjan.hy@ti.com> (raw)
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
reply other threads:[~2026-10-06 4:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261006042315.1038-1-niranjan.hy@ti.com \
--to=niranjan.hy@ti.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=sandeepk@ti.com \
--cc=shenghao-ding@ti.com \
--cc=tiwai@suse.com \
--cc=v-hampiholi@ti.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®