RK3588-ES8388音频调试笔记
es8388_sound: es8388-sound {
status = "okay";
compatible = "rockchip,multicodecs-card";
rockchip,card-name = "rockchip-es8388";
hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; //耳机检测脚
io-channels = <&saradc 3>; //耳机adc检测通道
io-channel-names = "adc-detect";
keyup-threshold-microvolt = <1800000>; //耳机检测参考电压
poll-interval = <100>;
spk-con-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; //喇叭控制GPIO
hp-con-gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; //耳机控制GPIO
rockchip,format = "i2s";
rockchip,mclk-fs = <256>;
rockchip,cpu = <&i2s0_8ch>; //与RK3588进行数据通信的i2s通道
rockchip,codec = <&es8388>;
rockchip,audio-routing = //配置声音通路
"Headphone", "LOUT1",
"Headphone", "ROUT1",
"Speaker", "LOUT2",
"Speaker", "ROUT2",
"Headphone", "Headphone Power",
"Headphone", "Headphone Power",
"Speaker", "Speaker Power",
"Speaker", "Speaker Power",
"LINPUT1", "Main Mic",
"LINPUT2", "Main Mic",
"RINPUT1", "Headset Mic",
"RINPUT2", "Headset Mic";
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
play-pause-key { //配置耳机按键
label = "playpause";
linux,code = <KEY_PLAYPAUSE>;
press-threshold-microvolt = <2000>;
};
};