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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c23c7c6 commit 17fa55f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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)