How to specify the SAI lane in a simple audio card binding?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to specify the SAI lane in a simple audio card binding?

Jump to solution
1,516 Views
moose
Contributor IV

Hello, I am using imx8mn SoC which includes 4 Tx lanes in one of its I2S instances (sai5). I'd like to specify one of these lanes (ex: lane 2) to be the source of my dai link in a simple audio card binding. Do I just add number 2 next to the dai_cpu node (see below)? I am asking this since the dtsi file for the imx8mn soc doesn't define  #sound-dai-cells as <1>. I could just add the definition but all examples I see online don't do that and I am a bit confused. If you can provide some guidance that would be appreciated. Please note this code isn't functional yet but it could be due to this or other issues. Thx!

/ {
model = "NXP i.MX8MNano DDR3L EVK board";

sound-tas5805 {
compatible = "simple-audio-card";
simple-audio-card,name = "tas5805m-amp";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;

dailink0_master: simple-audio-card,cpu {
sound-dai = <&sai5 2>;
};
simple-audio-card,codec {
sound-dai = <&tas5805m>;
};
};
};

 

&sai5 {
#sound-dai-cells=<1>
};

};

&i2c3 {
tas5805m: tas5805m@2d {
#sound-dai-cells = <0>;
compatible = "ti,tas5805m";
reg = <0x2D>;
clocks = <&clk IMX8MN_CLK_SAI3_ROOT>;
clock-names = "mclk";
status = "okay";
};

};

 

Tags (1)
0 Kudos
1 Solution
1,454 Views
moose
Contributor IV

Yes, I did. It turns out you do need to specify the channel in a multilane sai port. In my case I had to do this inside the codec:

dailink0_master: simple-audio-card,cpu {
      sound-dai = <&sai5 0>;
};

I didn't see any documentation about this. The binding documentation and examples I found online were all referencing one lane sai. Hope this help.

 

View solution in original post

0 Kudos
5 Replies
1,456 Views
divyeshmarne0
Contributor III

Hi Moose,

Is this issue fixed? are you able to integrate TAS with IMX8MM?

0 Kudos
1,455 Views
moose
Contributor IV

Yes, I did. It turns out you do need to specify the channel in a multilane sai port. In my case I had to do this inside the codec:

dailink0_master: simple-audio-card,cpu {
      sound-dai = <&sai5 0>;
};

I didn't see any documentation about this. The binding documentation and examples I found online were all referencing one lane sai. Hope this help.

 

0 Kudos
1,430 Views
divyeshmarne0
Contributor III

Hi Moose,

We are stuck in between the audio design.

Need your inputs to solve this.. We are first time integrating this type of digital IC with IMX8.

Thanks

Divyesh. 

0 Kudos
1,439 Views
divyeshmarne0
Contributor III

Great moose.!!

We are using the same IC with im8mm.

Could you please share all the details if possible.

Like which alsa machine driver you have used in dts.

How did you configure DSP at initial level. Please share driver details as well.

It will be helpful for my project!

Thanks

Divyesh

0 Kudos
1,427 Views
moose
Contributor IV

Hello, we used the alsa simple audio card. Here is the full devicetree node for your reference. Hope this helps.

sound-tas5805 {
compatible = "simple-audio-card";
simple-audio-card,name = "tas5805m-amp";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;
status = "okay";

dailink0_master: simple-audio-card,cpu {
sound-dai = <&sai5 0>;
};
simple-audio-card,codec {
sound-dai = <&tas5805m>;
};
};

0 Kudos