Colin Guthrie [Fri, 2 Oct 2009 21:44:56 +0000 (22:44 +0100)]
device-manager: Play nice with module-stream-restore.
If m-s-r sets the device we let it do so. Otherwise we handle the routing. We run before
module-intended-roles as the priority list will likely be configured appropriately
to do the same job, albeit with manual setup.
Colin Guthrie [Fri, 2 Oct 2009 20:01:19 +0000 (21:01 +0100)]
device-manager: Keep track as to whether or not the user specifically renamed the device.
If the user has not (via our protocol extension) renamed a device, but it happens to now have
a different name (e.g. module-combine automatically updating the description for us or udev-db
getting better etc.) then make sure we update our cache with this updated version.
If the user has set a name, enforce it's use, even if the description is updated by some other
means (e.g. the user manually editing the proplist or another module doing it for them).
Jason Newton [Fri, 18 Sep 2009 12:48:01 +0000 (05:48 -0700)]
module-equalizer-sink: *added client initiated sync support for filter state *added note of possible unstable behavior with next-power-of-2 sample rate calculation
Colin Guthrie [Thu, 1 Oct 2009 21:12:16 +0000 (22:12 +0100)]
device-manager: Misc fixes to co-exist with other stream management/routing modules.
* Do not read or set the save_sink/save_source flags. This seems to be for module-stream-restore only...
* Even if a sink is already set by an earlier module, still move it to the sink we dictate.
Colin Guthrie [Thu, 1 Oct 2009 20:30:24 +0000 (21:30 +0100)]
device-manager: Misc fixes.
* Fix a s/sink/source/ copy paste issue when dumping the database.
* Only show priority list when routing is enabled (as the list is not updated if not)
* Fix a memory access issue when finding the highest priority sinks/sources
* key name->device name efficiency fix.
* Silence noisy debug on reorder - it seems to work :)
* Reroute after reordering.
* Initialise preferred lists to PA_INVALID_INDEX
Colin Guthrie [Thu, 1 Oct 2009 00:27:02 +0000 (01:27 +0100)]
device-manager: Change the prefer/defer options to a single 'reorder' command.
We put in the devices from the wire into a hashmap and then add all like type device in the database
and then order them based on priority (with the ones specified on the wire always being in that order at
the top of the list.
Colin Guthrie [Sun, 20 Sep 2009 20:19:41 +0000 (21:19 +0100)]
device-manager: Reroute streams when they change allowing the media.role to be updated mid-stream.
We do not handle the _EVENT_NEW subscription here as the PA_CORE_HOOK_SINK_INPUT_NEW/PA_CORE_HOOK_SOURCE_OUTPUT_NEW
hook should handle the initial routing.
Colin Guthrie [Sun, 20 Sep 2009 16:29:38 +0000 (17:29 +0100)]
device-manager: Rough framework (slots etc.) for handling routing.
This is incomplete, it just adds the slots in question and assigns noops to them.
Some minor cleanup of types.
Due to the priority of the hooks, it seems we can actually coexist with module-stream restore so
the code to detect and unload it will be removed shortly.
Colin Guthrie [Sun, 20 Sep 2009 11:44:02 +0000 (12:44 +0100)]
device-manager: Change the write function to a rename function.
The structure itself will contain various bits of info so exposing this fully to the client is a bad idea.
By keeping to a rename operation we keep what we do store abstracted from the clients.
Colin Guthrie [Sat, 19 Sep 2009 16:48:10 +0000 (17:48 +0100)]
device-manager: Provide a method for prefering/defering a device.
This allows clients to edit the priroity order. What is not yet in place is the initialisation of that priority list
when new devices are detected or the cleaning (remove holes) when devices are removed.
In order to keep the storage transparent I will likely remove the write functionality and replace it with a
simple rename method.
I also still need to expose the priority itself when reading the data.
Colin Guthrie [Sat, 19 Sep 2009 15:13:25 +0000 (16:13 +0100)]
device-manager: Provide a way for clients to enable/disable role-based device-priority routing.
The routing logic itself does not yet exist, but the command currently will unload/load module-stream-restore as approriate.
(module-stream-restore would conflict with the role-based priority-routing).
Colin Guthrie [Mon, 29 Jun 2009 18:55:34 +0000 (19:55 +0100)]
stream-restore: Preventative initialistion to NULL
There is not technically a bug here due to the early return and the knowledge that one of the if blocks
will definitely be run, but this makes sure we don't call free on uninitialised data or do
anything else suitibly daft. Also helps when you copy the code and change it slightly and don't realise
you've left things open...
Colin Guthrie [Sat, 27 Jun 2009 20:03:37 +0000 (21:03 +0100)]
device-manager: Add a new module to keep track of the names and descriptions of various sinks.
This will be used as the basis for a queryable system for past and present devices, initially for use in KDE.
Currently all this module does is save lists of sinks/sources and their descriptions, so it needs to
gain a protocol extension to make this queryable.
As things stand it will save the device descriptions of all sinks and restore them if they differ from whats on record.
Jason Newton [Sun, 16 Aug 2009 18:38:12 +0000 (11:38 -0700)]
module-equalizer-sink
exchanged improper usage of memblockq_peek'd memchunk for silence block
dropped unneeded function prototypes
changed mround to be slightly more elegant
__restrict__ -> restrict for c99
removed unneeded pa_aupdate_swap calls
first_iteration -> pa_bool_t
cleaned up some usage of pa_malloc0 where pa_new0 was more appropriate
cruft removal, whitespace fixes and reordering of variables
Jason Newton [Tue, 11 Aug 2009 10:00:28 +0000 (03:00 -0700)]
module-equalizer-sink:
fix for peek returning a null memblock
pa_log -> pa_log_debug for fft size
updated module description
fixed a comment in dbus error for incorrect x positions
Jason Newton [Mon, 10 Aug 2009 22:33:55 +0000 (15:33 -0700)]
module-equalizer-sink:
proper fix for pa_xmalloc(0) given that 0 is illegal
fix coefficients in case there's no resume state
loadprofile now signals filterchanged
Jason Newton [Sun, 9 Aug 2009 05:20:05 +0000 (22:20 -0700)]
module-equalizer-sink:
dbus:
eliminated some redundant code in dbus handlers/getall
switched filter back to being a property
signals for changed profiles, added/removed sinks, filter updates and sink reconfigurations
fixed timing routines
Jason Newton [Wed, 5 Aug 2009 07:52:16 +0000 (00:52 -0700)]
module-equalizer-sink:
dbus properties and manager so that multiple sinks can be loaded and mixers can be equalizer-sink aware
functionality to seed new filters quickly (rteq guis)
profile support
extra checking in client->server dbus messages
Jason Newton [Sun, 2 Aug 2009 03:23:49 +0000 (20:23 -0700)]
module-equalizer-sink:
added support for suspend/resume of filter coefficients
unregister the correct dbus interface.
made equalizer state file sink index dependent
expanded dbus properties
whitespace
Jason Newton [Sat, 1 Aug 2009 01:10:11 +0000 (18:10 -0700)]
module-equalizer-sink:
added dbus support
removed cruft from inherited from ladspa module and improved clarity
switched dsp processing to reference implementation until project is more mature
tsched=0 seems to help with the micro-dropouts/crackling! oh my!
reformatting/spaces
Don't refuse to start on systems using GNU stow, graft, STORE et al
There are multiple package management systems out there which implement
packages using symlinks. The recent (otherwise useful) check to ensure that
a re-executed pulseaudio is actually reexecuting itself unfortunately breaks
in the presence of all these packaging systems, because PA_BINARY refers
to its installed location (e.g. /usr/local/bin/pulseaudio), which is a
symlink to the binary (e.g. /usr/local/stow/pulseaudio-0.9.18/bin/pulseaudio),
because /proc/self/exe always contains the canonical path of the executable,
with all symlinks resolved.
(At least one distribution uses a symlink-based packaging system, so
will be forced to apply this locally in any case.)
The fix is simple: canonicalize PA_BINARY before equality-testing. (This
should be completely safe, because the OS does just that when PA_BINARY
is executed.)
The patch is against 0.9.18, but applies without fuzz to current master.