From: Clemens Ladisch <clemens@ladisch.de>
To: Joerg-Cyril.Hoehle@t-systems.com
Cc: alsa-devel@alsa-project.org
Subject: Re: How to pair Wine with ALSA? part1: intro & underruns (long)
Date: Tue, 16 Aug 2011 09:16:08 +0200 [thread overview]
Message-ID: <4E4A1938.5080209@ladisch.de> (raw)
In-Reply-To: <8E4C156DA5797D418DBFADFD8CE655A41392BAD314@HE113481.emea1.cds.t-internal.com>
Joerg-Cyril.Hoehle@t-systems.com wrote:
> Clemens Ladisch wrote:
> > > [...] GetPosition returns "the stream position of the sample that
> > > is currently playing through the speakers".
> >However, does that documentation actually make a distinction between the
> >last sample that has been read from the buffer and the sample being played?
>
> Er, what do you mean?
Er, that I didn't read the documentation. After Googling, I see that
your interpretation is correct.
> BTW, I thought dmix could be used with any card, but I found no
> one-liner syntax to open card 1 with dmix. It seemed hard-wired (by
> configuration) to card0 (not that I'm familiar with ALSA conf syntax).
Device names can have parameters; you can use "dmix:x" or "dmix:CARD=x"
or "dmix:{ CARD=x; }" or whatever other syntax is allowed by ALSA's
configuration system. And yes, it's mostly undocumented.
> >Configuring the device to stop on xruns seems to be a better fit for
> >your requirements.
>
> That's what Wine used to do in the former driver.
>
> But it's precisely because dmix does(did?) not support xrun detection
> that I started looking into the free-running mode.
Any device _must_ stop on xrun, if so configured. Not doing so would
be a bug. Could you still reproduce it now?
> >The meaning of ALSA's periods is as follows:
> >2) When ALSA is blocked (in snd_pcm_write* or in poll), it checks
> > whether to wake up the application only when an interrupt arrives.
>
> What about non-blocking mode? Do you mean to imply that in
> non-blocking mode, never using poll() causes period_size to become
> irrelevant from the app POV?
Yes. Recently, the possibility to disable interrupts (period_wakeup)
was added to a few drivers; PulseAudio uses this.
http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___h_w___params.html#gfbacdcf2339d2d6ad984815f6b720888
> The new driver doesn't use poll at all. It uses a fixed rate timer
> signal. Is that against any recommendations? What's bad about it?
Well, that duplicates PulseAudio's code. ;-)
Regards,
Clemens
next prev parent reply other threads:[~2011-08-16 7:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 12:02 How to pair Wine with ALSA? part1: intro & underruns (long) Joerg-Cyril.Hoehle
2011-08-14 12:22 ` Clemens Ladisch
2011-08-15 15:50 ` Joerg-Cyril.Hoehle
2011-08-16 7:16 ` Clemens Ladisch [this message]
2011-08-17 3:25 ` Arun Raghavan
2011-08-17 12:19 ` 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=4E4A1938.5080209@ladisch.de \
--to=clemens@ladisch.de \
--cc=Joerg-Cyril.Hoehle@t-systems.com \
--cc=alsa-devel@alsa-project.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.