|
RK3566 PDM 使用与设备树dts配置咨询
发表于 2022-3-31 12:52:30
浏览:5351
|
回复:2
打印
只看该作者
[复制链接]
楼主
本帖最后由 szzhangzhen 于 2022-3-31 12:59 编辑
RK3566平台,使用其PDM接口作为Audio input Capture通道,具体硬件结构框图如下。
参考rk3566-evb-lp4x-v10-pdm-mic-array.dts 有如下配置
/ {
model = "Rockchip RK3566 EVB2 LP4X V10 Board PDM Mic Array";
compatible = "rockchip,rk3566-evb2-lp4x-v10", "rockchip,rk3566";
rk809_sound_micarray: rk809-sound-micarray {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,rk809-codec";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,dai-link@0 {
format = "i2s";
cpu {
sound-dai = <&i2s1_8ch>;
};
codec {
sound-dai = <&rk809_codec 0>;
};
};
simple-audio-card,dai-link@1 {
format = "pdm";
cpu {
sound-dai = <&pdm>;
};
codec {
sound-dai = <&rk809_codec 1>;
};
};
simple-audio-card,dai-link@2 {
format = "pdm";
cpu {
sound-dai = <&pdm>;
};
codec {
sound-dai = <&es7202>;
};
};
};
};
&i2c3 {
status = "okay";
es7202: es7202@30 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ES7202_PDM_ADC_1";
reg = <0x30>;
};
es7202_31: es7202@31 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ES7202_PDM_ADC_2";
reg = <0x31>;
};
};
&i2s1_8ch {
status = "okay";
#sound-dai-cells = <0>;
rockchip,clk-trcm = <1>;
pinctrl-names = "default";
pinctrl-0 = <&i2s1m0_sclktx
&i2s1m0_lrcktx
&i2s1m0_sdo0>;
};
&pdm {
status = "okay";
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pdmm0_clk
&pdmm0_clk1
&pdmm0_sdi0
&pdmm0_sdi1
&pdmm0_sdi2
&pdmm0_sdi3>;
};
&rk809_codec {
#sound-dai-cells = <1>;
compatible = "rockchip,rk809-codec", "rockchip,rk817-codec";
clocks = <&cru I2S1_MCLKOUT>;
clock-names = "mclk";
assigned-clocks = <&cru I2S1_MCLKOUT>, <&cru I2S1_MCLK_TX_IOE>;
assigned-clock-rates = <12288000>;
assigned-clock-parents = <&cru I2S1_MCLKOUT_TX>, <&cru I2S1_MCLKOUT_TX>;
pinctrl-names = "default";
pinctrl-0 = <&i2s1m0_mclk>;
pdmdata-out-enable;
adc-for-loopback;
hp-volume = <20>;
spk-volume = <3>;
mic-in-differential;
status = "okay";
};
&rk809_sound {
status = "disabled";
};
参照此dts能基本理解其含义,rk809_sound_micarray节点下
1、simple-audio-card,dai-link@0 用于配置RK809 Audio output,
2、simple-audio-card,dai-link@1 用于配置rk809使用PDM接口录音,
3、simple-audio-card,dai-link@2 用于配置es7202使用PDM接口录音,
但是从其中无法获悉,loopback如何配置。
根据参考devicetree,结合自身硬件构成,可知ES7202应如下配置
&i2c3 {
status = "okay";
clock-frequency = <400000>;
es7202_30: es7202@30 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ES7202_PDM_ADC_1";
reg = <0x30>;
};
es7202_31: es7202@31 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ES7202_PDM_ADC_2";
reg = <0x31>;
};
es7202_32: es7202@32 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ES7202_PDM_ADC_3";
reg = <0x32>;
};
};
请问,如何配置音频输入loopback、mic array?
是否应该像如下形式进行配置
sound_micarray {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,rk809-codec";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,dai-link@0 {
format = "i2s";
cpu {
sound-dai = <&i2s1_8ch>;
};
codec {
sound-dai = <&rk809_codec 0>;
};
};
simple-audio-card,dai-link@1 {
format = "pdm";
cpu {
sound-dai = <&pdm>;
};
codec {
sound-dai = <&es7202_30>;
};
};
simple-audio-card,dai-link@2 {
format = "pdm";
cpu {
sound-dai = <&pdm>;
};
codec {
sound-dai = <&es7202_31>;
};
};
simple-audio-card,dai-link@3 {
format = "pdm";
cpu {
sound-dai = <&pdm>;
};
codec {
sound-dai = <&es7202_32>;
};
};
};
|
|