IIS on iMX6UL

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

IIS on iMX6UL

Jump to solution
1,120 Views
chadA
Contributor III

Hi sir,

Now I trying to use an TI's audio codec TLV320ADC6140.

Codec is in slave mode, and iMX6ul is the master.

I am trying to use IIS to send out an 4 slots, 16bit, 44.1KHz signal to codec, but I get a strange signal, like this:

20230811174310.jpg

For sync signal, it is 44.1kHz, and BCLK is 2.82MHz, they are right.

But as you can see, it's obviously wrong every period. Each period has a ratio of 3:1, but it should be 2:2.

Am I made a mistake at some where?

Thanks

Chad

0 Kudos
Reply
1 Solution
1,046 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hello @chadA 

I hope you are doing well.

" how to use TDM mode with SAI on i.MX6UL for linux 4.1.15?"
->Please follow the below-given link for your reference.
https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862513

"can you give me more information about the configurations?"
->Please make sure to check the device driver configurations given below.
For Example:

sai2: sai@40031000 {
     compatible = "fsl,vf610-sai";
     reg = <0x40031000 0x1000>;
     pinctrl-names = "default";
     pinctrl-0 = <&pinctrl_sai2_1>;
     clocks = <&clks VF610_CLK_SAI2>;
     clock-names = "sai";
     dma-names = "tx", "rx";
     dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
  <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
     big-endian-regs;
     big-endian-data;
};

For more details Please follow the link below and apply these DT changes in your device tree and recompile the image to use it.
https://github.com/samnazarko/linux-imx6/blob/master/Documentation/devicetree/bindings/sound/fsl-sai...

I hope it helps!

Thanks & Regards,

Dhruvit Vasavada

View solution in original post

0 Kudos
Reply
5 Replies
1,071 Views
chadA
Contributor III

Hi Dhruvit,

I can't understand.

For TI's codec, it works in slave mode, the chip can detect the clock on FSYNC and BCLK, beside this, there is no special needs. It supports standard IIS protocol. So I did not configure the clock for TI at all. And when I tried to use 2 slots, both of them works fine.

I am not sure what configurations do you need, can you give me more information about the configurations?

Thanks

Chad

 

0 Kudos
Reply
1,047 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hello @chadA 

I hope you are doing well.

" how to use TDM mode with SAI on i.MX6UL for linux 4.1.15?"
->Please follow the below-given link for your reference.
https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862513

"can you give me more information about the configurations?"
->Please make sure to check the device driver configurations given below.
For Example:

sai2: sai@40031000 {
     compatible = "fsl,vf610-sai";
     reg = <0x40031000 0x1000>;
     pinctrl-names = "default";
     pinctrl-0 = <&pinctrl_sai2_1>;
     clocks = <&clks VF610_CLK_SAI2>;
     clock-names = "sai";
     dma-names = "tx", "rx";
     dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
  <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
     big-endian-regs;
     big-endian-data;
};

For more details Please follow the link below and apply these DT changes in your device tree and recompile the image to use it.
https://github.com/samnazarko/linux-imx6/blob/master/Documentation/devicetree/bindings/sound/fsl-sai...

I hope it helps!

Thanks & Regards,

Dhruvit Vasavada

0 Kudos
Reply
1,032 Views
chadA
Contributor III

Hi @Dhruvit

Thank you very much.

I know where I made a mistake now. The link you offered are helpful.

I will use it as an the answer and close the case.

Thanks again~

Chad

0 Kudos
Reply
1,078 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @chadA,

I hope you are doing well.

This may be possible due to a clock configuration mismatch between the i.MX6ul & the TI's codec, Please re-check them.
Please share the configurations as well to debug them.

Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply
1,060 Views
chadA
Contributor III

Hi @Dhruvit ,

Is there any information on how to use TDM mode with SAI on i.MX6UL for linux 4.1.15?

I checked the datasheet, it says SAI support TDM, but no more information. 

I tried to call "fsl_sai_set_dai_tdm_slot" in machine driver, and measure the signal. They also does not meet the definition of TDM, still same as IIS.

I want to get the waves as following:

chadA_0-1692086412213.png

Is it possible?

Thanks

Chad

 

 

 

 

0 Kudos
Reply