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

相关推荐
学习嵌入式的小羊~15 小时前
linux驱动-i2c子系统框架学习(1)
linux·驱动开发
迅为电子1 天前
迅为RK3588开发板Android多屏显示之多屏同显和多屏异显
人工智能·rk3588·多屏显示
挨踢小明1 天前
DPDK eth 网卡驱动开发
驱动开发
TeYiToKu2 天前
笔记整理—linux驱动开发部分(6)platform平台总线
linux·c语言·arm开发·驱动开发·笔记·嵌入式硬件
学习嵌入式的小羊~3 天前
linux驱动-认识输入子系统源码以及裁剪
linux·驱动开发
学习嵌入式的小羊~5 天前
linux驱动—input输入子系统
驱动开发
深度学习渣5 天前
SCSI驱动与 UFS 驱动交互概况
驱动开发·交互
郁大锤5 天前
linux alsa-lib snd_pcm_open函数源码分析(一)
linux·驱动开发·嵌入式硬件·音频·pcm·视频编解码
郁大锤5 天前
linux alsa-lib snd_pcm_open函数源码分析(二)
linux·驱动开发·嵌入式硬件·音视频
weixin_750335527 天前
OpenHarmony驱动开发--UART(串口)驱动
驱动开发