From 9e45f198d00591714f100431c5e7832b46ff4abd Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 9 Nov 2009 21:56:33 +0000 Subject: device-manager: Update docs version -> 0.9.20 --- src/pulse/ext-device-manager.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/pulse/ext-device-manager.h b/src/pulse/ext-device-manager.h index 1442a1a9..8264b8f7 100644 --- a/src/pulse/ext-device-manager.h +++ b/src/pulse/ext-device-manager.h @@ -39,7 +39,7 @@ typedef struct pa_ext_device_manager_role_priority_info { } pa_ext_device_manager_role_priority_info; /** Stores information about one device in the device database that is - * maintained by module-device-manager. \since 0.9.19 */ + * maintained by module-device-manager. \since 0.9.20 */ typedef struct pa_ext_device_manager_info { const char *name; /**< Identifier string of the device. A string like "sink:" or similar followed by the name of the device. */ const char *description; /**< The description of the device when it was last seen, if applicable and saved */ @@ -49,32 +49,32 @@ typedef struct pa_ext_device_manager_info { pa_ext_device_manager_role_priority_info *role_priorities; /**< An array of role priority structures or NULL */ } pa_ext_device_manager_info; -/** Callback prototype for pa_ext_device_manager_test(). \since 0.9.19 */ +/** Callback prototype for pa_ext_device_manager_test(). \since 0.9.20 */ typedef void (*pa_ext_device_manager_test_cb_t)( pa_context *c, uint32_t version, void *userdata); -/** Test if this extension module is available in the server. \since 0.9.19 */ +/** Test if this extension module is available in the server. \since 0.9.20 */ pa_operation *pa_ext_device_manager_test( pa_context *c, pa_ext_device_manager_test_cb_t cb, void *userdata); -/** Callback prototype for pa_ext_device_manager_read(). \since 0.9.19 */ +/** Callback prototype for pa_ext_device_manager_read(). \since 0.9.20 */ typedef void (*pa_ext_device_manager_read_cb_t)( pa_context *c, const pa_ext_device_manager_info *info, int eol, void *userdata); -/** Read all entries from the device database. \since 0.9.19 */ +/** Read all entries from the device database. \since 0.9.20 */ pa_operation *pa_ext_device_manager_read( pa_context *c, pa_ext_device_manager_read_cb_t cb, void *userdata); -/** Sets the description for a device. \since 0.9.19 */ +/** Sets the description for a device. \since 0.9.20 */ pa_operation *pa_ext_device_manager_set_device_description( pa_context *c, const char* device, @@ -82,21 +82,21 @@ pa_operation *pa_ext_device_manager_set_device_description( pa_context_success_cb_t cb, void *userdata); -/** Delete entries from the device database. \since 0.9.19 */ +/** Delete entries from the device database. \since 0.9.20 */ pa_operation *pa_ext_device_manager_delete( pa_context *c, const char *const s[], pa_context_success_cb_t cb, void *userdata); -/** Enable the role-based device-priority routing mode. \since 0.9.19 */ +/** Enable the role-based device-priority routing mode. \since 0.9.20 */ pa_operation *pa_ext_device_manager_enable_role_device_priority_routing( pa_context *c, int enable, pa_context_success_cb_t cb, void *userdata); -/** Prefer a given device in the priority list. \since 0.9.19 */ +/** Prefer a given device in the priority list. \since 0.9.20 */ pa_operation *pa_ext_device_manager_reorder_devices_for_role( pa_context *c, const char* role, @@ -104,20 +104,20 @@ pa_operation *pa_ext_device_manager_reorder_devices_for_role( pa_context_success_cb_t cb, void *userdata); -/** Subscribe to changes in the device database. \since 0.9.19 */ +/** Subscribe to changes in the device database. \since 0.9.20 */ pa_operation *pa_ext_device_manager_subscribe( pa_context *c, int enable, pa_context_success_cb_t cb, void *userdata); -/** Callback prototype for pa_ext_device_manager_set_subscribe_cb(). \since 0.9.19 */ +/** Callback prototype for pa_ext_device_manager_set_subscribe_cb(). \since 0.9.20 */ typedef void (*pa_ext_device_manager_subscribe_cb_t)( pa_context *c, void *userdata); /** Set the subscription callback that is called when - * pa_ext_device_manager_subscribe() was called. \since 0.9.19 */ + * pa_ext_device_manager_subscribe() was called. \since 0.9.20 */ void pa_ext_device_manager_set_subscribe_cb( pa_context *c, pa_ext_device_manager_subscribe_cb_t cb, -- cgit From f3866f263539578517ef36a670e04ca48fa2d1d3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 10 Nov 2009 13:21:55 +0100 Subject: protocol: use the right sample rate for sources Use the correct sample rate for reporting about the timing. --- src/pulsecore/protocol-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index bb29a196..d49a78e5 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -2631,7 +2631,7 @@ static void command_get_record_latency(pa_pdispatch *pd, uint32_t command, uint3 pa_tagstruct_put_usec(reply, s->current_monitor_latency); pa_tagstruct_put_usec(reply, s->current_source_latency + - pa_bytes_to_usec(s->on_the_fly_snapshot, &s->source_output->sample_spec)); + pa_bytes_to_usec(s->on_the_fly_snapshot, &s->source_output->source->sample_spec)); pa_tagstruct_put_boolean(reply, pa_source_get_state(s->source_output->source) == PA_SOURCE_RUNNING && pa_source_output_get_state(s->source_output) == PA_SOURCE_OUTPUT_RUNNING); -- cgit From d9b5bbca017a8e578434e62ab6daeec24f2c11e1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Nov 2009 04:18:10 +0100 Subject: core: adjust volume only when there is actually a memory block Fixes an assert that is hit in somne niche cases: https://bugzilla.redhat.com/show_bug.cgi?id=533482 --- src/pulsecore/sink-input.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 1af2823f..aa84ccb1 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -717,14 +717,15 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, p pa_memchunk rchunk; pa_resampler_run(i->thread_info.resampler, &wchunk, &rchunk); - if (nvfs) { - pa_memchunk_make_writable(&rchunk, 0); - pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink); - } - /* pa_log_debug("pushing %lu", (unsigned long) rchunk.length); */ if (rchunk.memblock) { + + if (nvfs) { + pa_memchunk_make_writable(&rchunk, 0); + pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink); + } + pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk); pa_memblock_unref(rchunk.memblock); } -- cgit From 22946427624afde1d53973fa5a2e9e2041ffc5b7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Nov 2009 04:50:32 +0100 Subject: core: make cpuid code compile cleanly with 32bit PIC --- src/pulsecore/core-util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 93ddf301..d596c481 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -117,6 +117,7 @@ #include #include #include +#include #include "core-util.h" @@ -3085,10 +3086,13 @@ pa_bool_t pa_running_in_vm(void) { pa_zero(sig); __asm__ __volatile__ ( - " xor %%ebx, %%ebx \n\t" + /* ebx/rbx is being used for PIC! */ + " push %%"PA_REG_b" \n\t" " cpuid \n\t" + " mov %%ebx, %1 \n\t" + " pop %%"PA_REG_b" \n\t" - : "=a" (eax), "=b" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2]) + : "=a" (eax), "=r" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2]) : "0" (eax) ); -- cgit From dad36acea34f91cc1d4a7f8e4909369d2225525b Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Wed, 11 Nov 2009 17:24:57 +0000 Subject: device-manager: Update docs version -> 0.9.20 Third time is a charm... maybe. --- src/pulse/ext-device-manager.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/pulse/ext-device-manager.h b/src/pulse/ext-device-manager.h index 8264b8f7..df0ab92f 100644 --- a/src/pulse/ext-device-manager.h +++ b/src/pulse/ext-device-manager.h @@ -39,7 +39,7 @@ typedef struct pa_ext_device_manager_role_priority_info { } pa_ext_device_manager_role_priority_info; /** Stores information about one device in the device database that is - * maintained by module-device-manager. \since 0.9.20 */ + * maintained by module-device-manager. \since 0.9.21 */ typedef struct pa_ext_device_manager_info { const char *name; /**< Identifier string of the device. A string like "sink:" or similar followed by the name of the device. */ const char *description; /**< The description of the device when it was last seen, if applicable and saved */ @@ -49,32 +49,32 @@ typedef struct pa_ext_device_manager_info { pa_ext_device_manager_role_priority_info *role_priorities; /**< An array of role priority structures or NULL */ } pa_ext_device_manager_info; -/** Callback prototype for pa_ext_device_manager_test(). \since 0.9.20 */ +/** Callback prototype for pa_ext_device_manager_test(). \since 0.9.21 */ typedef void (*pa_ext_device_manager_test_cb_t)( pa_context *c, uint32_t version, void *userdata); -/** Test if this extension module is available in the server. \since 0.9.20 */ +/** Test if this extension module is available in the server. \since 0.9.21 */ pa_operation *pa_ext_device_manager_test( pa_context *c, pa_ext_device_manager_test_cb_t cb, void *userdata); -/** Callback prototype for pa_ext_device_manager_read(). \since 0.9.20 */ +/** Callback prototype for pa_ext_device_manager_read(). \since 0.9.21 */ typedef void (*pa_ext_device_manager_read_cb_t)( pa_context *c, const pa_ext_device_manager_info *info, int eol, void *userdata); -/** Read all entries from the device database. \since 0.9.20 */ +/** Read all entries from the device database. \since 0.9.21 */ pa_operation *pa_ext_device_manager_read( pa_context *c, pa_ext_device_manager_read_cb_t cb, void *userdata); -/** Sets the description for a device. \since 0.9.20 */ +/** Sets the description for a device. \since 0.9.21 */ pa_operation *pa_ext_device_manager_set_device_description( pa_context *c, const char* device, @@ -82,21 +82,21 @@ pa_operation *pa_ext_device_manager_set_device_description( pa_context_success_cb_t cb, void *userdata); -/** Delete entries from the device database. \since 0.9.20 */ +/** Delete entries from the device database. \since 0.9.21 */ pa_operation *pa_ext_device_manager_delete( pa_context *c, const char *const s[], pa_context_success_cb_t cb, void *userdata); -/** Enable the role-based device-priority routing mode. \since 0.9.20 */ +/** Enable the role-based device-priority routing mode. \since 0.9.21 */ pa_operation *pa_ext_device_manager_enable_role_device_priority_routing( pa_context *c, int enable, pa_context_success_cb_t cb, void *userdata); -/** Prefer a given device in the priority list. \since 0.9.20 */ +/** Prefer a given device in the priority list. \since 0.9.21 */ pa_operation *pa_ext_device_manager_reorder_devices_for_role( pa_context *c, const char* role, @@ -104,20 +104,20 @@ pa_operation *pa_ext_device_manager_reorder_devices_for_role( pa_context_success_cb_t cb, void *userdata); -/** Subscribe to changes in the device database. \since 0.9.20 */ +/** Subscribe to changes in the device database. \since 0.9.21 */ pa_operation *pa_ext_device_manager_subscribe( pa_context *c, int enable, pa_context_success_cb_t cb, void *userdata); -/** Callback prototype for pa_ext_device_manager_set_subscribe_cb(). \since 0.9.20 */ +/** Callback prototype for pa_ext_device_manager_set_subscribe_cb(). \since 0.9.21 */ typedef void (*pa_ext_device_manager_subscribe_cb_t)( pa_context *c, void *userdata); /** Set the subscription callback that is called when - * pa_ext_device_manager_subscribe() was called. \since 0.9.20 */ + * pa_ext_device_manager_subscribe() was called. \since 0.9.21 */ void pa_ext_device_manager_set_subscribe_cb( pa_context *c, pa_ext_device_manager_subscribe_cb_t cb, -- cgit From 14eaf245c63de8b4ec0f0b6845284e52d5f8bcd4 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Sat, 14 Nov 2009 22:23:10 +0000 Subject: build-sys: Make sure all alsa path config files are installed While all alsa path configuration files were in EXTRA_DIST not all of them were in in alsapaths_DATA. Fixed by only defining the list in one place --- src/Makefile.am | 66 +++++++++++++++++++++++---------------------------------- 1 file changed, 27 insertions(+), 39 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index f0d5a5e8..9860bbed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -109,27 +109,12 @@ MODULE_LDFLAGS = -module -disable-static -avoid-version $(LDFLAGS_NOUNDEFINED) # Extra files # ################################### -EXTRA_DIST = \ - pulse/client.conf.in \ - pulse/version.h.in \ - daemon/daemon.conf.in \ - daemon/default.pa.in \ - daemon/system.pa.in \ - daemon/default.pa.win32 \ - depmod.py \ - daemon/esdcompat.in \ - daemon/start-pulseaudio-x11.in \ - daemon/start-pulseaudio-kde.in \ - utils/padsp \ - modules/module-defs.h.m4 \ - daemon/pulseaudio.desktop.in \ - daemon/pulseaudio-kde.desktop.in \ - map-file \ - daemon/pulseaudio-system.conf \ +ALSA_PROFILES = \ modules/alsa/mixer/profile-sets/default.conf \ modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \ - modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf \ - modules/alsa/mixer/profile-sets/90-pulseaudio.rules \ + modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf + +ALSA_PATHS = \ modules/alsa/mixer/paths/analog-input-aux.conf \ modules/alsa/mixer/paths/analog-input.conf \ modules/alsa/mixer/paths/analog-input.conf.common \ @@ -148,6 +133,27 @@ EXTRA_DIST = \ modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \ modules/alsa/mixer/paths/analog-output-mono.conf +EXTRA_DIST = \ + pulse/client.conf.in \ + pulse/version.h.in \ + daemon/daemon.conf.in \ + daemon/default.pa.in \ + daemon/system.pa.in \ + daemon/default.pa.win32 \ + depmod.py \ + daemon/esdcompat.in \ + daemon/start-pulseaudio-x11.in \ + daemon/start-pulseaudio-kde.in \ + utils/padsp \ + modules/module-defs.h.m4 \ + daemon/pulseaudio.desktop.in \ + daemon/pulseaudio-kde.desktop.in \ + map-file \ + daemon/pulseaudio-system.conf \ + modules/alsa/mixer/profile-sets/90-pulseaudio.rules + ${ALSA_PROFILES} \ + ${ALSA_PATHS} + pulseconf_DATA = \ default.pa \ system.pa \ @@ -1088,32 +1094,14 @@ modlibexec_LTLIBRARIES += \ module-alsa-source.la \ module-alsa-card.la -alsaprofilesets_DATA = \ - modules/alsa/mixer/profile-sets/default.conf \ - modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \ - modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf +alsaprofilesets_DATA = ${ALSA_PROFILES} if HAVE_UDEV udevrules_DATA = \ modules/alsa/mixer/profile-sets/90-pulseaudio.rules endif -alsapaths_DATA = \ - modules/alsa/mixer/paths/analog-input-aux.conf \ - modules/alsa/mixer/paths/analog-input.conf \ - modules/alsa/mixer/paths/analog-input.conf.common \ - modules/alsa/mixer/paths/analog-input-fm.conf \ - modules/alsa/mixer/paths/analog-input-linein.conf \ - modules/alsa/mixer/paths/analog-input-mic.conf \ - modules/alsa/mixer/paths/analog-input-mic.conf.common \ - modules/alsa/mixer/paths/analog-input-mic-line.conf \ - modules/alsa/mixer/paths/analog-input-tvtuner.conf \ - modules/alsa/mixer/paths/analog-input-video.conf \ - modules/alsa/mixer/paths/analog-output.conf \ - modules/alsa/mixer/paths/analog-output.conf.common \ - modules/alsa/mixer/paths/analog-output-headphones.conf \ - modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \ - modules/alsa/mixer/paths/analog-output-mono.conf +alsapaths_DATA = ${ALSA_PATHS} endif -- cgit From eb5562637beab22f3f906a116775cb98c752320f Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 16 Nov 2009 23:36:44 +0000 Subject: build-sys: Fix missing trailing slash in 14eaf2 --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 9860bbed..b45908b3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -150,7 +150,7 @@ EXTRA_DIST = \ daemon/pulseaudio-kde.desktop.in \ map-file \ daemon/pulseaudio-system.conf \ - modules/alsa/mixer/profile-sets/90-pulseaudio.rules + modules/alsa/mixer/profile-sets/90-pulseaudio.rules \ ${ALSA_PROFILES} \ ${ALSA_PATHS} -- cgit From 9033140f18db820f3be9a6acae88a118d9154cf6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 18 Nov 2009 21:41:38 +0100 Subject: rygel: fix itemCount property for sources Fixes http://pulseaudio.org/ticket/721 --- src/modules/module-rygel-media-server.c | 45 +++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c index 4c02e958..82bcd14c 100644 --- a/src/modules/module-rygel-media-server.c +++ b/src/modules/module-rygel-media-server.c @@ -464,8 +464,18 @@ static char **child_array(struct userdata *u, const char *path, unsigned *n) { if (pa_streq(path, OBJECT_SINKS)) m = pa_idxset_size(u->core->sinks); - else + else { + unsigned k; + m = pa_idxset_size(u->core->sources); + k = pa_idxset_size(u->core->sinks); + + pa_assert(m >= k); + + /* Subtract the monitor sources from the numbers of + * sources. There is one monitor source for each sink */ + m -= k; + } array = pa_xnew(char*, m); *n = 0; @@ -473,14 +483,20 @@ static char **child_array(struct userdata *u, const char *path, unsigned *n) { if (pa_streq(path, OBJECT_SINKS)) { pa_sink *sink; - PA_IDXSET_FOREACH(sink, u->core->sinks, idx) + PA_IDXSET_FOREACH(sink, u->core->sinks, idx) { + pa_assert((*n) < m); array[(*n)++] = pa_sprintf_malloc(OBJECT_SINKS "/%u", sink->index); + } } else { pa_source *source; - PA_IDXSET_FOREACH(source, u->core->sources, idx) - if (!source->monitor_of) + PA_IDXSET_FOREACH(source, u->core->sources, idx) { + + if (!source->monitor_of) { + pa_assert((*n) < m); array[(*n)++] = pa_sprintf_malloc(OBJECT_SOURCES "/%u", source->index); + } + } } pa_assert((*n) <= m); @@ -529,16 +545,20 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag free_child_array(array, n); } else if (message_is_property_get(m, "org.gnome.UPnP.MediaContainer1", "ItemCount")) { + unsigned n, k; + + n = pa_idxset_size(u->core->sinks); + k = pa_idxset_size(u->core->sources); + pa_assert(k >= n); + pa_assert_se(r = dbus_message_new_method_return(m)); append_variant_unsigned(r, NULL, - pa_streq(path, OBJECT_SINKS) ? - pa_idxset_size(u->core->sinks) : - pa_idxset_size(u->core->sources)); + pa_streq(path, OBJECT_SINKS) ? n : k - n); } else if (message_is_property_get_all(m, "org.gnome.UPnP.MediaContainer1")) { DBusMessageIter iter, sub; char **array; - unsigned n; + unsigned n, k; pa_assert_se(r = dbus_message_new_method_return(m)); dbus_message_iter_init_append(r, &iter); @@ -550,10 +570,13 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag array = child_array(u, path, &n); append_property_dict_entry_object_array(r, &sub, "Items", (const char**) array, n); free_child_array(array, n); + + n = pa_idxset_size(u->core->sinks); + k = pa_idxset_size(u->core->sources); + pa_assert(k >= n); + append_property_dict_entry_unsigned(r, &sub, "ItemCount", - pa_streq(path, OBJECT_SINKS) ? - pa_idxset_size(u->core->sinks) : - pa_idxset_size(u->core->sources)); + pa_streq(path, OBJECT_SINKS) ? n : k - n); pa_assert_se(dbus_message_iter_close_container(&iter, &sub)); -- cgit