How to set continues mclk ON in processor?

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

How to set continues mclk ON in processor?

1,354 Views
parth_modi
Contributor I

Hi,

I am using imx8mq and 4.9.51 Linux distribution. I have connected processor's SAI1 to analog devices'ADAU1361 codec.(I2S interface)

My codec is working with external oscillator(12.288Mhz)MCLK. But i need to change clock source form external to internal.(i.e from processor's mclk pin).

The MCLK is generated from processor when i play audio.

Actually i need continues MCLK.

My query is

1) How to set continues mclk on in processor side?

Let me know if you need further information.

Thanks & regards,
Parth

0 Kudos
4 Replies

981 Views
parth_modi
Contributor I

Hi Igor,

Thanks for the reference.

This take lots of time to learn and We have little urgency to do this.

So,Can you please point out the exact function to set a mclk frequency and where to call?

Thanks & regards,

Parth

0 Kudos

981 Views
传策薛
Contributor V

May be you can use GPIO1_IO14 or GPIO1_IO15 pin ,iomux it as CLK

0 Kudos

981 Views
igorpadykov
NXP Employee
NXP Employee

Hi Parth

I am afraid there are no ready patches for that.

If you have some project requiring this feature, suggest to proceed with

 Professional Services to develop solution:

NXP Professional Services|NXP 

As simple workaround one can consider CCM_CLKO1,2 for outputting

continuous clock.


Best regards
igor

0 Kudos

981 Views
igorpadykov
NXP Employee
NXP Employee

Hi Parth

unfortunately there is no such option in dts file for such case, seems

driver modifications are needed. One can try to analyze driver sources in

linux/sound/soc/fsl/fsl_sai.c

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

use alsa tutorial:

Writing an ALSA Driver 

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

0 Kudos