Skip to content

Commit 17fa55f

Browse files
Chancel Liubroonie
authored andcommitted
ASoC: fsl_rpmsg: Configure CPU DAI for card that sits on rpmsg-micfil-channel
Sound card that sits on rpmsg-micfil-channel has different settings on CPU DAI. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20250421105701.2273588-1-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent c23c7c6 commit 17fa55f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sound/soc/fsl/fsl_rpmsg.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@ static int fsl_rpmsg_probe(struct platform_device *pdev)
229229
}
230230
dai_drv->name = dai_name;
231231

232+
/* Setup cpu dai for sound card that sits on rpmsg-micfil-channel */
233+
if (!strcmp(dai_name, "rpmsg-micfil-channel")) {
234+
dai_drv->capture.channels_min = 1;
235+
dai_drv->capture.channels_max = 8;
236+
dai_drv->capture.rates = SNDRV_PCM_RATE_8000_48000;
237+
dai_drv->capture.formats = SNDRV_PCM_FMTBIT_S32_LE;
238+
if (of_device_is_compatible(np, "fsl,imx8mm-rpmsg-audio"))
239+
dai_drv->capture.formats = SNDRV_PCM_FMTBIT_S16_LE;
240+
}
241+
232242
if (of_property_read_bool(np, "fsl,enable-lpa")) {
233243
rpmsg->enable_lpa = 1;
234244
rpmsg->buffer_size = LPA_LARGE_BUFFER_SIZE;

0 commit comments

Comments
 (0)