Hi there,
I'm trying to use sai5 in a multi-line configuration on a custom board with an i.MX8M Mini.
There's an audio link between the i.MX8 and a DSP. The bit clock and the frame clock are generated by an external clock generator.
I can play and record audio (8 channels) as long as I use only one data line (RX_DATA0 and TX_DATA0).
The working device tree fragment is the following:
&sai5 {
status = "okay";
fsl,sai-asynchronous;
#sound-dai-cells = <1>;
};
/ {
dsp0: fixed_tdm_dummy_codec0 {
#sound-dai-cells = <1>;
compatible = "test,fixed_tdm";
};
card0: sound {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,name = "dsp0";
simple-audio-card,format = "left_j";
simple-audio-card,bitclock-master = <&link0_codec>;
simple-audio-card,frame-master = <&link0_codec>;
simple-audio-card,dai-link@0 {
reg = <0>;
format = "left_j";
link0_cpu: cpu {
sound-dai = <&sai5 0>;
};
link0_codec: codec {
sound-dai = <&dsp0 0>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
frame-master;
bitclock-master;
};
};
};
};
When I try to add another data line, the simple-card driver fails to load.
asoc_simple_parse_dai returns -EINVAL when it tries to parse the CPU component of the second dai link.
If I try to use only RX_DATA1, TX_DATA1, the simple-card probe fails the same way.
The following two device tree fragments fail:
&sai5 {
status = "okay";
fsl,sai-asynchronous;
#sound-dai-cells = <1>;
fsl,dataline = <8 0x0f 0x0f>;
fsl,sai-multi-lane;
};
/ {
dsp0: fixed_tdm_dummy_codec0 {
#sound-dai-cells = <1>;
compatible = "test,fixed_tdm";
};
card0: sound {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,name = "dsp0";
simple-audio-card,dai-link@0 {
reg = <0>;
format = "left_j";
bitclock-master = <&link0_master>;
frame-master = <&link0_master>;
link0_cpu: cpu {
sound-dai = <&sai5 0>;
};
link0_master: codec {
sound-dai = <&dsp0 0>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
frame-master;
bitclock-master;
};
};
simple-audio-card,dai-link@1 {
reg = <1>;
format = "left_j";
bitclock-master = <&link1_master>;
frame-master = <&link1_master>;
cpu {
sound-dai = <&sai5 1>;
};
link1_master: codec {
sound-dai = <&dsp0 1>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
frame-master;
bitclock-master;
};
};
};
};
&sai5 {
status = "okay";
fsl,sai-asynchronous;
#sound-dai-cells = <1>;
};
/ {
dsp0: fixed_tdm_dummy_codec0 {
#sound-dai-cells = <1>;
compatible = "test,fixed_tdm";
};
card0: sound {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,name = "dsp0";
simple-audio-card,format = "left_j";
simple-audio-card,bitclock-master = <&link0_codec>;
simple-audio-card,frame-master = <&link0_codec>;
simple-audio-card,dai-link@0 {
reg = <0>;
format = "left_j";
link0_cpu: cpu {
sound-dai = <&sai5 0>;
};
link0_codec: codec {
sound-dai = <&dsp0 0>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
frame-master;
bitclock-master;
};
};
};
};
When the simple-card driver fails to load, it prints:
[ 7.289407] asoc-simple-card: probe of sound failed with error -22
Has anyone been able to use these SAIs with multiple data lines?
Thanks in advance for any feedback.