From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Jaroslav Kysela <perex@suse.cz>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: snd_pcm_wait() More details required.
Date: Mon, 22 Mar 2004 17:31:24 +0000 [thread overview]
Message-ID: <405F22EC.5070104@superbug.demon.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.58.0403221055520.1808@pnote.perex-int.cz>
Jaroslav Kysela wrote:
>>
>>So, when is a PCM ready?
>>If a PCM is already in SND_PCM_STATE_RUNNING, when is snd_pcm_wait()
>>supposed to return ?
>
>
> When avail >= avail_min.
1) Does this depend on period size in any way?
For example, if period size is 6000 frames, and I set avail_min to 2000
frames, will snd_pcm_wait() return when avail=2000 or avail=6000 ?
Another example, if persiod size is 1500, and I set avail_min to 2000,
will snd_pcm_wait() return when avail=200 or avail=3000 (2*1500)?
2) Is snd_pcm_wait() a call that uses little or no CPU time, much like a
poll?
3) It appears from the docs that I can set avail_min at any time, even
in SND_PCM_STATE_RUNNING.
commands to set it would be: -
snd_pcm_sw_params_current(this->audio_fd, swparams);
snd_pcm_sw_params_set_avail_min(this->audio_fd, swparams,
new_avail_min_size);
snd_pcm_sw_params(this->audio_fd, swparams);
or is there a better way to do it while in SND_PCM_STATE_RUNNING ?
4) If snd_pcm_wait() is waiting, and with another thread we change the
avail_min value, will the snd_pcm_wait() use the new value, or is the
new value only used on the next call to snd_pcm_wait()
>
>
>>I have discovered a problem with xine when using it. I have done a work
>>around in xine so that dmix now works in xine. I think that my
>>assumptions regarding snd_pcm_wait() might have been wrong, so I want to
>> get accurate details from yourselves.
>>It also might be a good idea to update the documentation for
>>snd_pcm_wait() with more details.
>
>
> We had a bug in the resample plugin which causes that snd_pcm_wait()
> function was broken. Try alsa-lib from CVS.
My current tests were not using the resampler. i.e. app using 48k, sound
card using 48k. I will try some tests that would use the resampler.
>
> Jaroslav
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
next prev parent reply other threads:[~2004-03-22 17:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-21 14:49 snd_pcm_wait() More details required James Courtier-Dutton
2004-03-22 9:56 ` Jaroslav Kysela
2004-03-22 17:31 ` James Courtier-Dutton [this message]
2004-03-22 17:51 ` Jaroslav Kysela
2004-03-23 12:33 ` Clemens Ladisch
2004-03-23 13:40 ` Jaroslav Kysela
2004-03-24 7:58 ` Clemens Ladisch
2004-03-24 8:59 ` Jaroslav Kysela
2004-03-22 10:10 ` Clemens Ladisch
2004-03-22 10:09 ` Jaroslav Kysela
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=405F22EC.5070104@superbug.demon.co.uk \
--to=james@superbug.demon.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=perex@suse.cz \
/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.