ASoC: rockchip: add 'rockchip,no-dmaengine' for i2s/tdm/pdm

This patch add support for property 'rockchip,no-dmaengine'.
it is a boolean property. if present, driver will do not
register pcm dmaengine, only just register dai. if the dai
is part of multi-dais, the property should be present. Please
refer to rockchip,multidais.txt about multi-dais usage.

Change-Id: I9aa2ddb15f5a27202f90bf32804f214435cc0b73
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu 2022-07-08 16:25:28 +08:00 committed by Tao Huang
parent 930b74b2d7
commit 799fe35bfc
2 changed files with 6 additions and 0 deletions

View File

@ -781,6 +781,9 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
goto err_suspend;
}
if (of_property_read_bool(node, "rockchip,no-dmaengine"))
return 0;
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
if (ret) {
dev_err(&pdev->dev, "Could not register PCM\n");

View File

@ -657,6 +657,9 @@ static int rockchip_pdm_probe(struct platform_device *pdev)
if (ret != 0 && ret != -ENOENT)
goto err_suspend;
if (of_property_read_bool(node, "rockchip,no-dmaengine"))
return 0;
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
if (ret) {
dev_err(&pdev->dev, "could not register pcm: %d\n", ret);