Age | Commit message (Collapse) | Author | Files | Lines |
|
We ended up dealing with it once in module init, and once more in the
new module callback. Avoiding it in the second case by name seems to be
the cleanest solution (else, we need to store the module index somewhere
in pa_dbusiface_core, which seems about as bad).
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
|
|
Commit ae415b07a07c9fe70714d01c91980edb25d966de ("dbus: Use hooks for
module new and removed events") changed the new module monitoring from
the asynchronous subscription system. Previously handle_load_module()
created the new pa_dbusiface_module object before we got
a notification of the loading of the module, but now we get the
notification already within the pa_module_load() call. That resulted
in a crash, because the module_new_cb() created the
pa_dbusiface_module object before pa_module_load() returned, and then
handle_load_module() would create another pa_dbusiface_module object
for the same module.
This patch removes the pa_dbusiface_module_new() call from
handle_load_module(). module_new_cb() is now responsible for all
pa_dbusiface_module object creations, except the ones that are created
during the initialization of module-dbus-protocol.
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
|
|
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)
|
|
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>
|
|
|
|
|
|
[Fixes by David Henningsson <david.henningsson@canonical.com>]
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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
|
|
This patch fixes wrong indentation introduced by the last patch.
This was mostly done with vim-s retab feature.
|
|
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.
|
|
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.
|
|
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.
|
|
New parameter to avoid resampling. BIG power savings here...
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
|
|
The order of freeing the hashmaps is important here, because otherwise a string used as key is freed before the hashmap
is freed.
Valgrind reports this as:
Invalid read of size 1
at 0x4107042: pa_idxset_string_hash_func (idxset.c:67)
by 0x4106026: remove_entry (hashmap.c:93)
by 0x41061BF: pa_hashmap_free (hashmap.c:110)
by 0x71DD143: pa_dbusiface_core_free (iface-core.c:2105)
by 0x71F2169: module_dbus_protocol_LTX_pa__done (module-dbus-protocol.c:595)
by 0x406DC51: pa_module_free (module.c:162)
by 0x406E01D: pa_module_unload_all (module.c:210)
by 0x4068842: core_free (core.c:169)
by 0x406FD5D: pa_object_unref (object.c:64)
by 0x805224D: pa_core_unref (core.h:184)
by 0x805560B: main (main.c:1159)
Address 0x4d099c0 is 0 bytes inside a block of size 100 free'd
at 0x4025BF0: free (vg_replace_malloc.c:366)
by 0x40F128C: pa_xfree (xmalloc.c:131)
by 0x71E4CEB: pa_dbusiface_device_free (iface-device.c:1293)
by 0x71DCD7E: free_device_cb (iface-core.c:2062)
by 0x41061D7: pa_hashmap_free (hashmap.c:113)
by 0x71DD125: pa_dbusiface_core_free (iface-core.c:2104)
by 0x71F2169: module_dbus_protocol_LTX_pa__done (module-dbus-protocol.c:595)
by 0x406DC51: pa_module_free (module.c:162)
by 0x406E01D: pa_module_unload_all (module.c:210)
by 0x4068842: core_free (core.c:169)
by 0x406FD5D: pa_object_unref (object.c:64)
by 0x805224D: pa_core_unref (core.h:184)
|
|
We should not call pa_core_ref() anywhere in the code. Doing so
will prevent proper daemon shutdown as the only call (in daemon/main.c)
to pa_core_unref() should always call free_core() and perform a normal
shutdown (i.e. unload all modules gracefully).
|
|
This adds a PA_VOLUME_IS_VALID() macro for checking if a given
pa_volume_t is valid. This makes changes to the volume ranges simpler
(just change PA_VOLUME_MAX, for example, without needing to modify any
other code).
|
|
asynchronous subscription events.
Using the subscription events caused an assertion crash sometimes when a sink
was removed and a new sink was created (i.e. card profile change) and a stream
was moved from the removed sink to the new sink. The stream dbus object's
subscription callback got a change event before the core dbus object's
subscription callback got the sink remove/creation events. The stream's
subscription callback then queried the core for the object path of the new
sink, and since the core was not yet aware of the new sink, an assertion was
hit in pa_dbusiface_device_get_path().
Now that the core uses synchronous hooks to keep the sink and source lists up
to date, this particular problem can't occur anymore.
|
|
Without this change, on FreeBSD you'll be bothered by tons of warnings
about overshadowing signal(2).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pa_dbusiface_core_get_playback/record_stream_path().
|
|
|
|
|
|
|
|
|
|
* Make the dbus object constructors take a pa_dbusiface_core pointer
as an argument. Remove the path_prefix argument.
* Expose the core object path as a constant in protocol-dbus.h.
* Move the core interface name constant from iface-core.h to
protocol-dbus.h.
|
|
|
|
|
|
|
|
before the new default device is actually created.
|
|
unregistered.
|
|
|
|
|
|
|