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: Andy Wingo (apwingo_AT_eos.ncsu.edu)
Date: Wed Nov 14 2001 - 19:03:48 EET


On Wed, 14 Nov 2001, Karl MacMillan wrote:

> By having each client directly call the next client (by writing to the pipe)
> instead of having the server (jackd) call each client in turn there are less
> context switches - i.e. the server process is woken up less times.
>
> Karl

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.

regards,

wingo.


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 - 19:07:20 EET