Unverified Commit f3b75e9b authored by Chunxu Li's avatar Chunxu Li Committed by Mark Brown
Browse files

ASoC: SOF: mediatek: Add dai driver for mt8186



Add dsp ops callback to register AFE DL1/DL2/UL1/UL2 SOF dai's with ALSA

Signed-off-by: default avatarChunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220825065411.31279-2-chunxu.li@mediatek.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 906aaf38
Loading
Loading
Loading
Loading
+35 −0
Original line number Original line Diff line number Diff line
@@ -468,6 +468,37 @@ static int mt8186_ipc_msg_data(struct snd_sof_dev *sdev,
	return 0;
	return 0;
}
}


static struct snd_soc_dai_driver mt8186_dai[] = {
{
	.name = "SOF_DL1",
	.playback = {
		.channels_min = 1,
		.channels_max = 2,
	},
},
{
	.name = "SOF_DL2",
	.playback = {
		.channels_min = 1,
		.channels_max = 2,
	},
},
{
	.name = "SOF_UL1",
	.capture = {
		.channels_min = 1,
		.channels_max = 2,
	},
},
{
	.name = "SOF_UL2",
	.capture = {
		.channels_min = 1,
		.channels_max = 2,
	},
},
};

/* mt8186 ops */
/* mt8186 ops */
static struct snd_sof_dsp_ops sof_mt8186_ops = {
static struct snd_sof_dsp_ops sof_mt8186_ops = {
	/* probe and remove */
	/* probe and remove */
@@ -503,6 +534,10 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = {
	/* Firmware ops */
	/* Firmware ops */
	.dsp_arch_ops = &sof_xtensa_arch_ops,
	.dsp_arch_ops = &sof_xtensa_arch_ops,


	/* DAI drivers */
	.drv		= mt8186_dai,
	.num_drv	= ARRAY_SIZE(mt8186_dai),

	/* PM */
	/* PM */
	.suspend	= mt8186_dsp_suspend,
	.suspend	= mt8186_dsp_suspend,
	.resume		= mt8186_dsp_resume,
	.resume		= mt8186_dsp_resume,