Skip to content

Commit 8f23d9c

Browse files
author
Sugar Zhang
committed
ASoC: rockchip: i2s-tdm: Add support for TDM_MULTI_LANES
Example: RK3588 Use I2S2_2CH as Clk-Gen to serve TDM_MULTI_LANES I2S2_2CH ----> BCLK,I2S_LRCK --------> I2S0_8CH_TX (Slave TRCM-TXONLY) | |--------> BCLK,TDM_SYNC --------> TDM Device (Slave) Note: I2S2_2CH_MCLK: BCLK I2S2_2CH_SCLK: I2S_LRCK (GPIO2_B7) I2S2_2CH_LRCK: TDM_SYNC (GPIO2_C0) DT: &i2s0_8ch { status = "okay"; assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; assigned-clock-parents = <&cru MCLK_I2S0_8CH_TX>; i2s-lrck-gpio = <&gpio1 RK_PC5 GPIO_ACTIVE_HIGH>; tdm-fsync-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; rockchip,tdm-multi-lanes; rockchip,tdm-tx-lanes = <2>; //e.g. TDM16 x 2 rockchip,tdm-rx-lanes = <2>; //e.g. TDM16 x 2 rockchip,clk-src = <&i2s2_2ch>; pinctrl-names = "default"; pinctrl-0 = <&i2s0_lrck &i2s0_sclk &i2s0_sdi0 &i2s0_sdi1 &i2s0_sdo0 &i2s0_sdo1>; }; &i2s2_2ch { status = "okay"; assigned-clocks = <&cru I2S2_2CH_MCLKOUT>; assigned-clock-parents = <&cru MCLK_I2S2_2CH>; pinctrl-names = "default"; pinctrl-0 = <&i2s2m0_mclk &i2s2m0_lrck &i2s2m0_sclk>; }; Usage: TDM16 x 2 Playback amixer contents numid=3,iface=MIXER,name='Receive SDIx Select' ; type=ENUMERATED,access=rw------,values=1,items=5 ; Item #0 'Auto' ; Item #1 'SDIx1' ; Item #2 'SDIx2' ; Item #3 'SDIx3' ; Item #4 'SDIx4' : values=0 numid=2,iface=MIXER,name='Transmit SDOx Select' ; type=ENUMERATED,access=rw------,values=1,items=5 ; Item #0 'Auto' ; Item #1 'SDOx1' ; Item #2 'SDOx2' ; Item #3 'SDOx3' ; Item #4 'SDOx4' : values=0 /# amixer sset "Transmit SDOx Select" "SDOx2" Simple mixer control 'Transmit SDOx Select',0 Capabilities: enum Items: 'Auto' 'SDOx1' 'SDOx2' 'SDOx3' 'SDOx4' Item0: 'SDOx2' /# aplay -D hw:0,0 --period-size=1024 --buffer-size=4096 -r 48000 \ -c 32 -f s32_le /dev/zero Signed-off-by: Sugar Zhang <[email protected]> Change-Id: I6996e05c73a9d68bbeb9562eb6e68e4c99b52d85
1 parent fa86218 commit 8f23d9c

File tree

2 files changed

+440
-6
lines changed

2 files changed

+440
-6
lines changed

sound/soc/rockchip/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ config SND_SOC_ROCKCHIP_I2S_TDM
3333
interface between the AHB bus and the I2S bus, and support up to a
3434
maximum of 8 channels each for playback and recording.
3535

36+
config SND_SOC_ROCKCHIP_I2S_TDM_MULTI_LANES
37+
bool "Rockchip TDM Multi Lanes"
38+
depends on SND_SOC_ROCKCHIP_I2S_TDM
39+
help
40+
Say Y or M if you want to add support for TDM Multi Lanes
41+
based on I2S_TDM controller.
42+
3643
config SND_SOC_ROCKCHIP_MULTI_DAIS
3744
tristate "Rockchip Multi-DAIS Device Driver"
3845
depends on HAVE_CLK && SND_SOC_ROCKCHIP

0 commit comments

Comments
 (0)