mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -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_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
|
||||
|
||||
|
|
|
|||
|
|
@ -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,15 +483,21 @@ 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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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.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.19 */
|
||||
/** 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.19 */
|
||||
/** 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.19 */
|
||||
/** 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.19 */
|
||||
/** 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.19 */
|
||||
/** 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.19 */
|
||||
/** 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.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_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.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.19 */
|
||||
/** 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.19 */
|
||||
/** 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.19 */
|
||||
* 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,
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@
|
|||
#include <pulsecore/strbuf.h>
|
||||
#include <pulsecore/usergroup.h>
|
||||
#include <pulsecore/strlist.h>
|
||||
#include <pulsecore/cpu-x86.h>
|
||||
|
||||
#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)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -740,14 +740,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);
|
||||
|
||||
/* 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_log_debug("pushing %lu", (unsigned long) rchunk.length); */
|
||||
|
||||
if (rchunk.memblock) {
|
||||
pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk);
|
||||
pa_memblock_unref(rchunk.memblock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue