Skip to content

Commit 3dc11be

Browse files
committed
ASoC: SOF: mediatek: Add dai driver dsp ops callback for mt8195
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>
1 parent 9a704cc commit 3dc11be

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

sound/soc/sof/mediatek/mt8195/mt8195.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,37 @@ static int mt8195_get_bar_index(struct snd_sof_dev *sdev, u32 type)
293293
return type;
294294
}
295295

296+
static struct snd_soc_dai_driver mt8195_dai[] = {
297+
{
298+
.name = "SOF_DL2",
299+
.playback = {
300+
.channels_min = 1,
301+
.channels_max = 2,
302+
},
303+
},
304+
{
305+
.name = "SOF_DL3",
306+
.playback = {
307+
.channels_min = 1,
308+
.channels_max = 2,
309+
},
310+
},
311+
{
312+
.name = "SOF_UL4",
313+
.capture = {
314+
.channels_min = 1,
315+
.channels_max = 2,
316+
},
317+
},
318+
{
319+
.name = "SOF_UL5",
320+
.capture = {
321+
.channels_min = 1,
322+
.channels_max = 2,
323+
},
324+
},
325+
};
326+
296327
/* mt8195 ops */
297328
const struct snd_sof_dsp_ops sof_mt8195_ops = {
298329
/* probe and remove */
@@ -323,6 +354,10 @@ const struct snd_sof_dsp_ops sof_mt8195_ops = {
323354
/* Firmware ops */
324355
.dsp_arch_ops = &sof_xtensa_arch_ops,
325356

357+
/* DAI drivers */
358+
.drv = mt8195_dai,
359+
.num_drv = ARRAY_SIZE(mt8195_dai),
360+
326361
/* ALSA HW info flags */
327362
.hw_info = SNDRV_PCM_INFO_MMAP |
328363
SNDRV_PCM_INFO_MMAP_VALID |

0 commit comments

Comments
 (0)