Skip to content

Commit 2fcc1fe

Browse files
Sugar Zhangrkhuangtao
authored andcommitted
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 <sugar.zhang@rock-chips.com> Change-Id: I6996e05c73a9d68bbeb9562eb6e68e4c99b52d85
1 parent 109b425 commit 2fcc1fe

File tree

2 files changed

+420
-5
lines changed

2 files changed

+420
-5
lines changed

sound/soc/rockchip/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ config SND_SOC_ROCKCHIP_I2S_TDM
3232
Rockchip I2S/TDM device. The device supports up to maximum of
3333
8 channels each for play and record.
3434

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

0 commit comments

Comments
 (0)