ESAI Audio issue: Linux imx 3.10.17

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

ESAI Audio issue: Linux imx 3.10.17

1,377 Views
sharvari
Contributor I

Hello,

  I am working on a custom board based on sabre auto board.  I am using linux-imx 3.10.17. I have to use ESAI for audio. I am writing a dummy driver which basically registers the soc card (which can then be used in ALSA utilities) and sets the hw params.

Now i have observed that other drivers use following functions in their code

snd_soc_dai_set_tdm_slot() and  snd_soc_dai_set_sysclk(). If i am using normal mode(i2s)( not TDM) ,then do i require to use snd_soc_dai_set_tdm_slot() function in my driver?

What is the exact purpose of these functions? What exactly do they do?

I wish to use imx pll4 clock for ESAI. For that, what configuration is needed?

Also  I want to set ESAI in master mode. What configuration is needed for that? Do I have to add anything in ESAI block in device tree?

-Thanks

Sharvari Harisangam

Labels (4)
0 Kudos
3 Replies

801 Views
igorpadykov
NXP Employee
NXP Employee

Hi Sharvari

snd_soc_dai_set_tdm_slot() and  snd_soc_dai_set_sysclk() are

described in kernel alsa documentation:

https://www.kernel.org/doc/htmldocs/alsa-driver-api/ch07.html

https://www.kernel.org/doc/htmldocs/alsa-driver-api/API-snd-soc-dai-set-tdm-slot.html

For linux esai driver configuration one can look at attached Linux Manual

sect.28.4.4 Devicetree Binding, examples from sdk and description of esai test

in Chapter 9 Configuring the ESAI Driver iMX6_Firmware_Guide.pdf

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

801 Views
sharvari
Contributor I

Hello Igor,

I want to use fsl_esai driver for two channels(stereo sound with left and right channel). Should i use network mode or normal mode? also how many slots would be needed in snd_soc_dai_set_tdm_slot() function?

-Thanks

Sharvari

0 Kudos

801 Views
sharvari
Contributor I

Hello,

In the function snd_soc_dai_set_sysclk(), how to set the clk_id and dir ? i am confused between ESAI EXTAL clock, ESAI FSYS clock and their directions.when to set which clock and how the direction is determined?

0 Kudos