Commit graph

5355 commits

Author SHA1 Message Date
Wim Taymans
dc5ec2c296 alsa: increase the smoother window
40ms for the smoother window is too small. Increase the size to 4 seconds, like
we do for the sinks.
2010-09-03 16:49:03 +02:00
Wim Taymans
d18cae458f 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.
2010-09-02 17:31:37 +02:00
Wim Taymans
1983337f0e echo-cancel: improve debug 2010-09-02 17:31:36 +02:00
Wim Taymans
c3cc461bf5 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.
2010-09-02 17:31:36 +02:00
Wim Taymans
95bdf67500 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.
2010-09-02 17:31:36 +02:00
Tanu Kaskinen
a543af539c 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.
2010-08-30 18:34:41 +03:00
Tanu Kaskinen
0525807b63 alsa-sink: Get rid of a compiler warning regarding rewind_safeguard type.
GCC gave a warning, because the pointer given to pa_modargs_get_value_u32() had
type size_t instead of uint32_t.
2010-08-24 18:19:49 +03:00
Tanu Kaskinen
6e33845783 module-udev-detect: When loading module-alsa-card, use namereg_fail=false. 2010-08-24 18:19:49 +03:00
Tanu Kaskinen
c277dc65a3 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.
2010-08-24 17:58:35 +03:00
Wim Taymans
ef0c73cb9d echo-cancel: take into account snapshot delay
Take into account the delay between taking the snapshot from the source and the
sink. Improves the quality of the timings.
2010-08-23 17:47:40 +02:00
Wim Taymans
3dc5469c1f 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.
2010-08-23 16:55:23 +02:00
Wim Taymans
ef8abcb1b5 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.
2010-08-23 11:59:13 +02:00
Tanu Kaskinen
7ba22276d2 core: New function: pa_module_update_proplist(). 2010-08-19 12:10:01 +03:00
Tanu Kaskinen
614eef8331 loopback: Make stream names and roles configurable. 2010-08-19 12:08:43 +03:00
Pierre-Louis Bossart
9b6c84ad6e AC3 passthrough support
Second version after Tanu's feedback

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

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-08-12 18:20:27 +01:00
Tanu Kaskinen
021aa306aa 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.
2010-08-10 15:19:50 +03:00
Lennart Poettering
1552abf628 udev: fix hex decoding 2010-07-19 01:27:22 +02:00
Pierre-Louis Bossart
f26c849efc alsa: add missing iec958 files from previous commit 2010-07-15 08:18:29 +01:00
Pierre-Louis Bossart
fb405765d9 alsa: fix mixer profiles, add passthrough config
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-07-13 23:33:45 +01:00
Pierre-Louis Bossart
cb55b00ccd alsa: disable rewinds when using ALSA plugins
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.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-07-13 22:10:39 +01:00
Colin Guthrie
3ede7e4c01 alsa: Fix assertion on mmap_write (triggered via a52 plugin) 2010-07-13 22:08:23 +01:00
Colin Guthrie
1415a295c2 Merge remote branch 'tanuk2/fixes' 2010-06-05 18:21:31 +01:00
Daniel Mack
3df6845101 modules/coreaudio: replace deprecated functions
All API calls are now consolidated in AudioObject* calls, the old model
has been deprecated in 10.6. Follow that change.
2010-05-15 16:08:16 +01:00
Tanu Kaskinen
22a8c4485b dbus: Stop polling every 10 seconds to check whether all clients are still alive.
Instead, watch for org.freedesktop.DBus.Disconnected signals.
2010-05-10 14:34:55 +03:00
Tanu Kaskinen
71ef5fe7e8 stream-restore: When changing restore entries with D-Bus, apply the changes immediately. 2010-05-10 14:33:54 +03:00
Tanu Kaskinen
5012dc8450 dbus: Fix slightly messed up assertions. 2010-05-10 14:33:16 +03:00
Tanu Kaskinen
63c24fa49a 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.
2010-05-10 14:29:30 +03:00
Tanu Kaskinen
c161115288 stream-restore: Fix segfaulting. The dbus entry callbacks expect a dbus_entry pointer instead of a userdata pointer. 2010-05-10 14:11:15 +03:00
Tanu Kaskinen
acaeb71cf8 dbus: Fix segfault when receiving a property access call that isn't permitted. 2010-05-10 14:10:09 +03:00
Tanu Kaskinen
ad7c8ebff5 dbus: Initialize properly the type field of new server structs. 2010-05-10 14:09:51 +03:00
Tanu Kaskinen
a976db7c49 dbus: Make it possible to allow remote connections from outside localhost. 2010-05-10 14:08:55 +03:00
Tanu Kaskinen
2dcf378741 cli: Increase the command maximum length from 1024 to 2048. 2010-05-10 14:08:04 +03:00
Tanu Kaskinen
7bc5cd7845 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.
2010-05-10 14:07:12 +03:00
Tanu Kaskinen
6a5f0ba431 alsa-mixer: Replace erroneous PA_ALSA_VOLUME_IGNORE with PA_ALSA_ENUMERATION_IGNORE.
This fix doesn't have any concrete effect, because the two constants have the
same value.
2010-05-10 14:05:25 +03:00
Tanu Kaskinen
77312d06c8 alsa-mixer: Use pa_xfree() instead of pa_xstrdup() for freeing a string. 2010-05-10 14:04:51 +03:00
Colin Guthrie
678f12d056 rtp: Fix bracketing in pa_rtp_recv.
The syntactically correct error meant that the timestamp was always
marked as found and only the first header was checked.

