From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <broonie@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <lgirdwood@gmail.com>,
<yung-chuan.liao@linux.intel.com>,
<pierre-louis.bossart@linux.dev>, <perex@perex.cz>,
<tiwai@suse.com>, <Basavaraj.Hiregoudar@amd.com>,
<Sunil-kumar.Dommati@amd.com>, <venkataprasad.potturu@amd.com>,
<mario.limonciello@amd.com>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<sound-open-firmware@alsa-project.org>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Subject: [PATCH 15/16] ASoC: SOF: amd: add ACP7x I2S DAI type and topology support
Date: Wed, 1 Jul 2026 15:25:16 +0530 [thread overview]
Message-ID: <20260701095759.1012929-16-Vijendar.Mukunda@amd.com> (raw)
In-Reply-To: <20260701095759.1012929-1-Vijendar.Mukunda@amd.com>
Add SOF_DAI_AMD_I2S DAI type for ACP7.B/7.F I2S/TDM interfaces.
Register the ACPTDM topology DAI name and map it to SOF_DAI_AMD_I2S;
IPC3 continues to parse ACP I2S link parameters through SOF_ACPI2S_TOKENS
(including the format token from the prior commit), not a new token
group named after ACPTDM. Add sof_link_acp_i2s_load() and the
SOF_DAI_AMD_I2S PCM dai link fixup path.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
include/sound/sof/dai.h | 2 ++
sound/soc/sof/ipc3-pcm.c | 6 ++++++
sound/soc/sof/ipc3-topology.c | 32 ++++++++++++++++++++++++++++++++
sound/soc/sof/topology.c | 3 ++-
4 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/include/sound/sof/dai.h b/include/sound/sof/dai.h
index 0b6a6ba6489a..e3fe492e78f5 100644
--- a/include/sound/sof/dai.h
+++ b/include/sound/sof/dai.h
@@ -91,6 +91,7 @@ enum sof_ipc_dai_type {
SOF_DAI_IMX_MICFIL, /** < i.MX MICFIL PDM */
SOF_DAI_AMD_SDW, /**< AMD ACP SDW */
SOF_DAI_INTEL_UAOL, /**< Intel UAOL */
+ SOF_DAI_AMD_I2S, /**< AMD ACP I2S */
};
/* general purpose DAI configuration */
@@ -122,6 +123,7 @@ struct sof_ipc_dai_config {
struct sof_ipc_dai_mtk_afe_params afe;
struct sof_ipc_dai_micfil_params micfil;
struct sof_ipc_dai_acp_sdw_params acp_sdw;
+ struct sof_ipc_dai_acp_params acp_i2s;
};
} __packed;
diff --git a/sound/soc/sof/ipc3-pcm.c b/sound/soc/sof/ipc3-pcm.c
index 90ef5d99f626..143bf0fe8dd9 100644
--- a/sound/soc/sof/ipc3-pcm.c
+++ b/sound/soc/sof/ipc3-pcm.c
@@ -421,6 +421,12 @@ static int sof_ipc3_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
dev_dbg(component->dev, "AMD_SDW channels_min: %d channels_max: %d\n",
channels->min, channels->max);
break;
+ case SOF_DAI_AMD_I2S:
+ rate->min = private->dai_config->acp_i2s.fsync_rate;
+ rate->max = private->dai_config->acp_i2s.fsync_rate;
+ channels->min = private->dai_config->acp_i2s.tdm_slots;
+ channels->max = private->dai_config->acp_i2s.tdm_slots;
+ break;
default:
dev_err(component->dev, "Invalid DAI type %d\n", private->dai_config->type);
break;
diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c
index 9eb8335a3c07..26d85ca9be26 100644
--- a/sound/soc/sof/ipc3-topology.c
+++ b/sound/soc/sof/ipc3-topology.c
@@ -1368,6 +1368,35 @@ static int sof_link_acp_sdw_load(struct snd_soc_component *scomp, struct snd_sof
return 0;
}
+static int sof_link_acp_i2s_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink,
+ struct sof_ipc_dai_config *config, struct snd_sof_dai *dai)
+{
+ struct snd_soc_tplg_hw_config *hw_config = slink->hw_configs;
+ struct sof_dai_private_data *private = dai->private;
+ u32 size = sizeof(*config);
+ int ret;
+
+ /* handle master/slave and inverted clocks */
+ sof_dai_set_format(hw_config, config);
+
+ /* init IPC */
+ memset(&config->acp_i2s, 0, sizeof(config->acp_i2s));
+ config->hdr.size = size;
+
+ ret = sof_update_ipc_object(scomp, &config->acp_i2s, SOF_ACPI2S_TOKENS, slink->tuples,
+ slink->num_tuples, size, slink->num_hw_configs);
+ if (ret < 0)
+ return ret;
+
+ dai->number_configs = 1;
+ dai->current_config = 0;
+ private->dai_config = kmemdup(config, size, GFP_KERNEL);
+ if (!private->dai_config)
+ return -ENOMEM;
+
+ return 0;
+}
+
static int sof_link_afe_load(struct snd_soc_component *scomp, struct snd_sof_dai_link *slink,
struct sof_ipc_dai_config *config, struct snd_sof_dai *dai)
{
@@ -1697,6 +1726,9 @@ static int sof_ipc3_widget_setup_comp_dai(struct snd_sof_widget *swidget)
case SOF_DAI_AMD_SDW:
ret = sof_link_acp_sdw_load(scomp, slink, config, dai);
break;
+ case SOF_DAI_AMD_I2S:
+ ret = sof_link_acp_i2s_load(scomp, slink, config, dai);
+ break;
default:
break;
}
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index f709935593ef..92a1005a4ebb 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -309,7 +309,7 @@ static const struct sof_dai_types sof_dais[] = {
{"ACPHS_VIRTUAL", SOF_DAI_AMD_HS_VIRTUAL},
{"MICFIL", SOF_DAI_IMX_MICFIL},
{"ACP_SDW", SOF_DAI_AMD_SDW},
-
+ {"ACPTDM", SOF_DAI_AMD_I2S},
};
static enum sof_ipc_dai_type find_dai(const char *name)
@@ -1994,6 +1994,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, struct snd_
case SOF_DAI_AMD_HS:
case SOF_DAI_AMD_SP_VIRTUAL:
case SOF_DAI_AMD_HS_VIRTUAL:
+ case SOF_DAI_AMD_I2S:
token_id = SOF_ACPI2S_TOKENS;
num_tuples += token_list[SOF_ACPI2S_TOKENS].count;
break;
--
2.45.2
next prev parent reply other threads:[~2026-07-01 9:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 9:55 [PATCH 00/16] ASoC: SOF: amd: add support for ACP7.B/7.F platforms Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 01/16] ASoC: amd: acp: add ACPI machine table for ACP7.B/7.F SOF driver Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 02/16] ASoC: SOF: amd: add base platform support for ACP7.B/7.F Vijendar Mukunda
2026-07-03 17:23 ` Julian Braha
2026-07-03 18:04 ` Mukunda,Vijendar
2026-07-01 9:55 ` [PATCH 03/16] ASoC: SOF: amd: mask ACP7x PGFSM status poll Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 04/16] ASoC: SOF: amd: refactor SW1 I2S error reason clear in acp_irq_handler Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 05/16] ASoC: SOF: amd: add ACP7x probe and remove Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 06/16] ASoC: SOF: amd: add ACP7x IRQ handler for DSP IPC Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 07/16] ASoC: SOF: amd: extend signed firmware pre-run for ACP7x Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 08/16] ASoC: SOF: amd: require full ACP header for ACP7 signed firmware Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 09/16] ASoC: SOF: amd: validate SizeFWSigned before signed FW length on ACP7x Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 10/16] ASoC: SOF: amd: add post-firmware-run delay for ACP7x Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 11/16] ASoC: SOF: amd: extend configure_and_run_sha_dma for ACPI signed FW flag Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 12/16] ASoC: SOF: amd: wire signed firmware load callback for ACP7x via ACPI Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 13/16] ASoC: SOF: amd: load ACP7.B/7.F signed data firmware to SRAM Vijendar Mukunda
2026-07-01 9:55 ` [PATCH 14/16] ASoC: SOF: amd: add ACP I2S format field and topology token Vijendar Mukunda
2026-07-01 9:55 ` Vijendar Mukunda [this message]
2026-07-01 9:55 ` [PATCH 16/16] ASoC: SOF: amd: add system and runtime PM ops for ACP7x Vijendar Mukunda
2026-07-03 16:28 ` Mark Brown
2026-07-03 16:51 ` Mukunda,Vijendar
2026-07-03 17:09 ` Mark Brown
2026-07-03 17:51 ` Mukunda,Vijendar
2026-07-03 18:02 ` Mark Brown
2026-07-03 16:40 ` [PATCH 00/16] ASoC: SOF: amd: add support for ACP7.B/7.F platforms Mark Brown
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=20260701095759.1012929-16-Vijendar.Mukunda@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.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®