All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Cyclic DMA - callback properties and tx_status residue
Date: Fri, 11 May 2012 15:07:10 +0100	[thread overview]
Message-ID: <20120511140710.GC6220@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1336647675.15424.390.camel@vkoul-udesk3>

On Thu, May 10, 2012 at 04:31:15PM +0530, Vinod Koul wrote:
> This should not be in ASoC library. The driver should be able to detect
> if a tasklet was called for many dma completions and notify the client
> (soc-lib) accordingly.

No.  Think about the cyclic case.  How do you correctly record how many
'periods' have completed so that when your tasklet eventually gets called,
you call its callback the correct number of times?

I think that's totally pointless and wasteful too from the ALSA core code
point of view - all the ALSA cares about is that "some periods have
completed" and ALSA will then ask the low level driver where the DMA is,
and update things according to the current DMA position.

It is my opinion that having this emulation of the current position in
soc-dmaengine-pcm is not only causing a wrong direction to be taken here,
but is potentially causing inefficiency by forcing conditions into the API
which we really don't need.

> One way to do this would be to ensure that the descriptor is marked in
> irq_handler and then all descriptor completed notified in tasklet.

No.  You're assuming that for each IRQ you have the tasklet run exactly
once.  There is no such guarantee.

  parent reply	other threads:[~2012-05-11 14:07 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 14:45 Cyclic DMA - callback properties and tx_status residue Russell King - ARM Linux
2012-05-02 16:01 ` Vinod Koul
2012-05-02 16:27   ` Russell King - ARM Linux
2012-05-04 12:26     ` Russell King - ARM Linux
2012-05-04 12:45       ` Vinod Koul
2012-05-10 22:54         ` Russell King - ARM Linux
2012-05-11  3:00           ` Vinod Koul
2012-05-11 12:24             ` Linus Walleij
2012-05-11 13:03               ` Russell King - ARM Linux
2012-05-15  5:02                 ` Vinod Koul
2012-05-09  9:27     ` Linus Walleij
2012-05-09  9:33       ` Russell King - ARM Linux
2012-05-09 11:16         ` Mark Brown
2012-05-09 12:19           ` Russell King - ARM Linux
2012-05-09 12:49             ` Lars-Peter Clausen
2012-05-09 14:03             ` Mark Brown
2012-05-10  3:44             ` Vinod Koul
2012-05-10  7:44               ` Russell King - ARM Linux
2012-05-10 10:58                 ` Vinod Koul
2012-05-10 13:19                   ` Huang Shijie
2012-05-10 14:54                     ` Vinod Koul
2012-05-10  9:42               ` Mark Brown
2012-05-10 11:01                 ` Vinod Koul
2012-05-11 14:02                   ` Mark Brown
2012-05-11 14:07                   ` Russell King - ARM Linux [this message]
2012-05-11 14:18                     ` Mark Brown
2012-05-11 14:29                       ` Russell King - ARM Linux
2012-05-11 15:07                         ` Mark Brown
2012-05-15  5:07                     ` Vinod Koul
2012-05-15  7:37                       ` Russell King - ARM Linux
2012-05-15  8:58                         ` Vinod Koul
2012-05-09 12:35       ` Lars-Peter Clausen
2012-05-07 10:40 ` Mark Brown

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=20120511140710.GC6220@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.