Hello,
I'm trying to interface a TLV320ADC6140 audio ADC (EVB) to imx8mm SOM, running Linux 5.4.85, but without success .... always get the same ASOC error :
asoc-simple-card: probe of board-sound_adc failed with error -22
What have I done :
- Include driver & enable it in the kernel config
- In the driver device tree bindings there is only I2C example :
After implementing it, I can see that the .ko loaded correctly, and the I2C bus works.
- I've enabled in device tree SAI2 + pinctl muxing and declared simple-audio-card in order to be recognized by ALSA.
Relevant captures from my device tree :
Below are the relevant PINs we plan to use ( At the end , I'll add also Audio DAC ).
Below:
- using TDM ( in order to support 2 ADC on the same bus)
- As far as I understand the SAI is the master, so BCLK and FSYNC from CPU.
Please advise what can be the problem.
Thanks in advanced.
Moran.
解決済! 解決策の投稿を見る。
Ok, update.
After debugging with printk the /sound/soc/generic/simple_card.c, I successfully moved one big step forward: the ASOC recognized my "simple-audio-card" and now it can be found as card# in /proc/asound/.
What was wrong :
- Remove the prefix before the dai-link CODEC & CPU
- Remove the widget - was wrong in front mt ADC driver
Now I can move to the next step: probe out the SAI2 signals to the scope.
Thanks.
Moran
Ok, update.
After debugging with printk the /sound/soc/generic/simple_card.c, I successfully moved one big step forward: the ASOC recognized my "simple-audio-card" and now it can be found as card# in /proc/asound/.
What was wrong :
- Remove the prefix before the dai-link CODEC & CPU
- Remove the widget - was wrong in front mt ADC driver
Now I can move to the next step: probe out the SAI2 signals to the scope.
Thanks.
Moran
Hi Moran
for TLV320 dts example one can look on
https://community.nxp.com/t5/i-MX-Processors/SAI-on-i-MX8M-Mini/m-p/959805
Linux 5.4.85 is not supported by nxp, but one can try to debug it, find where error happens using
AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
https://www.nxp.com/docs/en/application-note/AN4553.pdf
Best regards
igor
Hi Igor,
Thanks.
I've already looked into this example. Despite the fact that he is using Codec and I just want to connect an ADC, I can't see why I got an error.
Using a "simple-audio-card" in DTS without any real audio hardware connected should be good practice for debugging an ASOC or SAI controller, doesn't it? (also I got a real ADC connected).
What is the latest recommended Linux version by NXP?
Thanks in advance,
Moran.
>What is the latest recommended Linux version by NXP?
Best regards
igor