summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* x11: Fix build errors with newest xcb-util.Maciej Grela2011-04-281-9/+17
| | | | | | The xcb_atom_get functions were removed from xcb-util. Changed these to xcb_intern_atom/xcb_intern_atom_reply. Also, STRING is now XCB_ATOM_STRING.
* filter-heuristics: Match roles correctlyArun Raghavan2011-04-231-2/+23
|
* echo-cancel: Play nice with module-filter-*Arun Raghavan2011-04-231-2/+14
| | | | | | | | | | | | | | With automaticl filter loading by module-filter-apply, setting the virtual sink/source to have the "phone" intended role will break routing when you first connect a phone stream to an ALSA device and then turn on your Bluetooth headset. This happens because module-intended-roles doesn't move a stream if it is already on a device that provides the required role. This patch introduces a "manual_load" parameter that is meant to be used when not using module-filter-apply for loading the AEC module. If this parameter is set, the virtual devices are given the "phone" role, else we count on module-filter-heuristics to do the right thing.
* filters: Handle filters on sources as wellArun Raghavan2011-04-232-77/+283
| | | | | | This makes the core code in the filter-* modules generic enough to be used on sources or sinks. We need special handling for modules that introduce more than one sink (for now echo-cancel only).
* filters: Handle stream moves properlyArun Raghavan2011-04-233-16/+79
| | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that we handle streams moving between sinks properly. To do this, we change the way the filter.* properties are handled a little bit. Firstly, this splits up the "filter.apply" property into two properties - "filter.want" and "filter.apply". "filter.apply" acts as before - it bypasses module-filter-heuristics and directly tells module-filter-apply what filters are to be applied. "filter.want" is used to tell module-filter-heuristics what filters the client wants. The module then decides whether to actually apply the filter or not (for now, this makes sure we don't apply echo-cancellation even if requested on phone sinks (where it is assumed AEC is taken care of or is not required). Next, we also make sure that we track whether the client set "filter.apply" or module-filter-heuristics did - and in the latter case, we recalculate "filter.apply" and then have module-filter-apply apply the filter if required. This introduces some evil in the form of causing the move_finish callback to possibly trigger another move, but we protect for this case (with a property) to be doubly sure of not causing an infinite loop.
* filter-heuristics: Only apply AEC if we're not already on a phone sinkArun Raghavan2011-04-231-2/+5
| | | | | | This makes sure that we don't apply AEC on sinks that are already connected to a "phone" device, the assumptiong being that anything marked as such either doesn't have need it, or handles it itself.
* test: Make the connect-stress less likely to bail out due to >32 streams.Colin Guthrie2011-04-231-1/+9
| | | | | | | | | | When running two connect-stress tests at the same time the liklihood of >32 streams per sink increases. All it takes is for an event sound to fire to trigger an abort of the test. This leaves just a little bit of wriggle room for a couple external streams. Of course the overall problem is still there but this just makes it slightly less likely without really affecting the test itself.
* protocol-dbus: Fix some memory management bugs.Tanu Kaskinen2011-04-231-6/+6
| | | | | | | | There were several memory leaks. In addition to those, pa_dbus_protocol_add_interface() used a string from the caller as a key to a hashmap, instead of a copy of the string. This caused trouble when the caller freed the string while the key was still in use in the hashmap.
* match: Match rule earlier, in SINK_INPUT_NEWMarc-André Lureau2011-04-231-22/+13
|
* match: Don't double free in case of missing table fileMarc-André Lureau2011-04-231-1/+0
|
* module-coreaudio-device: Fix two build warningsDaniel Mack2011-04-231-2/+2
|
* module-coreaudio-device: Set the thread name to device nameDaniel Mack2011-04-231-1/+1
| | | | This makes gdb's "info threads" better understandable
* module-coreaudio-device: Dispatch sink/source state messages from main loopDaniel Mack2011-04-231-38/+50
| | | | | This fixes a long standing race condition when tearing down streams on Mac OS X.
* thread-posix: Use pthread_(get|set)name_np() if availableDaniel Mack2011-04-231-0/+9
| | | | | Newer generations of libpthread have functions to set and get the thread names. If available, use them.
* pulsecore:: Define _POSIX_C_SOURCE locally for rtclock on OSXDaniel Mack2011-04-231-0/+4
| | | | | | Defining this macro on a global level is disadvantageous for other APIs, and as we need it for clock_gettime() only on Mac OS X, define it locally in pulsecore/core-rtclock.c only.
* util: Implement pa_get_binary_name() for Mac OS XDaniel Mack2011-04-231-0/+26
|
* module-coreaudio-detect: Add 'ioproc_frames' parameterDaniel Mack2011-04-231-3/+20
| | | | | | This value is passed on to the instances of module-coreaudio-device that are loaded upon device detection. The value is purely optional, as the device module will fall back to to its default if it's not given.
* memblockq: decode unset chunks as NULL chunks againLennart Poettering2011-04-213-1/+13
| | | | | This fixes asserts beeing hit when see requests are posted via the native protocol.
* filter-apply: Make housekeeping optionalArun Raghavan2011-04-201-0/+14
| | | | | | | Adds an autoclean option (defaults to TRUE) that controls whether module-filter-apply cleans up unused modules or not. This is useful in cases where you know that a filter will be used often and thus can avoid overhead from repeated module load/unload.
* filter: Move the proplist defines into the central place and document them.Colin Guthrie2011-04-203-6/+6
|
* tests: improve resampler testMarc-André Lureau2011-04-191-10/+197
|
* interpol-test: remove unused include getopt.hMarc-André Lureau2011-04-191-1/+0
|
* volume: Get more data from volume testsArun Raghavan2011-04-184-57/+147
| | | | | | | This makes the volume tests run in two loops and print the minimum, maximum and standard deviation of readings from the inner loop. This makes it easier to reason out performance drops (i.e. algorithmic problems vs. other system issues such as processor contention).
* stream-restore: Check for readability before reading volumeArun Raghavan2011-04-181-1/+1
| | | | | This avoids an assert in pa_sink_input_get_volume() when connecting a passthrough stream.
* pa_poll(): Simplify detection of invalid fds in select() emulation modeDaniel Mack2011-04-181-2/+27
| | | | | | | | | | | | | For systems which have a fcntl() implementation, we can simplify the code which determines whether a file selector is valid in pa_poll(). The old code, which is harder to read and more expensive, stays around for all platforms we need to emulate poll() for using select(), and which don't provide fcntl(). IOW, for Windows. On Mac OS X, however, the detection for bad fds via more select() calls doesn't work, resulting in hung main loops, so the patch fixes a real bug there.
* sink-input: Check flat volume with pa_sink_flat_volume_enabled().Tanu Kaskinen2011-04-181-2/+2
| | | | | Checking just the flag doesn't work if the sink uses volume sharing, because such sinks never have PA_SINK_FLAT_VOLUME set.
* filter-heuristics: New module that applies some basic heuristics regarding ↵Colin Guthrie2011-04-182-2/+125
| | | | | | | filters. At present the only heuristic is one to apply the echo-cancel filter when dealing with phone streams.
* filter-apply: New module to automatically load filter sinks (and move ↵Colin Guthrie2011-04-182-2/+408
| | | | | | | streams) based on sink-input property hints. This module does not yet deal with modules that need matched inputs/outputs (i.e. echo-cancel) but this will be added in due course.
* equalizer: Use sink_master as the module argument rather than just master.Colin Guthrie2011-04-181-3/+3
| | | | | | | | This brings more uniformity to arguments to match module-echo-cancel (which needs both sink and source masters, hence the disambiguation). This will allow other modules to load filters in a more uniform way in the future without kludges to deal with variation in arguments.
* bluetooth-device: fix rounding errors caused by few bt volume stepsJuho Hämäläinen2011-04-051-11/+36
| | | | | | | | | | When volume changes in bluetooth device PulseAudio volume is rounded one too low, so if bluetooth headset changes volume and that volume is immediately set again for bluetooth device, bluetooth step drifts lower all the time. Volume is incremented by one in the conversion so that we get right bluetooth step when re-applying volume. Signed-off-by: Juho Hämäläinen <ext-juho.hamalainen@nokia.com>
* stream-restore: add version to new entry.Harri Mähönen2011-04-051-0/+1
|
* doc: Fix typoColin Guthrie2011-04-051-1/+1
|
* alsa: Fix log output to inform about positive base volumes correctly.Tanu Kaskinen2011-04-042-8/+2
| | | | | This fix was done for _set_port_cb() already, but the first fix didn't fix setup_mixer(). Now that's done too.
* bluetooth: drop data every 500ms on oor conditionMarc-André Lureau2011-04-041-11/+14
|
* switch-on-connect: Add a new module to allow for hotplugged devices to be ↵Michael Terry2011-04-032-2/+195
| | | | | | | | | | | | | | | used by default. This module implements a simply policy decision that any newly plugged in devices should be used. This is a reasonable approach and paprefs will be updated to allow for this option to be turned on or off. This is more or less a stop-gap solution. When priority lists are implemented in the core, then policy modules may ultimately be re-engineered to adjust the priority lists rather than doing any of their own routing per-se.
* tests: add a connection stress testDaniel Mack2011-04-012-2/+207
| | | | | This test is based on a threaded main loop and was written to hunt an evil race condition.
* bluetooth: Fix HSP volume handling.Tanu Kaskinen2011-04-011-32/+69
| | | | | | | | | Previously the userdata for the volume callbacks was saved to pa_core.shared only once when loading module-bluetooth-device, and only when the SCO over PCM feature was used. That breaks volume handling in cases where the HSP profile is used without the SCO over PCM setup. Now the userdata is set always when a sink or source is created, and removed when a sink or source is removed.
* bluetooth: restore original sco_{sink, src}->set_volume when unloadingMarc-André Lureau2011-04-011-0/+6
|
* bluetooth: fix set_volume_cb on sco over pcmMarc-André Lureau2011-04-011-9/+50
| | | | | | | | | | | | The current implementation is totally bogus, it cast the over_sink userdata to the bluetooth-device userdata... It was failing nicely because the previous code had a gentle safe-guard in u->profile == PROFILE_HSP, and u->profile was just random. There is no easy way to associate additional data to a sink or source. Two solutions seems possible: looking up loaded modules and check which one was handling the sink/source, or using pa_shared. I went for the second solution.
* bluetooth: use sco_sink/source to start with right stateMarc-André Lureau2011-04-011-16/+23
| | | | | Note from Tanu Kaskinen: I resolved some conflicts with newer upstream code, so if this patch is broken, blame me..
* bluetooth: Drop all "#ifdef NOKIA" directives.Tanu Kaskinen2011-04-011-49/+8
| | | | | The #ifdefs only added clutter. I don't see any reason to not compile the SCO over PCM support in all the time.
* bluetooth: Pull a2dp-codecs.h from BlueZArun Raghavan2011-03-315-39/+125
| | | | | | This pulls a2dp-codecs.h from BlueZ which contains the capabilities structures for SBC and MPEG. We currently have these manually added to ipc.h, so pulling this header makes our files identical to upstream.
* alsa-mixer: Check that the kernel driver returns consistent limits with both ↵Tanu Kaskinen2011-03-301-0/+37
| | | | | | | | snd_mixer_selem_get_*_dB_range() and _ask_*_vol_dB(). The check is inspired by a driver that returned higher dB limit from snd_mixer_selem_get_playback_dB_range() than what _ask_playback_vol_dB() returned at maximum integer volume.
* alsa-mixer: Make sure that SND_MIXER_SCHN_UNKNOWN isn't used when indexing ↵Tanu Kaskinen2011-03-301-2/+11
| | | | | | e->masks. SND_MIXER_SCHN_UNKNOWN is defined as -1, so that's not a good array index...
* alsa-mixer: Make probing elements with more than two volume channels fail.Tanu Kaskinen2011-03-301-0/+16
| | | | | This is just a quick hack to prevent array overflow. Correct fix would be to implement support for more channels.
* pactl: Add short output format for list actionMaarten Bosmans2011-03-291-9/+79
|
* pactl: Separate stat and info actionsMaarten Bosmans2011-03-291-2/+9
|
* pactl: Add subcommands to the list commandMaarten Bosmans2011-03-291-14/+53
|
* pactl: Accept more volume specification formatsMaarten Bosmans2011-03-291-58/+171
| | | | | With this you can specify the volume with 6554, 10%, 0.001 or -60dB, all resulting in the same volume change.
* sink-input: Add volume_writable to pa_sink_input.Tanu Kaskinen2011-03-298-46/+26
| | | | | | | | | | This is pretty cosmetic change; there's no actual functionality added. Previously the volume_writable information was available through the pa_sink_input_is_volume_writable() function, but I find it cleaner to have a real variable. The sink input introspection variable name was also changed from read_only_volume to volume_writable for consistency.