ASOC error while trying to probe "simple-audio-card"

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

ASOC error while trying to probe "simple-audio-card"

Jump to solution
4,912 Views
moranmoran
Contributor III

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 :

moranmoran_0-1637157750609.png

Below are the relevant PINs we plan to use ( At the end , I'll add also Audio DAC ).

moranmoran_1-1637157824620.png

 

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.

moranmoran_2-1637157894540.pngmoranmoran_3-1637157921842.png

Please advise what can be the problem.

Thanks in advanced.

Moran.

 

 

 

 

 

 

0 Kudos
Reply
1 Solution
4,874 Views
moranmoran
Contributor III

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

moranmoran_0-1637311513419.png

Now I can move to the next step: probe out the SAI2 signals to the scope.

Thanks.

Moran

View solution in original post

0 Kudos
Reply
4 Replies
4,875 Views
moranmoran
Contributor III

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

moranmoran_0-1637311513419.png

Now I can move to the next step: probe out the SAI2 signals to the scope.

Thanks.

Moran

0 Kudos
Reply
4,902 Views
igorpadykov
NXP Employee
NXP Employee

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

0 Kudos
Reply
4,893 Views
moranmoran
Contributor III

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.  

0 Kudos
Reply
4,890 Views
igorpadykov
NXP Employee
NXP Employee

>What is the latest recommended Linux version by NXP?

 

1.jpg

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

0 Kudos
Reply