imx6q SSI master mode playback&record simultaneously

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

imx6q SSI master mode playback&record simultaneously

Jump to solution
1,266 Views
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 Kudos
1 Solution
924 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
6 Replies
924 Views
kennychou
Contributor I

Hi Fabio,

Here is my patch for you reference.

Best Regards,

Kenny

0 Kudos
924 Views
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 Kudos
924 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Kenny,

Could you please share your patch with us? Thanks

0 Kudos
924 Views
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 Kudos
924 Views
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 Kudos
925 Views
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 Kudos