Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schoenleitner <dev.c0debabe@gmail.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: underruns and POLLERR when copying audio frames
Date: Wed, 21 Jul 2010 12:20:10 +0200	[thread overview]
Message-ID: <4C46C9DA.6010401@gmail.com> (raw)
In-Reply-To: <4C469CAC.3030202@ladisch.de>

Clemens Ladisch wrote:
> Stefan Schoenleitner wrote:
>> Clemens Ladisch wrote:
>>> How do you synchronize the clocks of both devices?
>> I don't.  [...]
>> I guess if clock drift gets too high, I will get xruns as well ?
> 
> Yes.

Hmm, ok.
For now I will just add buffering and hope that the buffer is big enough
 so that there will be no xruns for reasonable long amounts of time.
In case I get troubles anyway, is there some kind of way to synchronize
clocks between the ALSA stack running on one system with the stack on
another system ?


>> But as mmapping just seems to work for files, I no longer think it is
>> possible.
> 
> Some optimization is possible even when only one device supports mmap:
> When you want to copy from the hardware device to the plugin, you could
> call the plugin's snd_pcm_writei with an address in the sound card's
> buffer as the source.

right.

Thanks four your input,

cheers,
stefan

  reply	other threads:[~2010-07-21 10:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 11:00 underruns and POLLERR when copying audio frames Stefan Schoenleitner
2010-07-20 13:41 ` Clemens Ladisch
2010-07-20 22:50   ` Stefan Schoenleitner
2010-07-21  7:07     ` Clemens Ladisch
2010-07-21 10:20       ` Stefan Schoenleitner [this message]
2010-08-02  3:02         ` pl bossart

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=4C46C9DA.6010401@gmail.com \
    --to=dev.c0debabe@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    /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