summaryrefslogtreecommitdiff
path: root/src/modules/dbus
Commit message (Collapse)AuthorAgeFilesLines
* core, pulse, modules: Fix undefined behavior with array subscript of invalid ↵Kamil Rytarowski2015-12-081-1/+1
| | | | | | | | | | | | | | type From the NetBSD manual: The first argument of these functions is of type int, but only a very restricted subset of values are actually valid. The argument must either be the value of the macro EOF (which has a negative value), or must be a non-negative value within the range representable as unsigned char. Passing invalid values leads to undefined behavior. -- ctype(3)
* make availability of ports visible over dbusJohn Horan2015-10-191-2/+63
|
* dbus: Add card profile availability info to APIJuho Hämäläinen2015-10-192-6/+64
| | | | [diwic: Profile availability to boolean bug fixed]
* Rename functions with "tostring" in the name to one with "to_string" to ↵Deepak Srivastava2015-09-251-1/+1
| | | | | | | | | | | conform with the convention. component: core <EP-E358F00C1D9A449EAE69225B9D2530F8> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=88833 Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
* Revert "Warn on loading module-dbus-protocol"Juho Hämäläinen2015-05-211-5/+0
| | | | | | | This reverts commit e2a433b222e2d4b6e85062b979e8ed3dae113aca. Events are now handled using hooks instead of asynchronous subscription system.
* dbus: Use hooks for module proplist changesJuho Hämäläinen2015-05-211-22/+19
|
* dbus: Use hooks for module new and removed eventsJuho Hämäläinen2015-05-211-38/+48
|
* dbus: Use hook for sample cache proplist changesJuho Hämäläinen2015-05-211-21/+20
|
* dbus: Use hooks for sample cache new and removed eventsJuho Hämäläinen2015-05-211-35/+61
|
* dbus: Use hooks for default sink and source changesJuho Hämäläinen2015-04-021-62/+84
| | | | [Fixes by David Henningsson <david.henningsson@canonical.com>]
* dbus: Use hooks for put and unlinkJuho Hämäläinen2015-04-021-134/+239
| | | | | Use hooks for all events that have core hooks defined. Some events handled in iface-core don't have hooks so leave those for later.
* dbus: Use state changed hook for sink-input and source-output rate changesJuho Hämäläinen2015-04-021-0/+20
|
* dbus: Use hooks for sink-input and source-output eventsJuho Hämäläinen2015-04-021-55/+104
|
* dbus: Use hooks for sink and source eventsJuho Hämäläinen2015-04-021-30/+91
|
* dbus: Use hooks for client proplist changesJuho Hämäläinen2015-04-021-17/+17
|
* dbus: Use hooks for card profile eventsJuho Hämäläinen2015-04-021-35/+34
|
* update FSF addresses to FSF web pageOndrej Holecek2015-01-1421-63/+21
| | | | | | | | | FSF addresses used in PA sources are no longer valid and rpmlint generates numerous warnings during packaging because of this. This patch changes all FSF addresses to FSF web page according to the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html Done automatically by sed-ing through sources.
* Fix URLs still pointing to the old wikiAlexander E. Patrakov2014-12-2210-20/+20
| | | | Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
* Warn on loading module-dbus-protocolAlexander E. Patrakov2014-12-081-0/+5
| | | | | | | | | | | See also https://www.mail-archive.com/ubuntu-audio-dev@lists.launchpad.net/msg00268.html The warning may be useful for users who carried over the module-loading statement from default configuration files shipped with old PulseAudio versions. Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
* dbus-iface: Initialize "new_active" variable to NULLDavid Henningsson2014-11-171-1/+1
| | | | | | | | Fixes warning: 'new_active' may be used uninitialized in this function, and could potentially cause erronous behaviour in case an invalid port name was specified. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* dbus: Fix the ActivePort property handlerTanu Kaskinen2014-11-141-1/+10
| | | | | | | | The old code tried to look up the port object by using an object path, but the ports hashmap uses port names as keys, so the method failed always. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=85369
* source, sink: Support weird sample ratesAlexander E. Patrakov2014-06-051-4/+2
| | | | | | | | This fixes assertion failures that manifest themselves with cards that support only weird rates such as 37286Hz. Tested with snd-pcsp. Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48109
* sink-input, source-output: Remove redundant get_mute() functionsTanu Kaskinen2014-05-021-2/+2
| | | | | The functions just return the muted value. Callers can as well read the struct field directly, it's simpler that way.
* dbus: Use correct initialization for source ports hashmap.Juho Hämäläinen2014-04-171-1/+1
| | | | | | | | | | Source ports hashmap is created without value freeing function, which results in (hashmap values) device ports not being freed when source ports are removed or module is unloaded. This results in memory leak during normal operation and during daemon shutdown dbus_protocol shared object isn't unreferenced correctly, leaving dbus_protocol object in core->shared, which causes assert when shared hashmap is checked for isempty() before freeing.
* dbus: Use correct idxset when getting sourcesJuho Hämäläinen2014-02-111-1/+1
| | | | | This fixes get_sources() which iterates wrong idxset when getting source object paths in GetSources or GetAll.
* Add pa_sample_rate_valid()Tanu Kaskinen2013-12-151-3/+3
| | | | | | I think this makes the code a bit nicer to read and write. This also reduces the chances of off-by-one errors when checking the bounds of sample rate values.
* Add pa_sample_format_valid()Tanu Kaskinen2013-12-151-2/+2
| | | | | | I think this makes the code a bit nicer to read and write. This also reduces the chances of off-by-one errors when checking the bounds of the sample format value.
* Pass the profile object instead of the profile name to pa_card_set_profile()Tanu Kaskinen2013-11-293-1/+8
| | | | | | | | | | | | | When setting attribute foo, or in this case the card profile, in my opinion the thing passed to the set_foo() function should be of the type of foo, not a string identifier that can be used to search for the actual foo in set_foo(). This is mostly a question of taste, but there's at least some small benefit from passing the actual object: often the profile object is already available when calling pa_card_set_profile(), so passing the card name would cause unnecessary searching when pa_card_set_profile() needs to look up the profile from the hashmap.
* hashmap: Add the ability to free keysArun Raghavan2013-09-173-30/+35
| | | | | | | | | | Since the hashmap stores a pointer to the key provided at pa_hashmap_put() time, it make sense to allow the hashmap to be given ownership of the key and have it free it at pa_hashmap_remove/free time. To do this cleanly, we now provide the key and value free functions at hashmap creation time with a pa_hashmap_new_full. With this, we do away with the free function that was provided at remove/free time for freeing the value.
* dbus: Fix invalid dbus_bool_t valuesTanu Kaskinen2013-07-171-26/+26
| | | | | libdbus doesn't like it if it's passed a boolean whose value is not 0 nor 1.
* Revert dbus_bool_t variables to use TRUE/FALSE instead of true/falsepoljar (Damir Jelić)2013-07-044-25/+25
|
* Remove pa_bool_t and replace it with bool.poljar (Damir Jelić)2013-07-047-73/+73
| | | | | | | | | | | | | | | | | commands used for this (executed from the pulseaudio/src directory): find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \ -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \ -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \ -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \ -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \ -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \ -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \ -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \; and: sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \ -e '181,194!s/\bTRUE\b/true/' -e \ '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
* Whitespace cleanup: Fix broken indentation by handpoljar (Damir Jelić)2013-06-248-66/+66
| | | | | | This patch fixes wrong indentation introduced by the last patch. This was mostly done with vim-s retab feature.
* Whitespace cleanup: Remove tabspoljar (Damir Jelić)2013-06-248-66/+66
| | | | | | | | | | | | | | This patch removes all tabs hidden inside the source tree and replaces them with 4 spaces. Command used for this: find . -type d \( -name bluetooth \) -prune -o -regex '\(.*\.[hc]\|.*\.cc\)' -a -not -name 'reserve*.[ch]' -a -not -name 'gnt*.h' -a -not -name 'adrian*' -exec sed -i -e 's/\t/ /g' {} \; The excluded files are mirrored files from external sources containing tabs.
* idxset: Use pa_free_cb_t instead of pa_free2_cb_tTanu Kaskinen2013-02-161-7/+2
| | | | There were no users for the userdata pointer.
* hashmap: Use pa_free_cb_t instead of pa_free2_cb_tTanu Kaskinen2013-02-163-76/+12
| | | | | | | | The previous patch removed module-gconf's dependency on the userdata pointer of the free callback, and that was the only place where the userdata pointer of pa_free2_cb_t was used, so now there's no need for pa_free2_cb_t in pa_hashmap_free(). Using pa_free_cb_t instead allows removing a significant amount of repetitive code.
* dbus: Fix connection cleanup when killing clientsTanu Kaskinen2013-02-061-0/+1
|
* Log the reason for every suspend/resume.Tanu Kaskinen2012-12-191-6/+17
| | | | | | I was looking at a log that showed that a suspend happened (at a strange time), but the log didn't tell me why the suspend was done. This patch tries to make sure that that won't happen again.
* dbus: Add signal org.PulseAudio.Core1.Card.NewProfileMikel Astiz2012-12-191-0/+16
| | | | | Add a new D-Bus signal to report profiles that have been dynamically created for already existing cards.
* dbus: Support dynamically created card profilesMikel Astiz2012-12-191-0/+22
| | | | | Use the recently added core hook to detect when new profiles are added to a card, and update the D-Bus object accordingly.
* card: Ensure that there's always at least one profile.Tanu Kaskinen2012-06-291-33/+8
| | | | | | | | | | In practice there is always at least one profile, and I don't think there will ever be cards without profiles. Therefore, I added assertions to pa_card_new() stating that the card new data must always contain at least one profile. Now a lot of code can be simplified, because it's guaranteed that the profiles hashmap and the active_profile field are always non-NULL.
* sink, source: Always create a hashmap for ports.Tanu Kaskinen2012-06-291-20/+12
| | | | | | Having the hashmap sometimes NULL requires a lot of checking here and there, so ensuring that the hashmap is always non-NULL simplifies the code.
* modules: Use pa_streq instead of strcmp.Arti Trivedi Bora2012-06-091-3/+3
|
* dbus: Fix dbus argument type in iface-stream.c handle_move().Peter Meerwald2012-04-171-1/+1
| | | | | BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48376 Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
* dbus: Add an assertion to get rid of a warning from Coverity.Tanu Kaskinen2012-03-281-1/+1
| | | | | | | Coverity thinks that sample can be NULL when it's dereferenced after this line. Adding an assertion doesn't hurt here (in my opinion), and that should get rid of the warning.
* dbus: Fix device latency querying.Tanu Kaskinen2012-03-281-3/+7
|
* core: infrastructure for alternate sampling ratePierre-Louis Bossart2011-10-171-1/+44
| | | | | | New parameter to avoid resampling. BIG power savings here... Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
* dbus: Don't crash if the module does not loadDavid Henningsson2011-09-221-3/+5
| | | | | | | | If module-dbus-protocol fails to start, pa__done is still called, which falsified the assumption that u->connections was always set. BugLink: http://bugs.launchpad.net/bugs/855729 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* Remove extra ; s where they are not allowed in strict C99Maarten Bosmans2011-08-252-2/+2
|
* dbus: Use pa_device_type_t rather than an internal equivalentColin Guthrie2011-08-181-61/+56
|