mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
This commit is contained in:
		
						commit
						9708ecd648
					
				
					 6 changed files with 86 additions and 70 deletions
				
			
		| 
						 | 
					@ -109,27 +109,12 @@ MODULE_LDFLAGS = -module -disable-static -avoid-version $(LDFLAGS_NOUNDEFINED)
 | 
				
			||||||
#          Extra files            #
 | 
					#          Extra files            #
 | 
				
			||||||
###################################
 | 
					###################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXTRA_DIST = \
 | 
					ALSA_PROFILES = \
 | 
				
			||||||
		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/default.conf \
 | 
							modules/alsa/mixer/profile-sets/default.conf \
 | 
				
			||||||
		modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \
 | 
							modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \
 | 
				
			||||||
		modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf \
 | 
							modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
 | 
				
			||||||
		modules/alsa/mixer/profile-sets/90-pulseaudio.rules \
 | 
					
 | 
				
			||||||
 | 
					ALSA_PATHS = \
 | 
				
			||||||
		modules/alsa/mixer/paths/analog-input-aux.conf \
 | 
							modules/alsa/mixer/paths/analog-input-aux.conf \
 | 
				
			||||||
		modules/alsa/mixer/paths/analog-input.conf \
 | 
							modules/alsa/mixer/paths/analog-input.conf \
 | 
				
			||||||
		modules/alsa/mixer/paths/analog-input.conf.common \
 | 
							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-lfe-on-mono.conf \
 | 
				
			||||||
		modules/alsa/mixer/paths/analog-output-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 = \
 | 
					pulseconf_DATA = \
 | 
				
			||||||
		default.pa \
 | 
							default.pa \
 | 
				
			||||||
		system.pa \
 | 
							system.pa \
 | 
				
			||||||
| 
						 | 
					@ -1088,32 +1094,14 @@ modlibexec_LTLIBRARIES += \
 | 
				
			||||||
		module-alsa-source.la \
 | 
							module-alsa-source.la \
 | 
				
			||||||
		module-alsa-card.la
 | 
							module-alsa-card.la
 | 
				
			||||||
 | 
					
 | 
				
			||||||
