path: root/src/modules/module-device-manager.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary #includesMaarten Bosmans2011-06-221-3/+1
* database: Support legacy format database entries.Colin Guthrie2011-06-221-61/+127
| | | | | | This adds code to specifically support legacy entries. I kept this code in a separate commit so that it can be (relatively) easily removed at some point in the future.
* database: Convert our use of database files to save in tagstruct format.Colin Guthrie2011-06-221-85/+127
| | | | | | | | | | | | | This has the advantage of allowing versioned updates in the future, thus allowing us to be more user friendly going forward (as opposed to just ignoring entries from old versions). The primary motivation for this, however, is to allow variable length storage in each entry which will be needed for upcoming work. At present this commit will ignore any legacy entries but support for reading and subsequently converting legacy entries will be added shortly.
* capture: Add the passthrough format negotiation to capture streams.Colin Guthrie2011-06-221-4/+3
| | | | | This helps to keep the API more symmetrical and also potentially allows support for passthrough monitor sources at some point in the future.
* device-manager: Free a hook slot to prevent segv on unloadColin Guthrie2011-06-061-0/+3
* core: Add extended stream API to support compressed formatsArun Raghavan2011-05-021-2/+2
| | | | | | | | | | | | | | | 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:
* Fix up some double spacesMaarten Bosmans2011-03-181-2/+2
* Fix up according to Coding StyleMaarten Bosmans2011-03-111-4/+2
| | | | Only whitespace changes in here
* Fix typosZhang Wanming2010-12-201-1/+1
* device-manager: Ensure that sinks/sources populate the device manager lists ↵Colin Guthrie2010-09-291-5/+59
| | | | | | | in order of their priority. Currently the order of the sinks is simply that of their position in the idxset which is certainly not what the user would want.
* Avoid using devname as a variable name.Diego Elio 'Flameeyes' Pettenò2009-11-211-7/+7
| | | | On FreeBSD, devname() is a system function, and was overshadowed.
* device-manager: Fix compiler warning.Colin Guthrie2009-10-191-4/+4
| | | | Do not use a variable called 'index' as it clashes with string.h
* device-manager: Rather than flagging the device as available, just include ↵Colin Guthrie2009-10-101-4/+4
| | | | the sink/source index with PA_INVALID_INDEX meaning unavailable
* device-manager: Play nice with module-stream-restore.Colin Guthrie2009-10-021-37/+47
| | | | | | 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.
* device-manager: Make use of PA_IDXSET_FOREACH when applying entries.Colin Guthrie2009-10-021-12/+12
* device-manager: Keep track as to whether or not the user specifically ↵Colin Guthrie2009-10-021-9/+40
| | | | | | | | | | | 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).
* device-manager: No need to check the version after calling read_entry()Colin Guthrie2009-10-021-4/+4
* device-manager: Misc fixes to co-exist with other stream management/routing ↵Colin Guthrie2009-10-011-40/+30
| | | | | | | 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.
* device-manager: Misc fixes.Colin Guthrie2009-10-011-37/+47
| | | | | | | | | | * 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
* device-manager: Fix the writing of the database when priority doesn't change.Colin Guthrie2009-10-011-1/+3
* device-manager: Add extra debug messagesColin Guthrie2009-10-011-1/+19
* device-manager: Change the prefer/defer options to a single 'reorder' command.Colin Guthrie2009-10-011-82/+140
| | | | | | 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.
* device-manager: Don't notify clients on every subscription (it happens all ↵Colin Guthrie2009-10-011-6/+18
| | | | | | the time). Also compare the entries fully before saving.
* device-manager: Save icon and report current availability over protocol.Colin Guthrie2009-10-011-17/+53
| | | | | This also ensures we let clients know whenver a sink changes in some capacity. Also correct some debug code.
* device-manager: Expose the priority lists in the protocol extension.Colin Guthrie2009-10-011-37/+47
| | | | Also leave space for 'icon' and 'available' details too, althought currently this info is dummy.
* device-manager: Add a function to dump the database which we do whenever we ↵Colin Guthrie2009-10-011-15/+107
| | | | save it (and on startup)
* device-manager: Reroute streams when they change allowing the media.role to ↵Colin Guthrie2009-10-011-212/+243
| | | | | | | 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.
* device-manager: Refactor the routing method to allow the routing of a single ↵Colin Guthrie2009-10-011-65/+80
| | | | stream
* device-manager: More sensible names for internal functionsColin Guthrie2009-10-011-10/+8
* device-manager: Reroute the streams on startup and update our cache on enable.Colin Guthrie2009-10-011-10/+8
* device-manager: Keep a cache of the highest priority devices for each role.Colin Guthrie2009-10-011-47/+52
| | | | Rather than querying our database on every new stream, we keep a cache and only update it when a sink/source is added/removed.
* device-manager: Fix the database write modeColin Guthrie2009-10-011-3/+3
* device-manager: Some efficiency and safety tweaksColin Guthrie2009-10-011-4/+9
* device-manager: Allow the routing component to be turned on via a module ↵Colin Guthrie2009-10-011-12/+14
| | | | argument as well as via protocol extn.
* device-manager: Remove unused variablesColin Guthrie2009-10-011-3/+0
* device-manager: Set the most appropriate sink/source when new streams are ↵Colin Guthrie2009-10-011-16/+50
| | | | created
* device-manager: Add routing functions that are triggered when sinks/soruces ↵Colin Guthrie2009-10-011-61/+136
| | | | are added/removed.
* device-manager: Add a function to get a list of the highest priority device ↵Colin Guthrie2009-10-011-0/+81
| | | | indexes for each role.
* device-manager: Remove unneeded logic for checking for and (un)loading ↵Colin Guthrie2009-10-011-35/+0
| | | | module-stream-restore. We can co-exist
* device-manager: Rough framework (slots etc.) for handling routing.Colin Guthrie2009-10-011-5/+201
| | | | | | | | 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.
* device-manager: debug and commentsColin Guthrie2009-10-011-1/+2
* device-manager: Fix the freeing of the datum on prefer/defer.Colin Guthrie2009-10-011-5/+4
| | | | Also fix a log typo
* device-manager: When a new device is encountered, initialise the priority ↵Colin Guthrie2009-10-011-4/+56
| | | | list to an appropriate value
* device-manager: Let subscribed clients know when something changes.Colin Guthrie2009-10-011-0/+16
* device-manager: Change the write function to a rename function.Colin Guthrie2009-10-011-35/+28
| | | | | | | 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. Also fix some doxy comments.
* device-manager: Provide a method for prefering/defering a device.Colin Guthrie2009-10-011-0/+148
| | | | | | | | | | 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.
* device-manager: Fix copy+paste code that looped over the tagstruct when not ↵Colin Guthrie2009-10-011-40/+37
| | | | necessary
* device-manager: Provide a way for clients to enable/disable role-based ↵Colin Guthrie2009-10-011-0/+56
| | | | | | | 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).
* device-manager: Only store and save details for non-monitor sourcesColin Guthrie2009-10-011-4/+13
* device-restore: Fix the application of an entry to allow changing the name ↵Colin Guthrie2009-10-011-39/+31
| | | | | | of devices. This fixes a few bugs in the copy+pasted implementation of apply_entry()/get_name().