mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +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:
@@ -21,6 +21,10 @@ Required properties:
|
||||
- 0: both tx_lrck/bclk and rx_lrck/bclk are used
|
||||
- 1: only tx_lrck/bclk is used
|
||||
- 2: only rx_lrck/bclk is used
|
||||
- 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.
|
||||
|
||||
Example for rk3308 I2S/TDM controller:
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -28,6 +28,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:
|
||||
|
||||
@@ -697,6 +697,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 = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Could not register PCM\n");
|
||||
|
||||
@@ -1233,6 +1233,8 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
|
||||
goto err_suspend;
|
||||
}
|
||||
|
||||
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\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