alsaprofilesets_DATA = \
 | 
					alsaprofilesets_DATA = ${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
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if HAVE_UDEV
 | 
					if HAVE_UDEV
 | 
				
			||||||
udevrules_DATA = \
 | 
					udevrules_DATA = \
 | 
				
			||||||
		modules/alsa/mixer/profile-sets/90-pulseaudio.rules
 | 
							modules/alsa/mixer/profile-sets/90-pulseaudio.rules
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
alsapaths_DATA = \
 | 
					alsapaths_DATA = ${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 \
 | 
					 | 
				
			||||||
		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
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -464,8 +464,18 @@ static char **child_array(struct userdata *u, const char *path, unsigned *n) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (pa_streq(path, OBJECT_SINKS))
 | 
					    if (pa_streq(path, OBJECT_SINKS))
 | 
				
			||||||
        m = pa_idxset_size(u->core->sinks);
 | 
					        m = pa_idxset_size(u->core->sinks);
 | 
				
			||||||
    else
 | 
					    else {
 | 
				
			||||||
 | 
					        unsigned k;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        m = pa_idxset_size(u->core->sources);
 | 
					        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);
 | 
					    array = pa_xnew(char*, m);
 | 
				
			||||||
    *n = 0;
 | 
					    *n = 0;
 | 
				
			||||||
| 
						 | 
					@ -473,14 +483,20 @@ static char **child_array(struct userdata *u, const char *path, unsigned *n) {
 | 
				
			||||||
    if (pa_streq(path, OBJECT_SINKS)) {
 | 
					    if (pa_streq(path, OBJECT_SINKS)) {
 | 
				
			||||||
        pa_sink *sink;
 | 
					        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);
 | 
					            array[(*n)++] = pa_sprintf_malloc(OBJECT_SINKS "/%u", sink->index);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        pa_source *source;
 | 
					        pa_source *source;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        PA_IDXSET_FOREACH(source, u->core->sources, idx)
 | 
					        PA_IDXSET_FOREACH(source, u->core->sources, idx) {
 | 
				
			||||||
            if (!source->monitor_of)
 | 
					
 | 
				
			||||||
 | 
					            if (!source->monitor_of) {
 | 
				
			||||||
 | 
					                pa_assert((*n) < m);
 | 
				
			||||||
                array[(*n)++] = pa_sprintf_malloc(OBJECT_SOURCES "/%u", source->index);
 | 
					                array[(*n)++] = pa_sprintf_malloc(OBJECT_SOURCES "/%u", source->index);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_assert((*n) <= m);
 | 
					    pa_assert((*n) <= m);
 | 
				
			||||||
| 
						 | 
					@ -529,16 +545,20 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
 | 
				
			||||||
            free_child_array(array, n);
 | 
					            free_child_array(array, n);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        } else if (message_is_property_get(m, "org.gnome.UPnP.MediaContainer1", "ItemCount")) {
 | 
					        } 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));
 | 
					            pa_assert_se(r = dbus_message_new_method_return(m));
 | 
				
			||||||
            append_variant_unsigned(r, NULL,
 | 
					            append_variant_unsigned(r, NULL,
 | 
				
			||||||
                                    pa_streq(path, OBJECT_SINKS) ?
 | 
					                                    pa_streq(path, OBJECT_SINKS) ? n : k - n);
 | 
				
			||||||
                                    pa_idxset_size(u->core->sinks) :
 | 
					 | 
				
			||||||
                                    pa_idxset_size(u->core->sources));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        } else if (message_is_property_get_all(m, "org.gnome.UPnP.MediaContainer1")) {
 | 
					        } else if (message_is_property_get_all(m, "org.gnome.UPnP.MediaContainer1")) {
 | 
				
			||||||
            DBusMessageIter iter, sub;
 | 
					            DBusMessageIter iter, sub;
 | 
				
			||||||
            char **array;
 | 
					            char **array;
 | 
				
			||||||
            unsigned n;
 | 
					            unsigned n, k;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_assert_se(r = dbus_message_new_method_return(m));
 | 
					            pa_assert_se(r = dbus_message_new_method_return(m));
 | 
				
			||||||
            dbus_message_iter_init_append(r, &iter);
 | 
					            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);
 | 
					            array = child_array(u, path, &n);
 | 
				
			||||||
            append_property_dict_entry_object_array(r, &sub, "Items", (const char**) array, n);
 | 
					            append_property_dict_entry_object_array(r, &sub, "Items", (const char**) array, n);
 | 
				
			||||||
            free_child_array(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",
 | 
					            append_property_dict_entry_unsigned(r, &sub, "ItemCount",
 | 
				
			||||||
                                                pa_streq(path, OBJECT_SINKS) ?
 | 
					                                                pa_streq(path, OBJECT_SINKS) ? n : k - n);
 | 
				
			||||||
                                                pa_idxset_size(u->core->sinks) :
 | 
					 | 
				
			||||||
                                                pa_idxset_size(u->core->sources));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
 | 
					            pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,7 +39,7 @@ typedef struct pa_ext_device_manager_role_priority_info {
 | 
				
			||||||
} 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
 | 
					/** 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.21 */
 | 
				
			||||||
typedef struct pa_ext_device_manager_info {
 | 
					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 *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 */
 | 
					    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_role_priority_info *role_priorities; /**< An array of role priority structures or NULL */
 | 
				
			||||||
} pa_ext_device_manager_info;
 | 
					} 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.21 */
 | 
				
			||||||
typedef void (*pa_ext_device_manager_test_cb_t)(
 | 
					typedef void (*pa_ext_device_manager_test_cb_t)(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        uint32_t version,
 | 
					        uint32_t version,
 | 
				
			||||||
        void *userdata);
 | 
					        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.21 */
 | 
				
			||||||
pa_operation *pa_ext_device_manager_test(
 | 
					pa_operation *pa_ext_device_manager_test(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        pa_ext_device_manager_test_cb_t cb,
 | 
					        pa_ext_device_manager_test_cb_t cb,
 | 
				
			||||||
        void *userdata);
 | 
					        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.21 */
 | 
				
			||||||
typedef void (*pa_ext_device_manager_read_cb_t)(
 | 
					typedef void (*pa_ext_device_manager_read_cb_t)(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        const pa_ext_device_manager_info *info,
 | 
					        const pa_ext_device_manager_info *info,
 | 
				
			||||||
        int eol,
 | 
					        int eol,
 | 
				
			||||||
        void *userdata);
 | 
					        void *userdata);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Read all entries from the device database. \since 0.9.19 */
 | 
					/** Read all entries from the device database. \since 0.9.21 */
 | 
				
			||||||
pa_operation *pa_ext_device_manager_read(
 | 
					pa_operation *pa_ext_device_manager_read(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        pa_ext_device_manager_read_cb_t cb,
 | 
					        pa_ext_device_manager_read_cb_t cb,
 | 
				
			||||||
        void *userdata);
 | 
					        void *userdata);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Sets the description for a device. \since 0.9.19 */
 | 
					/** Sets the description for a device. \since 0.9.21 */
 | 
				
			||||||
pa_operation *pa_ext_device_manager_set_device_description(
 | 
					pa_operation *pa_ext_device_manager_set_device_description(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        const char* device,
 | 
					        const char* device,
 | 
				
			||||||
| 
						 | 
					@ -82,21 +82,21 @@ pa_operation *pa_ext_device_manager_set_device_description(
 | 
				
			||||||
        pa_context_success_cb_t cb,
 | 
					        pa_context_success_cb_t cb,
 | 
				
			||||||
        void *userdata);
 | 
					        void *userdata);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Delete entries from the device database. \since 0.9.19 */
 | 
					/** Delete entries from the device database. \since 0.9.21 */
 | 
				
			||||||
pa_operation *pa_ext_device_manager_delete(
 | 
					pa_operation *pa_ext_device_manager_delete(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        const char *const s[],
 | 
					        const char *const s[],
 | 
				
			||||||
        pa_context_success_cb_t cb,
 | 
					        pa_context_success_cb_t cb,
 | 
				
			||||||
        void *userdata);
 | 
					        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.21 */
 | 
				
			||||||
pa_operation *pa_ext_device_manager_enable_role_device_priority_routing(
 | 
					pa_operation *pa_ext_device_manager_enable_role_device_priority_routing(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        int enable,
 | 
					        int enable,
 | 
				
			||||||
        pa_context_success_cb_t cb,
 | 
					        pa_context_success_cb_t cb,
 | 
				
			||||||
        void *userdata);
 | 
					        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.21 */
 | 
				
			||||||
pa_operation *pa_ext_device_manager_reorder_devices_for_role(
 | 
					pa_operation *pa_ext_device_manager_reorder_devices_for_role(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        const char* role,
 | 
					        const char* role,
 | 
				
			||||||
| 
						 | 
					@ -104,20 +104,20 @@ pa_operation *pa_ext_device_manager_reorder_devices_for_role(
 | 
				
			||||||
        pa_context_success_cb_t cb,
 | 
					        pa_context_success_cb_t cb,
 | 
				
			||||||
        void *userdata);
 | 
					        void *userdata);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Subscribe to changes in the device database. \since 0.9.19 */
 | 
					/** Subscribe to changes in the device database. \since 0.9.21 */
 | 
				
			||||||
pa_operation *pa_ext_device_manager_subscribe(
 | 
					pa_operation *pa_ext_device_manager_subscribe(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        int enable,
 | 
					        int enable,
 | 
				
			||||||
        pa_context_success_cb_t cb,
 | 
					        pa_context_success_cb_t cb,
 | 
				
			||||||
        void *userdata);
 | 
					        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.21 */
 | 
				
			||||||
typedef void (*pa_ext_device_manager_subscribe_cb_t)(
 | 
					typedef void (*pa_ext_device_manager_subscribe_cb_t)(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        void *userdata);
 | 
					        void *userdata);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Set the subscription callback that is called when
 | 
					/** 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.21 */
 | 
				
			||||||
void pa_ext_device_manager_set_subscribe_cb(
 | 
					void pa_ext_device_manager_set_subscribe_cb(
 | 
				
			||||||
        pa_context *c,
 | 
					        pa_context *c,
 | 
				
			||||||
        pa_ext_device_manager_subscribe_cb_t cb,
 | 
					        pa_ext_device_manager_subscribe_cb_t cb,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -117,6 +117,7 @@
 | 
				
			||||||
#include <pulsecore/strbuf.h>
 | 
					#include <pulsecore/strbuf.h>
 | 
				
			||||||
#include <pulsecore/usergroup.h>
 | 
					#include <pulsecore/usergroup.h>
 | 
				
			||||||
#include <pulsecore/strlist.h>
 | 
					#include <pulsecore/strlist.h>
 | 
				
			||||||
 | 
					#include <pulsecore/cpu-x86.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "core-util.h"
 | 
					#include "core-util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3085,10 +3086,13 @@ pa_bool_t pa_running_in_vm(void) {
 | 
				
			||||||
    pa_zero(sig);
 | 
					    pa_zero(sig);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    __asm__ __volatile__ (
 | 
					    __asm__ __volatile__ (
 | 
				
			||||||
        "  xor %%ebx, %%ebx          \n\t"
 | 
					        /* ebx/rbx is being used for PIC! */
 | 
				
			||||||
 | 
					        "  push %%"PA_REG_b"         \n\t"
 | 
				
			||||||
        "  cpuid                     \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)
 | 
					        : "0" (eax)
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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_monitor_latency);
 | 
				
			||||||
    pa_tagstruct_put_usec(reply,
 | 
					    pa_tagstruct_put_usec(reply,
 | 
				
			||||||
                          s->current_source_latency +
 | 
					                          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_tagstruct_put_boolean(reply,
 | 
				
			||||||
                             pa_source_get_state(s->source_output->source) == PA_SOURCE_RUNNING &&
 | 
					                             pa_source_get_state(s->source_output->source) == PA_SOURCE_RUNNING &&
 | 
				
			||||||
                             pa_source_output_get_state(s->source_output) == PA_SOURCE_OUTPUT_RUNNING);
 | 
					                             pa_source_output_get_state(s->source_output) == PA_SOURCE_OUTPUT_RUNNING);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -740,14 +740,15 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, p
 | 
				
			||||||
                pa_memchunk rchunk;
 | 
					                pa_memchunk rchunk;
 | 
				
			||||||
                pa_resampler_run(i->thread_info.resampler, &wchunk, &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); */
 | 
					/*                 pa_log_debug("pushing %lu", (unsigned long) rchunk.length); */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (rchunk.memblock) {
 | 
					                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_memblockq_push_align(i->thread_info.render_memblockq, &rchunk);
 | 
				
			||||||
                    pa_memblock_unref(rchunk.memblock);
 | 
					                    pa_memblock_unref(rchunk.memblock);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue