How do I configure imx6q's I2S as master mode?

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

How do I configure imx6q's I2S as master mode?

575 Views
明镜明
Contributor I

HI, 

Added to the machine driven hw_params。

dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
                SND_SOC_DAIFMT_CBS_CFS;

        /* set codec DAI configuration */
        ret = snd_soc_dai_set_fmt(codec_dai, dai_format);

when i using aplay to play  a  wav file.  

There was no sound, nor was the clock 。

what can i do for this ?

Tags (1)
0 Kudos
2 Replies

458 Views
igorpadykov
NXP Employee
NXP Employee

Hi 明镜 明 

please refer to

https://patchwork.kernel.org/patch/4933091/

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

0 Kudos

458 Views
明镜明
Contributor I

@igorpadykov

HI,igorpadykov

thanks!

i2s works in slave mode.   but  bit clock and  frame sync clock  dnot work correctly . 

i configure the register STCCR ,  the sys's clock is 24M.   

i follw  Table 61-7. SSI Bit Clock and Frame Rate as a Function of PSR, PM, and
DIV2 to configure the  STCCR.  bit clock and frame sync clock are not correctly。

i follw the sencond one。 but actually bit clock is not 256k,and the frame sync clock is not 8k。

how can i configure the register ?

how can i call  function imx_ssi_set_dai_clkdiv according to the sample_rate and sample_format? 

0 Kudos