Wim Taymans [Tue, 31 Aug 2010 16:04:33 +0000 (18:04 +0200)]
echo-cancel: keep frame_size a power of 2
The speex echo canceler prefers a power of 2 for the frame size. Round down the
ideal frame_size to the nearest power of two. This makes sure we don't create
more than the requested frame_size_ms latency while still providing a power of 2
to the speex echo canceller.
Wim Taymans [Tue, 24 Aug 2010 09:46:18 +0000 (11:46 +0200)]
echo-cancel: tweak the resync code a little
Try to keep the drift between source and sink within 4ms now that we have more
accurate timings.
Don't force a resync on latency changes but let the drift code handle it.
Wim Taymans [Tue, 24 Aug 2010 09:22:20 +0000 (11:22 +0200)]
echo-cancel: use the phone media role
Tag the source and sink with the phone media roles so that they automatially
connect to phone streams such as Empathy when using the intended-rols module.
Tanu Kaskinen [Mon, 30 Aug 2010 15:34:41 +0000 (18:34 +0300)]
alsa-sink/source: Use the "namereg_fail" module argument.
This allows the name registry to mangle the names of auto-detected sinks and
sources to be unique, which makes it possible to load multiple identical sound
cards using module-udev-detect.
At least for now the module argument can only be passed through
module-alsa-card.
Tanu Kaskinen [Tue, 24 Aug 2010 14:33:58 +0000 (17:33 +0300)]
module-alsa-card: New argument: namereg_fail.
This is added so that module-udev-detect can load multiple module-alsa-card
instances with the same card name - forcing namereg_fail to false allows the
name registry to mangle the card names to be unique.
Wim Taymans [Mon, 23 Aug 2010 14:38:47 +0000 (16:38 +0200)]
make echo-cancel module that exposes a new sink and source
Make a new echo-cancel module that exposes a new sink and source. All data sent
to the sink is matched against the data captured from the source and
echo-canceled using the speex echo canceler.
Wim Taymans [Mon, 23 Aug 2010 09:59:13 +0000 (11:59 +0200)]
alsa: resume smoother after unsuspend
The smoother is paused when the device is suspended but never resumed on
unsuspend. Pass the paused = FALSE flag to the pa_smoother_reset() call to make
it unpause when unsuspending. This patch improves source timings quite a bit.
TODO:
- notify client that volume control is disabled
- change sink rate in passthrough mode if needed
- automatic detection of passthrough mode instead of hard
coded profile names
Tanu Kaskinen [Mon, 2 Aug 2010 11:12:26 +0000 (14:12 +0300)]
dbusiface-core: Track sinks and sources using synchronous hooks instead of asynchronous subscription events.
Using the subscription events caused an assertion crash sometimes when a sink
was removed and a new sink was created (i.e. card profile change) and a stream
was moved from the removed sink to the new sink. The stream dbus object's
subscription callback got a change event before the core dbus object's
subscription callback got the sink remove/creation events. The stream's
subscription callback then queried the core for the object path of the new
sink, and since the core was not yet aware of the new sink, an assertion was
hit in pa_dbusiface_device_get_path().
Now that the core uses synchronous hooks to keep the sink and source lists up
to date, this particular problem can't occur anymore.
This is required to when playing on a52: device, rewind is broken
in those plugins.
Credits to Michael Rans <mcarans@yahoo.co.uk> for finding this
workaround, and Tanu Kaskinen <tanuk@iki.fi> for providing
valuable feedback.
dbus: Use a struct as the hashmap items for listening_signals.
Previously we used libdbus's memory as keys in listening_signals, which caused
that the memory of the hashmap keys got overwritten, which led to that signals
weren't sent properly.
Tanu Kaskinen [Fri, 8 Jan 2010 09:09:25 +0000 (11:09 +0200)]
alsa: Fix log output to inform about positive base volumes correctly.
Positive base volume can happen, if the alsa volume range has been limited. For
example, in an embedded environment it may be known that the sound device is
capable of louder output than what the speakers can handle, so setting the max
volume below 0 dB makes sense.
Rewinding the ring buffer completely causes audible issues with DMAs.
Previous solution didn't work with tsched=0, and used tsched_watermark
for guardband, which isn't linked to hardware and could become really high
if underflows occurred.
Added separate parameter that can be tuned to hardware limitations and size
of DMA bursts.
Lennart Poettering [Mon, 22 Feb 2010 23:48:35 +0000 (00:48 +0100)]
esd,simple: use pa_memblockq_pop_missing()
We need to use pa_memblockq_pop_missing() for all request handling,
including the initial request, because otherwise the counters will be
stay off during the entire runtime.
Lennart Poettering [Mon, 22 Feb 2010 02:22:28 +0000 (03:22 +0100)]
suspend-on-idle: resume audio device even for initially corked streams
We need to resume audio devices even for streams that are created in
corked stat, so that the latency ranges of the audio device are known
during the initial latency negotiation. If we don't the latency
negotiation will be based on placeholder data and changed later on which
clients do not expect.