In the case where the timestamp was the first header, things
would have worked as expected.

Thanks to pino for reporting via bug refs #818
2010-05-08 14:21:52 +01:00
Jez Austin
74591da68b socket-client: properly handle asyncns failures
We fail to detect when people disable IPv6 in there kernels. This patch
makes sure we don't ignore this error condition.

http://pulseaudio.org/ticket/752
https://bugzilla.mozilla.org/show_bug.cgi?id=533470
http://bugs.freedesktop.org/show_bug.cgi?id=25742
2010-05-08 14:21:01 +01:00
Colin Guthrie
dfcaa9325c intended-roles: Do not pick monitor sources when doing automatic role-based device selection 2010-05-08 14:20:50 +01:00
Daniel T Chen
f7b262763a alsa: Handle 'Digital Mic' as an 'Input Source'
BugLink: https://launchpad.net/bugs/533877

Some laptops have 'Digital Mic' exposed as an 'Input Source', e.g., Dell
XPS 1330, so handle these, too.
2010-05-08 14:20:06 +01:00
Kees Cook
87fdbb544b core-util: ensure that we chmod only the dir we ourselves created 2010-05-08 14:19:08 +01:00
Lennart Poettering
abb05d610d tests: fix once test 2010-05-08 01:50:05 +02:00
Pierre-Louis Bossart
4df443bbe6 add rewind-safeguard parameter
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.
2010-05-08 01:38:25 +02:00
David Henningsson
f081c152f3 jack: Prevent crash on jack server shutdown 2010-05-08 01:30:55 +02:00
Lennart Poettering
cdc2769162 thread: name all threads so that the names appear in /proc/$PID/task/$TID/comm 2010-05-07 23:58:59 +02:00
Colin Guthrie
5248a584a3 build-sys: Mention dbus support in the summary 2010-02-25 14:00:08 +00:00
Lennart Poettering
c6b9931bf1 virtual: when fixed block sizes are used the memblockq must have a silence block 2010-02-25 02:41:09 +01:00
Lennart Poettering
34bb996e69 virtual: document how to implement fixed block size filters 2010-02-25 02:26:03 +01:00
Lennart Poettering
87cc741d0e memblockq: implement new call pa_memblockq_peek_fixed_size() 2010-02-25 02:10:45 +01:00
Lennart Poettering
5030852c8e virtual: minor simplifications for the virtual sink 2010-02-25 00:39:56 +01:00
Lennart Poettering
066e626401 equalizer: various smaller cleanups for m-e-s 2010-02-25 00:39:06 +01:00