Which system do you use? Android, Ubuntu, OOWOW or others?
`Ubuntu
Which version of system do you use? Khadas official images, self built images, or others?
Khadas official images
Please describe your issue below:
How can I setting the VIM4 to have bit clock and frame clock of I2s as slave instead master?
Post a console log of your issue below:
**Delete this line and post your log here.**
numbqq
November 29, 2022, 1:30am
#2
Can you try this?
diff --git a/arch/arm64/boot/dts/amlogic/kvim4.dts b/arch/arm64/boot/dts/amlogic/kvim4.dts
index 84c6bdad7f96..a73561b9b70a 100644
--- a/arch/arm64/boot/dts/amlogic/kvim4.dts
+++ b/arch/arm64/boot/dts/amlogic/kvim4.dts
@@ -585,11 +585,11 @@
//bitclock-inversion;
//frame-inversion;
/* master mode */
- bitclock-master = <&tdmb>;
- frame-master = <&tdmb>;
+ //bitclock-master = <&tdmb>;
+ //frame-master = <&tdmb>;
/* slave mode */
- //bitclock-master = <&tdmbcodec>;
- //frame-master = <&tdmbcodec>;
+ bitclock-master = <&tdmbcodec>;
+ frame-master = <&tdmbcodec>;
/* suffix-name, sync with android audio hal used for */
suffix-name = "alsaPORT-i2s-i2s4hdmirx";
cpu {
Thank you, I did this yesterday but with the logic analyzer bit clock and frame clock are out, can you give me the file .dts or .dtbo so I can understand my errors?
I see now that it’s the kvim4.dts in the linux kernel , so if I modify in the GitHub - khadas/linux at khadas-vims-5.4.y how can I rebuild it to install in my vim4, can you describe step to step procedure?
numbqq
November 30, 2022, 1:11am
#5
Please apply the patch:
diff --git a/arch/arm64/boot/dts/amlogic/kvim4.dts b/arch/arm64/boot/dts/amlogic/kvim4.dts
index 84c6bdad7f96..98e02299642d 100644
--- a/arch/arm64/boot/dts/amlogic/kvim4.dts
+++ b/arch/arm64/boot/dts/amlogic/kvim4.dts
@@ -585,11 +585,11 @@
//bitclock-inversion;
//frame-inversion;
/* master mode */
- bitclock-master = <&tdmb>;
- frame-master = <&tdmb>;
+ //bitclock-master = <&tdmb>;
+ //frame-master = <&tdmb>;
/* slave mode */
- //bitclock-master = <&tdmbcodec>;
- //frame-master = <&tdmbcodec>;
+ bitclock-master = <&tdmbcodec>;
+ frame-master = <&tdmbcodec>;
/* suffix-name, sync with android audio hal used for */
suffix-name = "alsaPORT-i2s-i2s4hdmirx";
cpu {
@@ -955,12 +955,12 @@
&clkc CLKID_MPLL1>;
clock-names = "mclk", "mclk_pad", "clk_srcpll";
-// pinctrl-names = "tdm_pins";
-// pinctrl-0 = <&mclk_1_pins
-// &tdm_b_pins
-// &tdm_d2_pins
-// &tdm_d3_pins
-// &tdmb_clk_pins>;
+ pinctrl-names = "tdm_pins";
+ pinctrl-0 = <&mclk_1_pins
+ &tdm_b_pins
+ &tdm_d2_pins
+ &tdm_d3_pins
+ &tdmb_clk_pins>;
/*
* 0: tdmout_a;
And follow the documentations to build & upgrade the kernel.
https://docs.khadas.com/products/sbc/vim4/development/linux/build-linux-kernel
https://docs.khadas.com/products/sbc/vim4/configurations/upgrade-linux-kernel
How can I change the frequency of MCLK I2S ,it’s not 256fs but higher 32Mhz , why?