From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] dma: mxs-dma: Track number of irqs for callback
Date: Thu, 26 Sep 2013 17:11:37 +0200 [thread overview]
Message-ID: <52444EA9.1090502@pengutronix.de> (raw)
In-Reply-To: <1380207996-27257-3-git-send-email-mpa@pengutronix.de>
On 09/26/2013 05:06 PM, Markus Pargmann wrote:
> Currently there is one tasklet scheduled for all interrupts between two
> mxs_dma_tasklet calls for one channel. With more than one interrupts,
> the tasklet is only called once.
>
> Using low latency audio playback, can lead to problems. When using
> sound/soc/soc-dmaengine-pcm.c, the dmaengine_pcm_dma_complete relies on
> being called for each interrupt that occures. This function is the
> callback which is called from the mxs-dma driver in mxs_dma_tasklet.
> This can cause wrong position counters and can lead to a wrong DMA
> buffer offset. In this situation the DMA engine and pcm lib may write
> and read from the same buffer segment.
>
> This patch adds a locked per-channel irq counter and calls the callback
> function in a loop for irq-counter times.
If you have two counters, one for generated interrupts and one for
handled interrupts, you don't need any locking.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130926/c342f684/attachment.sig>
next prev parent reply other threads:[~2013-09-26 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 15:06 [PATCH 0/3] dma: mxs-dma bugfixes and cleanup Markus Pargmann
2013-09-26 15:06 ` [PATCH 1/3] dma: mxs-dma: Cleanup interrupt handler Markus Pargmann
2013-09-26 15:06 ` [PATCH 2/3] dma: mxs-dma: Track number of irqs for callback Markus Pargmann
2013-09-26 15:11 ` Marc Kleine-Budde [this message]
2013-09-26 19:26 ` Russell King - ARM Linux
2013-09-30 12:43 ` Markus Pargmann
2013-09-26 15:06 ` [PATCH 3/3] dma: mxs-dma: Pause channel while prep_dma_cyclic Markus Pargmann
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=52444EA9.1090502@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).