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:
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
解決済! 解決策の投稿を見る。
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/
"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/
I hope it helps!
Thanks & Regards,
Dhruvit Vasavada
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
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/
"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/
I hope it helps!
Thanks & Regards,
Dhruvit Vasavada
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
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
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:
Is it possible?
Thanks
Chad