mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ASoC: rockchip: i2s: Adds properties to specify playback/capture capability
- 'rockchip,playback-only': support playback only. - 'rockchip,capture-only': support capture only. Change-Id: I0daee4dc5bda8bacc63201972b57c8d401fb8703 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -28,6 +28,8 @@ Required properties:
|
||||
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.
|
||||
- rockchip,playback-only: Specify that the controller only has playback capability.
|
||||
- rockchip,capture-only: Specify that the controller only has capture capability.
|
||||
|
||||
Optional properties:
|
||||
- rockchip,i2s-rx-route: This is a variable length array, that shows the mapping
|
||||
|
||||
@@ -43,6 +43,8 @@ Required properties:
|
||||
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.
|
||||
- rockchip,playback-only: Specify that the controller only has playback capability.
|
||||
- rockchip,capture-only: Specify that the controller only has capture capability.
|
||||
|
||||
Required properties for controller which support multi channels
|
||||
playback/capture:
|
||||
|
||||
@@ -705,6 +705,11 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
||||
soc_dai->capture.channels_max = val;
|
||||
}
|
||||
|
||||
if (of_property_read_bool(node, "rockchip,playback-only"))
|
||||
soc_dai->capture.channels_min = 0;
|
||||
else if (of_property_read_bool(node, "rockchip,capture-only"))
|
||||
soc_dai->playback.channels_min = 0;
|
||||
|
||||
i2s->bclk_fs = 64;
|
||||
if (!of_property_read_u32(node, "rockchip,bclk-fs", &val)) {
|
||||
if ((val >= 32) && (val % 2 == 0))
|
||||
|
||||
@@ -1370,6 +1370,11 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
if (of_property_read_bool(node, "rockchip,playback-only"))
|
||||
soc_dai->capture.channels_min = 0;
|
||||
else if (of_property_read_bool(node, "rockchip,capture-only"))
|
||||
soc_dai->playback.channels_min = 0;
|
||||
|
||||
i2s_tdm->grf = syscon_regmap_lookup_by_phandle(node, "rockchip,grf");
|
||||
if (IS_ERR(i2s_tdm->grf))
|
||||
return PTR_ERR(i2s_tdm->grf);
|
||||
|
||||
Reference in New Issue
Block a user