Виктор Хомченко Posted October 26 Posted October 26 (edited) Hi! I am working on a project in which audio is transmitted over the I2S bus to TAS6424-Q1 chips. I am using the Radxa Rock S0 board, the latest stable Armbinan 6.6 kernel and an additionally compiled dummy-codec module. 1. If I use the following overlay // Definitions for 8-ch-output /dts-v1/; /plugin/; / { compatible = "radxa,rockpis", "rockchip,rk3308"; fragment@0 { target = <&i2s_8ch_0>; __overlay__ { #sound-dai-cells = <0>; rockchip,clk-trm = <1>; status = "okay"; }; }; fragment@1 { target = <&i2s_8ch_2>; __overlay__ { #sound-dai-cells = <0>; status = "disabled"; }; }; fragment@2 { target = <&acodec>; __overlay__ { #sound-dai-cells = <0>; status = "disabled"; }; }; fragment@3 { target-path = "/"; __overlay__ { mycodec: multi-ch-out { #sound-dai-cells = <0>; compatible = "rockchip,dummy-codec"; status = "okay"; }; sound_i2s { simple-audio-card,name = "multi-ch-card"; compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; simple-audio-card,mclk-fs = <128>; status = "okay"; cpu_dai: simple-audio-card,cpu { sound-dai = <&i2s_8ch_0>; }; codec_dai: simple-audio-card,codec { sound-dai = <&mycodec>; }; }; }; }; }; and when I try to play something (for example, speaker-test -from 8), I get a hung process that cannot even be killed with "kill -9". I am attaching the error log. But! 2. If I modify my rk3308-rocks-0.dts file as follow without any overlay: ... i2s@ff300000 { status = "okay"; phandle = <0x79>; ... i2s@ff320000 { status = "disabled"; ... sound { compatible = "simple-audio-card"; #sound-dai-cells = < 0 >; simple-audio-card,format = "i2s"; simple-audio-card,mclk-fs = <0x100>; simple-audio-card,name = "OUT8CH"; simple-audio-card,bitclock-master = <&cpu_dai>; simple-audio-card,frame-master = <&cpu_dai>; simple-audio-card,status = "okay"; cpu_dai: simple-audio-card,cpu { sound-dai = <0x79>; }; simple-audio-card,codec { sound-dai = <&dummy_tdm_codec>; }; }; dummy_tdm_codec: dummy-codec { status = "okay"; compatible = "rockchip,dummy-codec"; // clocks = <0x02 0x4c>; // clock-names = "mclk_tx"; // pinctrl-names = "default"; // pinctrl-0 = <0x4a>; #sound-dai-cells = < 0 >; phandle = < 0x139 >; }; BCK, LRCK and DATA signals are transmitted without problems, but I can't get the MCLK signal from pin 35 of the board (GPIO2_A4 or I2S0_8CH_MCLK) in any way, even if you uncomment the lines with clocks and pinctrl.. My project will collapse without a working mclk. Please, help! err.log Edited October 26 by Виктор Хомченко 0 Quote
Solution Виктор Хомченко Posted November 8 Author Solution Posted November 8 I answer myself! 1. Decompile rk3308-rock-s0.dtb to rk3308-rock-s0.dts. Edit... 2. Find i2s@ff300000 edit: Remove last 0x4a from pinctrl-0 string: pinctrl-0 = <0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49>; status = "okay"; 3. Comment out the node completely "acodec-sound" 4. Edit node "sound": sound { compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; simple-audio-card,mclk-fs = <0x100>; //256 decimal simple-audio-card,name = "i2s_8ch_0"; simple-audio-card,bitclock-master = <0x7a>; // &i2s@ff300000 simple-audio-card,frame-master = <0x7a>; // &i2s@i2s@ff300000 simple-audio-card,dai-link@1 { cpu { sound-dai = <0x7a>; //i2s@i2s@ff300000 }; codec { sound-dai = <&dummy_tdm_codec>; }; }; }; dummy_tdm_codec: dummy-codec { status = "okay"; compatible = "rockchip,dummy-codec"; #sound-dai-cells = < 0 >; clocks = <&cru SCLK_I2S0_8CH_TX_OUT>; //or <0x02 0x4d> clock-names = "mclk"; pinctrl-names = "default"; pinctrl-0 = <&i2s_8ch_0_mclk>; //or <0x4a> }; 5. Do't forget to compile dummy-codec module! (make, make install, depmod) 6. Copy rk3308-rock-s0.dtb to /boot/dtb/rockchip/ 7. Reboot Voila, all four I2S channels should work and MCLK on pin 35 should be! dummy-codec.zip 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.