summaryrefslogtreecommitdiffstats
path: root/src/modules
Commit message (Collapse)AuthorAgeFilesLines
* alsa: Reconfigure sink sample rate for passthrough inputsArun Raghavan2011-05-021-0/+52
| | | | | | When a passthrough sink-input is added, we need to reconfigure the sink's sample rate since no resampling occurs. We revert to the original rate when the passthrough sink-input is removed.
* alsa-mixer: Remove passthrough profilesArun Raghavan2011-05-022-26/+0
| | | | | These aren't used any more - we handle passthrough mode in the iec958* profiles now.
* sink: Remove PASSTHROUGH flagArun Raghavan2011-05-021-7/+0
| | | | | | | This removes the passthrough flag from sinks since we will drop exclusively passthrough sinks in favour of providing a list of formats supported by each sink. We can still determine whether a sink is in passthrough mode by checking if any non-PCM streams are attached to it.
* core: Add extended stream API to support compressed formatsArun Raghavan2011-05-0212-24/+16
| | | | | | | | | | | | | | | This is the beginning of work to support compressed formats natively in PulseAudio. This adds a pa_stream_new_extended() that takes a format structure, sends it to the server (=> protocol extension) and has the server negotiate with the appropropriate sink to figure out what format it should use. This is work in progress, and works only with PCM streams. Actual compressed format support in some sink needs to be implemented, and extensive testing is required. More details on how this is supposed to work is available at: http://pulseaudio.org/wiki/PassthroughSupport
* filter-apply: Mark modules as being autoloadedArun Raghavan2011-05-025-11/+28
| | | | | | | (Based on Colin's review) We mark modules as being autoloaded so that they can handle this as a special case if needed (which is required by module-echo-cancel for now). This inverts how things were done and makes using these modules manually less error-prone.
* combine: Rename module-combine to module-combine-sink.Colin Guthrie2011-04-302-1352/+1423
| | | | | This also includes a compatibility module that will ultimately be removed in a future release.
* bluetooth: Only close SCO if status has changedLuiz Augusto von Dentz2011-04-301-5/+5
| | | | | In case the io thread is starting there is no point on closing SCO just to resume it latter when the source/sink changes to opened state.
* bluetooth: Fix using pointer-pointer when appending an array as variantLuiz Augusto von Dentz2011-04-301-4/+2
| | | | | pa_dbus_append_basic_array_variant_dict_entry should take the direct pointer to the array.
* bluetooth: Fix not updating sample spec when using Media APILuiz Augusto von Dentz2011-04-301-0/+13
| | | | | | When using transport configured via Media API sample spec needs to be updated since codec configuration may affect it when e.g. headset configure a different frequency or number of channels from default.
* dbus: Fix the order of freeing stuff when unloading module-dbus-protocol.Tanu Kaskinen2011-04-291-3/+9
|
* dbus: Fix connection idxset freeing when unloading the module.Tanu Kaskinen2011-04-291-13/+8
| | | | | | | | | | | | | | If u->connections isn't empty when module-dbus-protocol is unloaded, then connection_free() is called for the remaining connections when the idxset is freed. connection_free() tries to remove the connection from the idxset, but that fails, because the item has already been removed from the idxset in this scenario. The problem is solved by not trying to remove the connection from the idxset in connection_free(). Instead, whoever wants to delete connections, has to remove the connection from the idxset in addition to calling connection_free().
* match: Support for both merging and replacing proplist updates.Tanu Kaskinen2011-04-291-37/+60
| | | | | | | | | | | | | | | | | | | | | This patch adds a new update mode specifier that can be optionally given in match rules after the regexp. Property list updates triggered by the rule will honour the given mode. The two allowed modes are 'merge' and 'replace', corresponding to PA_UPDATE_MERGE and PA_UPDATE_REPLACE respectively. If omitted, the mode defaults to PA_UPDATE_MERGE, ie. to the original behavior. For example, to force 'media.role' to be overwritten with 'bar' for streams matching foo you can use an entry like this: foo replace "bar" This will really overwrite media.role to bar even if it has already been set to something else by the application. Thanks to Krisztian Litkey for the original patch and the description above. In addition to implementing the new feature, this patch fixes a number of bugs in the parsing code.
* stream-restore: Enable database dumping if DEBUG_VOLUME is defined.Tanu Kaskinen2011-04-281-2/+2
|
* module-null-source: New null-source moduleMarc-André Lureau2011-04-281-0/+294
|
* 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-232-15/+75
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* 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.
* 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-202-6/+0
|
* 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.
* filter-heuristics: New module that applies some basic heuristics regarding ↵Colin Guthrie2011-04-181-0/+117
| | | | | | | 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-181-0/+400
| | | | | | | 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
|
* 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-031-0/+187
| | | | | | | | | | | | | | | 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.
* 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-314-38/+122
| | | | | | 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.
* sink-input: Add volume_writable to pa_sink_input.Tanu Kaskinen2011-03-292-8/+8
| | | | | | | | | | 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.
* bluetooth: run `make update-sbc` to pull in build fix for thumb modePaul Menzel2011-03-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This update pulls in commit c495077c [1] to fix a build error. commit c495077cf8a8c37afd90875ec5a5b16b294be15e Author: Siarhei Siamashka <siarhei.siamashka@nokia.com> Date: Tue Mar 29 01:57:39 2011 +0300 sbc: better compatibility with ARM thumb/thumb2 ARM assembly optimizations fail to compile in thumb mode, but are fine for thumb2. Update ifdefs in the code to make use of ARM assembly only when it is safe and also make sure that no optimizations are missed when compiling for thumb2. The problem was reported by Paul Menzel: https://tango.0pointer.de/pipermail/pulseaudio-discuss/2011-February/009022.html This patch is tested with OpenEmbedded using `minimal-uclibc` for `MACHINE = "at91sam9260ek"`. Note that changes to ipc.h from 8f3ef04b had to be manually reapplied. [1] http://git.kernel.org/?p=bluetooth/bluez.git;a=commit;h=c495077cf8a8c37afd90875ec5a5b16b294be15e
* module-jack-sink/source: protect against null return in jack_get_portsDavid Henningsson2011-03-282-10/+16
| | | | | | | | | | | | | | | | | | | | Just picking up a crash report from Ubuntu, here's the result. -- David Henningsson, Canonical Ltd. http://launchpad.net/~diwic From 934c52c79bb6faed56a64d6e15f9b285f687afee Mon Sep 17 00:00:00 2001 From: David Henningsson <david.henningsson@canonical.com> Date: Mon, 28 Mar 2011 14:30:44 +0200 Subject: [PATCH] module-jack-sink/source: protect against null return in jack_get_ports According to jack_get_ports documentation, it seems like returning NULL is valid, and that it should be freed using jack_free. Reported-by: Grayson Peddie BugLink: http://bugs.launchpad.net/bugs/733424 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* cork-on-phone: Handle sink-inputs with NULL sinksArun Raghavan2011-03-281-0/+3
| | | | | It's possible that by the time we receive the unlink hook, the given sink-input's sink is set to NULL. Handle this gracefully.
* alsa-mixer: Get rid of a compiler warning.Tanu Kaskinen2011-03-281-2/+2
| | | | | | | | | | On 64-bit systems LONG_MAX is greater than the largest possible value of a uint32_t variable, which caused the compiler to warn about a comparison that is always false. On 32-bit systems pa_atou() can return a value that will overflow when assigned to e->volume_limit, which has type long, so the comparison was necessary. This dilemma is resolved by using pa_atol() instead of pa_atou().