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初始化一次之后就不用了

相关推荐
嵌入(师)6 小时前
嵌入式驱动开发详解1(系统调用)
驱动开发
昵称p7 小时前
杂项驱动开发
驱动开发·gpio子系统·杂项驱动开发
7yewh12 小时前
嵌入式硬件杂谈(四)-高速板PCB设计 高速信号全面讲解 蛇形线 等长线 差分对 阻抗对
驱动开发·嵌入式硬件·mcu·物联网·硬件工程·pcb工艺·精益工程
lishing61 天前
Linux驱动开发(9):pinctrl子系统和gpio子系统--led实验
linux·运维·驱动开发
lishing61 天前
Linux驱动开发(7):使用设备树实现RGB 灯驱动
linux·驱动开发
TeYiToKu1 天前
笔记整理—linux驱动开发部分(13)块设备
linux·c语言·驱动开发·笔记·嵌入式硬件·arm
网易独家音乐人Mike Zhou1 天前
【Linux驱动开发】irq中断配置API及中断应用 阻塞休眠和非阻塞的驱动操作
linux·c语言·驱动开发·stm32·单片机·mcu·iot
believe、悠闲1 天前
GetVolumeInformation函数使用记录
c++·windows·驱动开发
不怕犯错,就怕不做1 天前
修复kernel编译栈帧大小异常问题error: the frame size of 1928 bytes is larger than 1024 bytes
linux·arm开发·驱动开发
bigbig猩猩1 天前
Gin 框架中的表单处理与数据绑定
驱动开发·gin