Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Roberto Fichera <kernel@tekno-soft.it>
To: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Shengjiu Wang <shengjiu.wang@freescale.com>,
	Caleb Crome <caleb@crome.org>,
	"arnaud.mouiche@invoxia.com" <arnaud.mouiche@invoxia.com>,
	Markus Pargmann <mpa@pengutronix.de>,
	"shawn.guo@linaro.org" <shawn.guo@linaro.org>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: fsl_ssi.c: Roberto's problem: ssi hangs after some number of samples
Date: Wed, 4 Nov 2015 19:09:14 +0100	[thread overview]
Message-ID: <563A49CA.8090501@tekno-soft.it> (raw)
In-Reply-To: <20151104175815.GB3794@Asurada-CZ80>

On 11/04/2015 06:58 PM, Nicolin Chen wrote:
> On Wed, Nov 04, 2015 at 04:33:16PM +0100, Roberto Fichera wrote:
>  
>> With the patch below I'm able to see the error happening. And more likely it happen just just afterwards
>> the EVTERR notify the problem to the ISR. At this point the DMA simply stalls due to some problems, most
>> likely because the SSI FIFO is in overflow or underflow condition. I will do add the code to dump the SSI
> No, SSI FIFO under/overflow were caused by the DMA stall as their
> channels got error out -- SSI was still consuming the TX FIFO and
> filling the RX FIFO while DMA didn't move the data at all so SSI
> FIFOs got under/overflowed.

Yeah! The SSI is correctly reporting this problem because DMA is stalled for some reason.

>
>> I think that at this point we should in theory restart the DMA channel, but however how to fix this and
>> why this is happening?
> According to Reference Manual:
> ----
>
> 1) The CHNERR[i] bit is set when a DMA request that triggers channel
> i is received through the corresponding input pins and the EP[i]
> bit is already set;
>
> 2) Externally triggered channel pending flag EP[i] is set by the
> scheduler when the channel was activated by a DMA request. It can
> be cleared by the ith channel script.
>
> ----
>
> It looks like your system made another DMA request while the SDMA
> was still in the middle of the transaction for the same channel.

I don't know because this is something I cannot control. I'm just setting up 2 cyclic dma
for both TX and RX before to set both RDMAE and TDMAE and nothing else. The rest
is done by the SDMA ISR.

> I guess you should find a way to make less frequent DMA requests,
> making higher watermarks and larger burst size for example.
>
I can try to increase the FIFO watermark up to 15 elements, but after that
I don't have more choices. The problem is that the TDM has to run continuously
because the SLIC need it. I can eventually enable and disable the DMA requests
depending by the active channels for optimization, but the problem still,why the
DMA transfer is not triggered?

  reply	other threads:[~2015-11-04 18:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 18:01 fsl_ssi.c: Roberto's problem: ssi hangs after some number of samples Caleb Crome
2015-10-31  9:16 ` Roberto Fichera
2015-11-01 20:31   ` Fabio Estevam
2015-11-02  9:57     ` Roberto Fichera
2015-11-02 17:51   ` Roberto Fichera
2015-11-02 18:03     ` Roberto Fichera
2015-11-03  0:56       ` Caleb Crome
2015-11-03  8:21         ` Roberto Fichera
2015-11-03 21:26   ` Caleb Crome
2015-11-04 15:33     ` Roberto Fichera
2015-11-04 16:53       ` Roberto Fichera
2015-11-04 17:41         ` Caleb Crome
2015-11-04 17:52           ` Roberto Fichera
2015-11-04 18:11             ` Nicolin Chen
2015-11-04 21:47               ` Roberto Fichera
2015-11-05 10:03               ` Roberto Fichera
2015-11-05 11:30                 ` Fabio Estevam
2015-11-05 11:48                   ` Roberto Fichera
2015-11-04 17:58       ` Nicolin Chen
2015-11-04 18:09         ` Roberto Fichera [this message]
2015-11-04 18:18           ` Nicolin Chen
2015-11-04 21:48             ` Roberto Fichera
  -- strict thread matches above, loose matches on Subject: below --
2015-11-05 21:34 Caleb Crome
2015-11-05 22:08 ` Roberto Fichera
2015-11-05 22:25   ` Caleb Crome
2015-11-05 22:40     ` Roberto Fichera
2015-11-05 22:49       ` Caleb Crome
2015-11-05 23:01         ` Roberto Fichera
2015-11-05 23:21           ` Caleb Crome
2015-11-05 23:28             ` Roberto Fichera
2015-11-05 23:30               ` Caleb Crome
2015-11-05 23:46                 ` Roberto Fichera
2015-11-06  0:35                   ` Caleb Crome

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=563A49CA.8090501@tekno-soft.it \
    --to=kernel@tekno-soft.it \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.mouiche@invoxia.com \
    --cc=caleb@crome.org \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=mpa@pengutronix.de \
    --cc=nicoleotsuka@gmail.com \
    --cc=shawn.guo@linaro.org \
    --cc=shengjiu.wang@freescale.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