public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Zidan Wang <zidan.wang@freescale.com>
To: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: alsa-devel@alsa-project.org, timur@tabi.org, lgirdwood@gmail.com,
	tiwai@suse.com, broonie@kernel.org
Subject: Re: [PATCH] ASoC: fsl_sai: fix no frame clk in master mode
Date: Wed, 12 Aug 2015 15:59:15 +0800	[thread overview]
Message-ID: <20150812075914.GC21786@shlinux2> (raw)
In-Reply-To: <20150812035317.GA3194@Asurada-CZ80>

On Tue, Aug 11, 2015 at 08:53:25PM -0700, Nicolin Chen wrote:
> On Wed, Aug 12, 2015 at 10:25:45AM +0800, Zidan Wang wrote:
> > After several open/close sai test with ctrl+c, there will be I/O error.
> > The SAI can't work anymore, can't recover. There will be no frame clock.
> > With adding the software reset in trigger stop, the issue can be fixed.
> 
> It doesn't look like a decent fix to me. Is it the only fix that
> IC team suggests? And why put this reset in the trigger function.
> Your MEGA fast patch has already included a software reset in the
> PM runtime functions. When dealing with CTRL+C test cases, that
> software reset should have worked as well.
> 
The MEGA fast patch add the suspend/resume function, but CTRL+C will not trigger suspend/resume function.
When CTRL+C, it will trigger stop and software reset SAI.
IC team suggest us to rest it, but I don't know if it's the only fix.

Best Regards,
Zidan Wang

> Nicolin
> 
> > Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
> > ---
> >  sound/soc/fsl/fsl_sai.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > index 5c737f1..6a947dc 100644
> > --- a/sound/soc/fsl/fsl_sai.c
> > +++ b/sound/soc/fsl/fsl_sai.c
> > @@ -504,6 +504,13 @@ static int fsl_sai_trigger(struct snd_pcm_substream *substream, int cmd,
> >  					   FSL_SAI_CSR_FR, FSL_SAI_CSR_FR);
> >  			regmap_update_bits(sai->regmap, FSL_SAI_RCSR,
> >  					   FSL_SAI_CSR_FR, FSL_SAI_CSR_FR);
> > +
> > +			/* Software Reset for both Tx and Rx */
> > +			regmap_write(sai->regmap, FSL_SAI_TCSR, FSL_SAI_CSR_SR);
> > +			regmap_write(sai->regmap, FSL_SAI_RCSR, FSL_SAI_CSR_SR);
> > +			/* Clear SR bit to finish the reset */
> > +			regmap_write(sai->regmap, FSL_SAI_TCSR, 0);
> > +			regmap_write(sai->regmap, FSL_SAI_RCSR, 0);
> >  		}
> >  		break;
> >  	default:
> > -- 
> > 1.9.1
> > 

  reply	other threads:[~2015-08-12  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12  2:25 [PATCH] ASoC: fsl_sai: fix no frame clk in master mode Zidan Wang
2015-08-12  3:53 ` Nicolin Chen
2015-08-12  7:59   ` Zidan Wang [this message]
2015-08-12  9:19     ` Nicolin Chen
2015-08-18  2:01       ` Zidan Wang
2015-08-21  7:47         ` Nicolin Chen
2015-08-21  8:40           ` Zidan Wang
2015-10-23  7:48             ` Nicolin Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150812075914.GC21786@shlinux2 \
    --to=zidan.wang@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=nicoleotsuka@gmail.com \
    --cc=timur@tabi.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox