alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@oss.nxp.com>
To: broonie@kernel.org, alsa-devel@alsa-project.org
Cc: "Guennadi Liakhovetski" <guennadi.liakhovetski@linux.intel.com>,
	daniel.baluta@gmail.com,
	"Kai Vehmanen" <kai.vehmanen@linux.intel.com>,
	lgirdwood@gmail.com,
	"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	pierre-louis.bossart@linux.intel.com,
	linux-mediatek@lists.infradead.org,
	"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
	yc.hung@mediatek.com, daniel.baluta@nxp.com
Subject: [PATCH v2 6/8] ASoC: SOF: mediatek: Add dai driver dsp ops callback for mt8195
Date: Thu, 18 Nov 2021 12:07:47 +0200	[thread overview]
Message-ID: <20211118100749.54628-7-daniel.baluta@oss.nxp.com> (raw)
In-Reply-To: <20211118100749.54628-1-daniel.baluta@oss.nxp.com>

From: YC Hung <yc.hung@mediatek.com>

Add dsp ops callback to register AFE DL2/DL3/UL4/UL5 sof dai's with ALSA

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.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


  parent reply	other threads:[~2021-11-18 10:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 10:07 [PATCH v2 0/8] ASoC: SOF: Add support for Mediatek MT8195 Daniel Baluta
2021-11-18 10:07 ` [PATCH v2 1/8] ASoC: SOF: mediatek: Add mt8195 hardware support Daniel Baluta
2021-11-26 12:06   ` AngeloGioacchino Del Regno
2021-11-18 10:07 ` [PATCH v2 2/8] ASoC: SOF: tokens: add token for Mediatek AFE Daniel Baluta
2021-11-26 12:06   ` AngeloGioacchino Del Regno
2021-11-18 10:07 ` [PATCH v2 3/8] ASoC: SOF: topology: Add support for Mediatek AFE DAI Daniel Baluta
2021-11-26 12:05   ` AngeloGioacchino Del Regno
2021-11-18 10:07 ` [PATCH v2 4/8] ASoC: SOF: mediatek: Add fw loader and mt8195 dsp ops to load firmware Daniel Baluta
2021-11-26 12:05   ` AngeloGioacchino Del Regno
2021-11-18 10:07 ` [PATCH v2 5/8] ASoC: SOF: Add mt8195 device descriptor Daniel Baluta
2021-11-26 12:06   ` AngeloGioacchino Del Regno
2021-11-18 10:07 ` Daniel Baluta [this message]
2021-11-26 12:06   ` [PATCH v2 6/8] ASoC: SOF: mediatek: Add dai driver dsp ops callback for mt8195 AngeloGioacchino Del Regno
2021-11-18 10:07 ` [PATCH v2 7/8] ASoC: SOF: mediatek: Add mt8195 dsp clock support Daniel Baluta
2021-11-26 12:07   ` AngeloGioacchino Del Regno
2021-11-18 10:07 ` [PATCH v2 8/8] ASoC: SOF: mediatek: Add DSP system PM callback for mt8195 Daniel Baluta
2021-11-26 12:07   ` AngeloGioacchino Del Regno
2021-11-18 19:06 ` [PATCH v2 0/8] ASoC: SOF: Add support for Mediatek MT8195 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=20211118100749.54628-7-daniel.baluta@oss.nxp.com \
    --to=daniel.baluta@oss.nxp.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@gmail.com \
    --cc=daniel.baluta@nxp.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=yc.hung@mediatek.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;
as well as URLs for NNTP newsgroup(s).