All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Trent Piepho <tpiepho@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: snd_pcm_drain and partial periods
Date: Fri, 25 Nov 2011 18:38:56 +0100	[thread overview]
Message-ID: <4ECFD2B0.9050703@ladisch.de> (raw)
In-Reply-To: <CA+7tXihNEmsjq=xkb5T22smnCcVM8vdBxMYwHSz4YFbMWo5_5g@mail.gmail.com>

Trent Piepho wrote:
> When the driver schedules the final period, couldn't it check if the
> device is draining, and if so try to end playback at the right time.

The ALSA framework was designed for cards where DMA doesn't need to
be scheduled continuously, so it is assumed that stopping happens
asynchronously.

You could try to check the PCM state, but it's possible that the call
to snd_pcm_drain() happens after you've scheduled the final period.


Regards,
Clemens

  reply	other threads:[~2011-11-25 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CA+7tXihfkZd6+UmnwJiyLgwo+6PoU9fWvzNhz7FKzy7DNgAWMw@mail.gmail.com>
2011-11-23 23:44 ` snd_pcm_drain and partial periods Trent Piepho
2011-11-24 14:17   ` Clemens Ladisch
2011-11-25 16:37     ` Trent Piepho
2011-11-25 17:38       ` Clemens Ladisch [this message]
2011-11-27  6:05         ` Trent Piepho
2011-11-28  1:16     ` Raymond Yau

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=4ECFD2B0.9050703@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tpiepho@gmail.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 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.