凌云实验室推出的ARM Linux物联网网关开发板IGKBoard(IoT Gateway Kit Board)项目源码
guowenxue
2022-07-20 737608770cbb6c9df43436595e07a7fb70172895
Update linux patch for MQS frequency to 44.1KHz, can play MP3 now
1 files modified
27 ■■■■ changed files
bsp/kernel/patch/linux-imx-lf-5.10.52-2.1.0.patch 27 ●●●● patch | view | raw | blame | history
bsp/kernel/patch/linux-imx-lf-5.10.52-2.1.0.patch
@@ -1,7 +1,7 @@
diff -Nuar --no-dereference -x logo_linux_clut224.ppm linux-imx/arch/arm/boot/dts/igkboard.dts linux-imx-lf-5.10.52-2.1.0/arch/arm/boot/dts/igkboard.dts
--- linux-imx/arch/arm/boot/dts/igkboard.dts    1970-01-01 08:00:00.000000000 +0800
+++ linux-imx-lf-5.10.52-2.1.0/arch/arm/boot/dts/igkboard.dts    2022-07-19 22:23:30.755325006 +0800
@@ -0,0 +1,597 @@
+++ linux-imx-lf-5.10.52-2.1.0/arch/arm/boot/dts/igkboard.dts    2022-07-20 19:27:26.940869752 +0800
@@ -0,0 +1,608 @@
+/*
+ * Device Tree Source for LingYun IGKBoard(IoT Gateway Kit Board)
+ * Based on imx6ul-14x14-evk.dts/imx6ul-14x14-evk.dtsi
@@ -277,16 +277,27 @@
+  | Audio Module |
+  +--------------+*/
+
+/* Refrence: https://www.toradex.com/zh-cn/blog/colibri-imx6ull-kuo-zhan-yin-pin-jie-ma-qi-max98357a
+ * +--------------------+--------------------+-----------------------+---------------------+
+ * | Audio Sample Rates |      Bit Clock     |  PLL4_AUDIO_DIV(512)  |    CLK_SAI1(/16)    |
+ * +--------------------+--------------------+-----------------------+---------------------+
+ * | 16bit,2Ch,48KHz    | 16x2x48000=1536000 | 1536000x512=786432000 | 1536000x16=24576000 |
+ * +--------------------+--------------------+-----------------------+---------------------+
+ * | 16bit,2Ch,44.1KHz  | 16x2x44100=1411200 | 1411200x512=722534400 | 1411200x16=22579200 |
+ * +--------------------+--------------------+-----------------------+---------------------+
+ */
+
+&clks {
+    assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
+    assigned-clock-rates = <786432000>; // 16bit,48KHz: 16x2x48000 = 1536000 x 512 = 786432000
+    //assigned-clock-rates = <786432000>; // 16bit,2Ch,48KHz
+    assigned-clock-rates = <722534400>; // 16bit,2Ch,44.1KHz
+};
+
+&sai1 {
+    assigned-clocks = <&clks IMX6UL_CLK_SAI1_SEL>,
+              <&clks IMX6UL_CLK_SAI1>;
+    assigned-clocks = <&clks IMX6UL_CLK_SAI1_SEL>, <&clks IMX6UL_CLK_SAI1>;
+    assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
+    assigned-clock-rates = <0>, <24576000>;
+    //assigned-clock-rates = <0>, <24576000>; // 16bit,2Ch,48KHz
+    assigned-clock-rates = <0>, <22579200>; // 16bit,2Ch,44.1KHz
+    fsl,sai-mclk-direction-output;
+    status = "okay";
+};
@@ -1155,7 +1166,7 @@
+
diff -Nuar --no-dereference -x logo_linux_clut224.ppm linux-imx/arch/arm/configs/igkboard_defconfig linux-imx-lf-5.10.52-2.1.0/arch/arm/configs/igkboard_defconfig
--- linux-imx/arch/arm/configs/igkboard_defconfig    1970-01-01 08:00:00.000000000 +0800
+++ linux-imx-lf-5.10.52-2.1.0/arch/arm/configs/igkboard_defconfig    2022-07-19 22:40:13.819504081 +0800
+++ linux-imx-lf-5.10.52-2.1.0/arch/arm/configs/igkboard_defconfig    2022-07-20 19:38:24.145456208 +0800
@@ -0,0 +1,726 @@
+CONFIG_KERNEL_LZO=y
+CONFIG_SYSVIPC=y
@@ -1896,7 +1907,7 @@
         dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",
diff -Nuar --no-dereference -x logo_linux_clut224.ppm linux-imx/Makefile linux-imx-lf-5.10.52-2.1.0/Makefile
--- linux-imx/Makefile    2021-09-08 18:41:11.000000000 +0800
+++ linux-imx-lf-5.10.52-2.1.0/Makefile    2022-07-19 22:23:33.931306781 +0800
+++ linux-imx-lf-5.10.52-2.1.0/Makefile    2022-07-20 19:35:26.363459483 +0800
@@ -367,7 +367,8 @@
 # Alternatively CROSS_COMPILE can be set in the environment.
 # Default value for CROSS_COMPILE is not to prefix executables