Re: [LAD] JACK and ALSA elucidations

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paul Davis <paul@...>
Cc: linux-audio-dev@lists.linuxaudio.org <linux-audio-dev@...>
Date: Wednesday, March 12, 2014 - 3:21 am

--Apple-Mail=_7829816B-E443-45BD-AA8A-7C9B0322B279
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=windows-1252

Em 11/03/2014, =E0(s) 23:50, Paul Davis =
escreveu:

>=20

wrote:
wrote:
don=92t get it. Is there a relation between the ALSA period with JACK=92s=
period?
and 16 on the BBB

Sorry. I mean, JACK says ALSA uses that period size (ALSA: use 16 =
periods for capture)

double "buffered" model where the total size of the hardware memory area =
used for transfers (what ALSA calls the "hardware buffer") is always =
twice the "buffer size".
the total hardware buffer size. This is unusual among audio APIs, except =
that JACK follows the same convention in its ALSA backend. You can =
specify the period size (-p) and the number of "periods" that make up =
the hardware buffer.
per interrupt, is it?
ideal world, those settings mean that the DEVICE will buffer 128 samples =
before issuing an interrupt, and that its total buffer size is 256.
generically to "ALSA will wake the client up whenever at least 128 =
samples of data (and/or space) are available".
buffering, not the interval ("period") between when the application is =
woken.
And where does the 16 (from ALSA: use 16 periods for capture) affects?

if I call jack using -p128 / -n2 and the opening message states that =
ALSA uses 16 periods for capture the sound card will buffer a total of =
256 samples and ALSA will wake the client each 16 frames?

If I used -p256 / -n2 instead ALSA would wake the client each 32 frames?=20=

--Apple-Mail=_7829816B-E443-45BD-AA8A-7C9B0322B279
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=windows-1252

Em 11/03/2014, =E0(s) 23:50, Paul =
Davis <paul@linuxaudiosystems.com&=
gt; escreveu:On Tue, Mar 11, 2014 at 10:26 PM, Gianfranco =
Ceccolini <gianfranco@portalmod.com.br> wrote:

On Mon, Mar 10, 2014 at 9:51 AM, Gianfranco =
Ceccolini <gianfranco@portalmod.com.br> wrote:

Paul. I=92m really sorry for my lack of comprehension, but I still don=92t=
get it.  Is there a relation between the ALSA period with JACK=92s =
period?they are =
identical.
How can that be? JACK says -p 128 samples and =
ALSA says 2 on the PC and 16 on the =
BBBHow does ALSA "say" =
anything?Sorry. =
I mean, JACK says ALSA uses that period size (ALSA: use 16 periods for =
capture) 
 
note: other audio APIs call this a "buffer". some, like ASIO, force =
a double "buffered" model where the total size of the hardware memory =
area used for transfers (what ALSA calls the "hardware buffer") is =
always twice the "buffer size".

ALSA offers control over *both* the "period" (between interrupts) =
and the total hardware buffer size. This is unusual among audio APIs, =
except that JACK follows the same convention in its ALSA backend. You =
can specify the period size (-p) and the number of "periods" that make =
up the hardware buffer.
So if I use -p128 and -n2 it =
means the kernel will buffer 256 samples per interrupt, is =
it?No. What it means depends =
on the precise details of the device. In an ideal world, those settings =
mean that the DEVICE will buffer 128 samples before issuing an =
interrupt, and that its total buffer size is 256.
However, USB devices etc. do not work this way, so it =
translates more generically to "ALSA will wake the client up whenever at =
least 128 samples of data (and/or space) are available".
The -n 2 parameter only affects the total amount of hardware =
buffering, not the interval ("period") between when the application is =
woken.
And where does the 16 (from ALSA: use 16 periods for =
capture) affects?if I call jack using -p128 / =
-n2  and the opening message states that ALSA uses 16 periods for =
capture the sound card will buffer a total of 256 samples and ALSA will =
wake the client each 16 frames?If I used -p256 =
/ -n2 instead ALSA would wake the client each 32 =
frames? =

--Apple-Mail=_7829816B-E443-45BD-AA8A-7C9B0322B279--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] JACK and ALSA elucidations, Gianfranco Ceccolini, (Fri Feb 28, 5:58 pm)
Re: [LAD] JACK and ALSA elucidations, Jeremy Jongepier, (Fri Feb 28, 8:01 pm)
Re: [LAD] JACK and ALSA elucidations, Gianfranco Ceccolini, (Mon Mar 10, 1:51 pm)
Re: [LAD] JACK and ALSA elucidations, Alex Gagnon, (Mon Mar 10, 2:34 pm)
Re: [LAD] JACK and ALSA elucidations, Paul Davis, (Mon Mar 10, 2:50 pm)
Re: [LAD] JACK and ALSA elucidations, Paul Davis, (Mon Mar 10, 2:26 pm)
Re: [LAD] JACK and ALSA elucidations, Gianfranco Ceccolini, (Wed Mar 12, 2:26 am)
Re: [LAD] JACK and ALSA elucidations, Paul Davis, (Wed Mar 12, 2:50 am)
Re: [LAD] JACK and ALSA elucidations, Gianfranco Ceccolini, (Wed Mar 12, 3:21 am)
Re: [LAD] JACK and ALSA elucidations, Paul Davis, (Wed Mar 12, 12:12 pm)
Re: [LAD] JACK and ALSA elucidations, Jeremy Jongepier, (Wed Mar 12, 11:37 am)
Re: [LAD] JACK and ALSA elucidations, Paul Davis, (Fri Feb 28, 6:12 pm)