All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Raymond Toy <rtoy@google.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Alsa timing question
Date: Wed, 31 Aug 2011 22:07:25 +0200	[thread overview]
Message-ID: <4E5E947D.3020300@ladisch.de> (raw)
In-Reply-To: <CAE3TgXE9tQPFZi5bUYkpkTQ4PC1Fh2FmHngrxLg+jWJ3a3_8WA@mail.gmail.com>

Raymond Toy wrote:
> Clemens Ladisch <clemens@ladisch.de> wrote:
>     The defaults for dmix's period_size, period_time, and periods are 1024,
>     -1, and 16.  They can be overridden by setting the configuration values
>     defaults.dmix.DRIVER.period_size/period_time/periods, where DRIVER is
>     the internal driver name (the name between the colon and the hyphen in
>     /proc/asound/cards, or the file name in /usr/share/alsa/cards/).
>
> Thanks for the info.  Can this be done programmatically?

Not really.  You could define your own device, but it wouldn't work together
with any open default dmix device.

> However for the application, I don't want to have to tell the user to set
> up dmix.

If you know that you're using dmix, and which hardware device is actually
used, you could use a PCM slave timer to get notifications of period
interrupts.  (The dmix plugin also uses this mechanism, but then rounds
the events to the application's period size.)

For PulseAudio, there seems to be no choice but to use a period size that
is somehow aligned to PA's internal timer granularity.


Regards,
Clemens

      reply	other threads:[~2011-08-31 20:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25  0:10 Alsa timing question Raymond Toy
2011-08-25  7:15 ` Clemens Ladisch
2011-08-25 15:52   ` Raymond Toy
2011-08-26  8:02     ` Clemens Ladisch
2011-08-26  8:29     ` Olivier Guillion - Myriad
2011-08-26 15:56       ` Raymond Toy
2011-08-27  8:08         ` Olivier Guillion - Myriad
2011-08-27  9:15           ` Jassi Brar
2011-08-29 18:41           ` Raymond Toy
2011-08-29 20:24   ` Raymond Toy
2011-08-30  7:49     ` Clemens Ladisch
2011-08-30 19:04       ` Raymond Toy
2011-08-31 20:07         ` Clemens Ladisch [this message]

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=4E5E947D.3020300@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=rtoy@google.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.