rk3588 I2S调试

1、audio out I2S dts config

	&i2s1_8ch {
	#sound-dai-cells = <0>;
	pinctrl-0 = <&i2s1m0_lrck
			 &i2s1m0_sclk
			 &i2s1m0_mclk
			 &i2s1m0_sdo0>;
	status = "okay";
    };

    dummy_codec: dummy-codec {
		compatible = "rockchip,dummy-codec";
		#sound-dai-cells = <0>;
		//clocks = <&cru SCLK_I2S1_8CH_TX_OUT>;
		clock-names = "mclk";
		assigned-clocks = <&cru I2S1_8CH_MCLKOUT>;
		assigned-clock-rates = <12288000>;
		pinctrl-names = "default";
	};

	i2s1_sound: i2s1-sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "rockchip-i2s-sound";
		status = "okay";
		simple-audio-card,format = "i2s";
		simple-audio-card,mclk-fs = <256>;
		simple-audio-card,cpu {
			   sound-dai = <&i2s1_8ch>;
		};
		simple-audio-card,codec {
			   sound-dai = <&dummy_codec>;
		};
	};

2、audio in I2S dts config

	lkes7243 {
		compatible = "rockchip,lkes7243";
		pinctrl-0 = <&lkencodeic_pins>;
		es_sda = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
		es_scl = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>;
		status = "okay";
	};	

    &i2s0_8ch {
	status = "okay";
	pinctrl-0 = <&i2s0_lrck
		     &i2s0_sclk
		     &i2s0_sdi0
		     &i2s0_mclk>;
    };

    es7243e_codec: es7243e-codec {
		compatible = "rockchip,dummy-codec";
		#sound-dai-cells = <0>;
		clock-names = "mclk";
		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
		assigned-clock-rates = <12288000>;
		pinctrl-names = "default";
	};
	
	es7243e_i2s0_sound: es7243e-i2s0-sound {
		status = "okay";
		compatible = "simple-audio-card";
		simple-audio-card,format = "i2s";
		simple-audio-card,mclk-fs = <256>;
		simple-audio-card,name = "rockchip,es7243e";
		simple-audio-card,dai-link@0 {
			format = "i2s";
			cpu {
				sound-dai = <&i2s0_8ch>;
			};
			codec {
				sound-dai = <&es7243e_codec>;
			};
		};
	};

3、硬件分析

audio in和 audio out的i2s都是直连的,所以本质上配置i2s并无区别,使用的是模拟的iic,es7243初始化一次之后就不用了

相关推荐
Tester_孙大壮12 小时前
第4章:Python TDD消除重复与降低依赖实践
开发语言·驱动开发·python
7yewh1 天前
MCU、MPU、SOC、ECU、CPU、GPU的区别到底是什么
linux·arm开发·驱动开发·单片机·嵌入式硬件·物联网
小仇学长2 天前
Linux内核编程(二十一)USB驱动开发
linux·驱动开发·usb
Tester_孙大壮2 天前
第16章:Python TDD实现多币种货币运算
开发语言·驱动开发·python
列兵阿甘2 天前
嵌入式Linux驱动开发之pinctrl和gpio子系统
linux·驱动开发·嵌入式硬件
物随心转2 天前
SD/MMC驱动开发
驱动开发
Tester_孙大壮3 天前
第17章:Python TDD回顾与总结货币类开发
驱动开发
Tester_孙大壮3 天前
第15章:Python TDD应对货币类开发变化(二)
驱动开发
Tester_孙大壮3 天前
第12章:Python TDD完善货币加法运算(一)
驱动开发
Tester_孙大壮3 天前
第10章:Python TDD优化货币类方法与引入工厂方法
驱动开发