未验证 提交 22205521 编写于 作者: M Marco Felsch 提交者: Mark Brown

ASoC: fsl_sai: add error message in case of missing imx-pcm-dma support

If the imx-pcm-dma is required we need to have the module enabled. For
all NXP/FSL sound cards using the ASoC architecture this is the case but
in case of using the simple-audio-card sound card this isn't the case.

In such case the driver probe fails silently and the card isn't
available. It took a while to find the missing Kconfig. Make this easier
for others by printing a error if this the module isn't available but
required by the HW.
Signed-off-by: NMarco Felsch <m.felsch@pengutronix.de>
Acked-by: NShengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220601092342.3328644-3-m.felsch@pengutronix.deSigned-off-by: NMark Brown <broonie@kernel.org>
上级 f53f50ee
...@@ -1163,8 +1163,11 @@ static int fsl_sai_probe(struct platform_device *pdev) ...@@ -1163,8 +1163,11 @@ static int fsl_sai_probe(struct platform_device *pdev)
*/ */
if (sai->soc_data->use_imx_pcm) { if (sai->soc_data->use_imx_pcm) {
ret = imx_pcm_dma_init(pdev); ret = imx_pcm_dma_init(pdev);
if (ret) if (ret) {
if (!IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA))
dev_err(dev, "Error: You must enable the imx-pcm-dma support!\n");
goto err_pm_get_sync; goto err_pm_get_sync;
}
} else { } else {
ret = devm_snd_dmaengine_pcm_register(dev, NULL, 0); ret = devm_snd_dmaengine_pcm_register(dev, NULL, 0);
if (ret) if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册