Re: [linux-audio-dev] Simple question on JACK and callbacks

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Simple question on JACK and callbacks
From: Charles Iliya Krempeaux (tnt_AT_linux.ca)
Date: Wed Nov 14 2001 - 23:27:15 EET


Hello,

On Wed, 2001-11-14 at 10:52, Paul Davis wrote:
> >If I understand correctly, by reading the source and arguing with paul
> >:), the loop goes like this: well, actually, just the relevant part of
> >engine.c (this is from the old tarball, i haven't checked out cvs yet):
> >
> >in the function jack_engine_process(), trimmed for brevity:
> >
> >write (client->subgraph_start_fd, &c, sizeof (c));
> >
> >pollfd[0].fd = client->subgraph_wait_fd;
> >pollfd[0].events = POLLIN|POLLERR|POLLHUP|POLLNVAL;
> >
> >poll (pollfd, 1, engine->driver->period_interval);
> >
> >read (client->subgraph_wait_fd, &c, sizeof (c));
> >
> >so, if i understand correctly, jackd actually does get woken up after
> >each process. that's also necessary, so that if a client takes too long
> >that it can be cut out.
>
> nope. the function jack_rechain_graph() rearranges the FIFO's that
> connect each client, so that what karl described happens. in the above
> code, the JACK server writes to the first fd in the chain, then waits
> for either a read on the last fd, or a timeout. the "subchain" could
> have involved a dozen clients while the server stays asleep.

(I should say that I've only joined this list recently, so I wasn't here
when all the stuff that lead up to jack was discussed, but anyways...)

How would this system scale to a system with multiple processors? Can
it scale?

If I understand this correctly, this system is doing a form of
cooperative multitasking... with the Jack server making sure
everything is going OK. But, it seems that only one of these
audio processes is running at a time. And thus, you would be
taking advantage of a multiprocessor system. (Or am I missing
something?)

See ya

     Charles Iliya Krempeaux
     tnt @ linux.ca
     ckrempea @ alumni.sfu.ca


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Nov 14 2001 - 23:20:50 EET