IMX6UL, linux configuration for two codecs on a single SAI

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

IMX6UL, linux configuration for two codecs on a single SAI

988 Views
jmsebastian
Contributor II

Hi there,

I am working on a custom platform with a iMX6UL processor.  I need to connect two codecs, each one with two DACs and two ADCs, to the same SAI. I need to send/receive pcm data to/from both codecs simultaneously, so I need to use TDM mode with 4 words.

I am not being able to write a correct device tree: if I set two dai-links (something similar to this link: https://community.nxp.com/message/1126123?commentID=1126123#comment-1126123), one for each codec, I cannot use both simultaneously.  An error is displayed for the second playback, saying that sai is already in use.

Is it possible to use sai + tdm + 2 codecs simultaneously with current linux drivers of SAI? How should I configure the device tree?

Any help will be highy appreciated.

Regards,

  Miguel

Labels (3)
Tags (3)
0 Kudos
2 Replies

791 Views
igorpadykov
NXP Employee
NXP Employee

Hi Miguel

>Is it possible to use sai + tdm + 2 codecs simultaneously with current linux drivers of SAI?

I am afraid such configuration is not supported in current linux.

In general sai driver supports multiple slots in linux/sound/soc/fsl/fsl_sai.c

fsl_sai.c\fsl\soc\sound - linux-imx - i.MX Linux kernel

.."slots = sai->slots"..

so one can try to debug it.

Also several codecs should be connected appropriately using sai clocks/data description in

Figure 42-1. I2S/SAI block diagram i.MX6UL Reference Manual

http://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

791 Views
jmsebastian
Contributor II

Thanks for your anser, Igor.

I'll try to debug it, as you suggest.

Best Regards,

  Miguel

0 Kudos