IMX6UL, linux configuration for two codecs on a single SAI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX6UL, linux configuration for two codecs on a single SAI

1,266 次查看
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

标签 (3)
标记 (3)
0 项奖励
回复
2 回复数

1,069 次查看
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 项奖励
回复

1,069 次查看
jmsebastian
Contributor II

Thanks for your anser, Igor.

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

Best Regards,

  Miguel

0 项奖励
回复