[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211117093734.17407-20-daniel.baluta@oss.nxp.com>
Date: Wed, 17 Nov 2021 11:37:32 +0200
From: Daniel Baluta <daniel.baluta@....nxp.com>
To: broonie@...nel.org, alsa-devel@...a-project.org
Cc: pierre-louis.bossart@...ux.intel.com, lgirdwood@...il.com,
daniel.baluta@....com, daniel.baluta@...il.com,
AjitKumar.Pandey@....com, Balakishore.pati@....com,
vsreddy@....com, Julian.Schroeder@....com,
vishnuvardhanrao.ravulapati@....com, linux-kernel@...r.kernel.org,
yc.hung@...iatek.com, linux-mediatek@...ts.infradead.org,
Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Guennadi Liakhovetski <guennadi.liakhovetski@...ux.intel.com>
Subject: [PATCH 19/21] ASoC: SOF: mediatek: Add dai driver dsp ops callback for mt8195
From: YC Hung <yc.hung@...iatek.com>
Add dsp ops callback to register AFE DL2/DL3/UL4/UL5 sof dai's with ALSA
Signed-off-by: YC Hung <yc.hung@...iatek.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@...ux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@...ux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@....com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@...ux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@....com>
---
sound/soc/sof/mediatek/mt8195/mt8195.c | 35 ++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c
index 88da6c2de070..99075598a35a 100644
--- a/sound/soc/sof/mediatek/mt8195/mt8195.c
+++ b/sound/soc/sof/mediatek/mt8195/mt8195.c
@@ -299,6 +299,37 @@ static int mt8195_get_bar_index(struct snd_sof_dev *sdev, u32 type)
return type;
}
+static struct snd_soc_dai_driver mt8195_dai[] = {
+{
+ .name = "SOF_DL2",
+ .playback = {
+ .channels_min = 1,
+ .channels_max = 2,
+ },
+},
+{
+ .name = "SOF_DL3",
+ .playback = {
+ .channels_min = 1,
+ .channels_max = 2,
+ },
+},
+{
+ .name = "SOF_UL4",
+ .capture = {
+ .channels_min = 1,
+ .channels_max = 2,
+ },
+},
+{
+ .name = "SOF_UL5",
+ .capture = {
+ .channels_min = 1,
+ .channels_max = 2,
+ },
+},
+};
+
/* mt8195 ops */
const struct snd_sof_dsp_ops sof_mt8195_ops = {
/* probe and remove */
@@ -329,6 +360,10 @@ const struct snd_sof_dsp_ops sof_mt8195_ops = {
/* Firmware ops */
.dsp_arch_ops = &sof_xtensa_arch_ops,
+ /* DAI drivers */
+ .drv = mt8195_dai,
+ .num_drv = ARRAY_SIZE(mt8195_dai),
+
/* ALSA HW info flags */
.hw_info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
--
2.27.0
Powered by blists - more mailing lists