mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
8f23d9cb4003695feb3c78ea2451ed30d060a996
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
…
…
…
…
…
…
…
…
…
…
…
…
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Languages
C
97.7%
Assembly
1.6%
Makefile
0.3%
Perl
0.1%