imx6q SSI master mode playback&record simultaneously

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6q SSI master mode playback&record simultaneously

ソリューションへジャンプ
1,774件の閲覧回数
kennychou
Contributor I

Hi all,

I using SSI as i2s-master then follow the step as below to get record data:

start playback in background ==> start record in foreground

 ==> end of playback ==> end of record

The record will force to end following end of playback even though I don't want to stop recording.

I have changed SSI as ssi-asynchronous mode to solve force stop record issue,

But it will get noise when recording first time.

Is there something I missed to set SSI correctly ?

0 件の賞賛
返信
1 解決策
1,432件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi kenny

regarding ssi i2s-master there is some limitation mentioned

in sect.61.8.1.4 I2S Mode i.MX6DQ Reference Manual

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf

When I2S modes are entered (I2S master (01) or I2S slave (10)), the following settings
are recommended:
• Sync mode (SSI_SCR[4] =1)

probably one can try other modes

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

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
1,432件の閲覧回数
kennychou
Contributor I

Hi Fabio,

Here is my patch for you reference.

Best Regards,

Kenny

0 件の賞賛
返信
1,432件の閲覧回数
kennychou
Contributor I

Hi igor,

My solution for capture is let it work as synchronous mode if not enable playback.

The SSI will work in asynchronous mode if playback & capture simultaneously,

but need to clear RXDIR and set SYN.

Thanks,

Kenny

0 件の賞賛
返信
1,432件の閲覧回数
fabio_estevam
NXP Employee
NXP Employee

Hi Kenny,

Could you please share your patch with us? Thanks

0 件の賞賛
返信
1,432件の閲覧回数
kennychou
Contributor I

Hi igor,

 

Many thanks for your kindly reply.

Indeed, it's relate to SSI_SCR[4], the noise will disappear if I modify code as below:

static int _fsl_ssi_set_dai_fmt(struct fsl_ssi_private *ssi_private,
  unsigned int fmt)
{

      /*if (ssi_private->cpu_dai_drv.symmetric_rates) {*/    /* Do it anyway */
             /* Need to clear RXDIR when using SYNC mode */
            srcr &= ~CCSR_SSI_SRCR_RXDIR;
            scr |= CCSR_SSI_SCR_SYN;
        /*}*/

}

But, record will fail if not enable playback in the first time.

 

Have a nice day!

Kenny

0 件の賞賛
返信
1,432件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

iisues for ssi simultaneous playback and capture may occur due to ssi limitations

described in Table 46-40. SSI Control Bits Requiring SSI to be Disabled Before Change
i.MX35 Reference Manual
http://www.freescale.com/files/dsp/doc/ref_manual/IMX35RM.pdf

also please check comments in linux/sound/soc/fsl/fsl_ssi.c
/**
 * fsl_ssi_hw_params

Best regards
igor

0 件の賞賛
返信
1,433件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi kenny

regarding ssi i2s-master there is some limitation mentioned

in sect.61.8.1.4 I2S Mode i.MX6DQ Reference Manual

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf

When I2S modes are entered (I2S master (01) or I2S slave (10)), the following settings
are recommended:
• Sync mode (SSI_SCR[4] =1)

probably one can try other modes

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

0 件の賞賛
返信