I need to get a sound from radio-device, which use I2S protocol. The radio-device connected to the imx8 processor through ESAI. I have to registrate the radio-device and ESAI in the linux-kernel.
sound-x28 {
compatible = "simple-audio-card";
simple-audio-card,name = "x28-audio";
simple-audio-card,format="i2s";
simple-audio-card,mclk-fs = <64>;
simple-audio-card,frame-master = <&sound2_esai>;
simple-audio-card,bitclock-master = <&sound2_esai>;
simple-audio-card,widgets =
"Microphone", "Mic Jack",
"Line", "Line In",
"Line", "Line Out",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"DMIC AIF", "DMic";
mux-int-port = <1>;
mux-ext-port = <4>;
sound2_esai: simple-audio-card,cpu {
sound-dai = <&esai1 0>;
system-clock-frequency = <3072000>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
sound2codec: simple-audio-card,codec {
sound-dai = <&sound>;
};
};
codec_x28: codec_x28 {
#sound-dai-cells = <0>;
compatible = "dmic,dmic-codec";
};
&esai1{
#sound-dai-cells=<1>;
status="okay";
}; I don't fully understand how phandle #sound-dai-cells works. The sound-device "sound-x28" has passed a registration in the sysfs. But alsa don't see this device through aplay -l. I can't understand where I made a error in dts file. Or should I use another driver? Please, could you show me your dts with ESAI?