mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
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>
This commit is contained in:
@@ -16,6 +16,10 @@ Required properties:
|
||||
- "pdm_clk" : clock for PDM controller
|
||||
- resets: a list of phandle + reset-specifer paris, one for each entry in reset-names.
|
||||
- reset-names: reset names, should include "pdm-m".
|
||||
- rockchip,no-dmaengine: This 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.
|
||||
- pinctrl-names: Must contain a "default" entry.
|
||||
- pinctrl-N: One property must exist for each entry in
|
||||
pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
|
||||
|
||||
@@ -30,6 +30,10 @@ Required properties:
|
||||
- rockchip,playback-channels: max playback channels, if not set, 8 channels default.
|
||||
- rockchip,capture-channels: max capture channels, if not set, 2 channels default.
|
||||
- rockchip,bclk-fs: configure the i2s bclk fs.
|
||||
- rockchip,no-dmaengine: This 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.
|
||||
|
||||
Required properties for controller which support multi channels
|
||||
playback/capture:
|
||||
|
||||
@@ -704,6 +704,8 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
||||
goto err_suspend;
|
||||
}
|
||||
|
||||
if (of_property_read_bool(node, "rockchip,no-dmaengine"))
|
||||
return ret;
|
||||
ret = rockchip_pcm_platform_register(&pdev->dev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Could not register PCM\n");
|
||||
|
||||
@@ -465,6 +465,7 @@ MODULE_DEVICE_TABLE(of, rockchip_pdm_match);
|
||||
|
||||
static int rockchip_pdm_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
const struct of_device_id *match;
|
||||
struct rk_pdm_dev *pdm;
|
||||
struct resource *res;
|
||||
@@ -531,6 +532,8 @@ static int rockchip_pdm_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
rockchip_pdm_rxctrl(pdm, 0);
|
||||
if (of_property_read_bool(node, "rockchip,no-dmaengine"))
|
||||
return ret;
|
||||
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "could not register pcm: %d\n", ret);
|
||||
|
||||
Reference in New Issue
Block a user