From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Brian Furey <brianmfurey@yahoo.co.uk>
Cc: ALSA LIST <alsa-devel@lists.sourceforge.net>
Subject: Re: intel8x0.c
Date: Tue, 30 Mar 2004 20:16:33 +0100 [thread overview]
Message-ID: <4069C791.2010503@superbug.demon.co.uk> (raw)
In-Reply-To: <20040330145655.64254.qmail@web25102.mail.ukl.yahoo.com>
Brian Furey wrote:
> Hi all,
> I have an intel810 onboard soundcard.I am using the
> alsa driver with a VoIP session.
> The intel8x0.c file has a minimum period byte size
> of 32 bytes with the minimum no. of periods being
> 1.The min and max rate is set to 48k.
>
> How can I find out what actual(runtime) size period
> the alsa driver is dealing with?
>
> Does it use the minimum size as the period size?
>
> Brian.
>
Brian, I am working on a VoIP setup. I am updating the asterisk alsa
console driver so that it actually works! The current driver is stuck
round about alsa api 0.5.x
The period size that the sound card is actually using does not really
matter, if just effects latency. The bigger the period size, the higher
the latency.
Just set the period size to the smallest the sound card can do, and then
just read and write to it.
I found that PLAYBACK and CAPTURE directions can have different period
sizes, so it is better to open separate handles for playback and capture.
In the config setup, you set the buffer and period sizes, and before you
set them, you can retrieve the current min/max period and buffer sizes.
For playback, it is best to have a certain minimum buffer being full
most of the time, due to network jitter, and this buffer can act as the
jitter buffer. The actual size of this is probably best found out from
trial and error (I have not finished testing this bit yet).
For capture, just poll for input, and then read whatever is in the
capture buffer and transmit it. You can experiment with different
methods of early buffer reads, but again, I have not finished testing
with that, so I can't give you any definite answers.
Another thing to test with could be sampling and playback at 48k.
Most sound cards work at 48k, and this would reduce the period_time.
(period_size stays the same, but as one is using a higher rate, the
period_time decreases, and thus latency.) The problems with that is that
most VoIP is at 8k, so some resampling is required.
Cheers
James
-------------------------------------------------------
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-30 19:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-30 14:56 intel8x0.c Brian Furey
2004-03-30 15:41 ` intel8x0.c Jaroslav Kysela
2004-03-30 17:20 ` intel8x0.c Brian Furey
2004-03-30 17:28 ` intel8x0.c Jaroslav Kysela
2004-03-30 19:16 ` James Courtier-Dutton [this message]
2004-03-31 9:46 ` intel8x0.c Brian Furey
2004-04-15 11:27 ` alsa driver data rates Brian Furey
2004-04-15 11:43 ` James Courtier-Dutton
2004-04-16 8:33 ` Clemens Ladisch
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=4069C791.2010503@superbug.demon.co.uk \
--to=james@superbug.demon.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=brianmfurey@yahoo.co.uk \
/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.