Andre Noll [Sat, 13 Feb 2010 12:12:47 +0000 (13:12 +0100)]
dccp_recv: Use para_readv() instead of recv_bin_buffer().
When the end of the buffer pool area is reached, the old code ended up calling recv()
with a buffer size smaller than a full datagram. This results in data being lost
because the remaining part of the datagram will be discarded rather than returned
at the next call to recv().
By using the new btr_pool_get_buffers() we obtain two buffers in this case, a small
one pointing to the end of the area and a larger one pointing to the area start. Passing
both buffers to para_readv() instead of using recv_bin_buffer() receives the full
datagram and therefore avoids the above mentioned loss of data.
Andre Noll [Sat, 13 Feb 2010 11:57:35 +0000 (12:57 +0100)]
Introduce btr_pool_get_buffers().
This allows the users of the buffer pool API to obtain references to both parts
of the buffer pool area in case there is free space available at the end of the
area as well as at the beginning.
This is needed for reading from file descriptors where reading less than a full
datagram would discard the remaining part (DCCP and UDP).
Andre Noll [Mon, 8 Feb 2010 13:46:48 +0000 (14:46 +0100)]
alsa: Remove xrun().
This function tried to compute the duration of the underun but never
really worked. The values were more or less random (up to hundreds
of seconds) and thus of little value.
Gerrit Renker [Wed, 3 Feb 2010 14:05:33 +0000 (15:05 +0100)]
Fix make clean and make install.
Commit 77aa6680 replaced the hardcoded list of binaries in Makefile.in
by the autoconf macro @executables@. However, the "install" and the
"clean" targets still used the now undefined $(BINARIES) variable. This
caused "make clean" to not remove any executables and "make install"
to fail with
/usr/bin/install -c -s -m 755 /usr/local/bin
/usr/bin/install: missing destination file operand after `/usr/local/bin'
Try `/usr/bin/install --help' for more information.
Fix this bug by using @executables@ rather than $(BINARIES).
Andre Noll [Sat, 30 Jan 2010 13:20:19 +0000 (14:20 +0100)]
audiod: Split open_current_receiver().
We need to check whether the current receiver should be opened from both
pre_select() and post_select(). So rename this function to must_start_decoder(),
make it return bool and do not start the decoder there.
This change makes audiod start the decoder as soon as possible.
Andre Noll [Tue, 19 Jan 2010 00:21:32 +0000 (01:21 +0100)]
Don't hardcode the list of executables in Makefile.in.
Just export the list via the $all_executables variable from configure.ac. Rename it to
$ececutables while we're at it and remove two unused variables in configure.ac.
Andre Noll [Sun, 17 Jan 2010 20:30:27 +0000 (21:30 +0100)]
[btr]: Avoid a gcc warning.
Although the warning
warning: 'brs[1]' may be used uninitialized in this function
is clearly bogus, it can't hurt to assert that i == 2 which also makes the warning to away.
Andre Noll [Fri, 15 Jan 2010 05:46:03 +0000 (06:46 +0100)]
btr support for para_client.
The use of the client code in audiod requires a node to be inserted
as the _parent_ of some existing node, which was not neccessary
before. Therefore a new btrn pointer for the child node is added to
struct btr_node_description and btr_new_node() is adjusted accordingly.
The patch also adds a small helper sched_request_barrier() to
the scheduler.
Andre Noll [Thu, 14 Jan 2010 03:19:59 +0000 (04:19 +0100)]
Introduce btr_node_description.
As the number of arguments to btr_new_node() grows, the code becomes
hard to read, especially since some callers must set many of the
arguments to NULL.
Using a pointer to a struct has the additional advantage that adding
new parameters does no longer require to touch all callers.
Andre Noll [Wed, 13 Jan 2010 23:11:46 +0000 (00:11 +0100)]
[btr] Fix merge_input_pool().
This function contained the following bug: wbr, buf1 and sz1 could
be used without being initialized. This was sometimes hitting the
assertion (buf1 && buf2).
Fix this by initializing these variables at the top.