endif
# Module dependencies
-<<<<<<< HEAD
-
-# OSS support : import from 15.0
-if cc.has_header('sys/soundcard.h', required: get_option('oss-output'))
- # OSS output via daemon module-detect
-=======
if cc.has_header('sys/soundcard.h', required: get_option('oss-output'))
->>>>>>> upstream/15.0
cdata.set('HAVE_OSS_OUTPUT', 1)
# OSS wrapper
cdata.set('HAVE_OSS_WRAPPER', 1)
-<<<<<<< HEAD
option('dlog',
type : 'boolean', value : true,
description : 'dlog')
option('hal-sysconfdir',
type : 'string',
description : 'Directory for HAL sysconf files')
-=======
option('daemon',
type : 'boolean', value : true,
description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
option('doxygen',
type : 'boolean', value : true,
description : 'Enable building and installation of documentation generated with doxygen')
->>>>>>> upstream/15.0
option('gcov',
type : 'boolean', value : false,
description : 'Enable optional gcov coverage analysis')
}
#endif
-<<<<<<< HEAD
#ifdef TIZEN_PA_READY
static int create_ready_file(const char *path) {
int ready_fd = -1;
}
#endif /* TIZEN_PA_READY */
-=======
#ifdef OS_IS_WIN32
#define SVC_NAME "PulseAudio"
static bool is_svc = true;
static int real_main(int s_argc, char *s_argv[]) {
#else
->>>>>>> upstream/15.0
int main(int argc, char *argv[]) {
#endif
pa_core *c = NULL;
#ifdef HAVE_DBUS
c->server_type = conf->local_server_type;
#endif
-
-<<<<<<< HEAD
#ifdef TIZEN_EMPTY_POP
c->empty_pop_threshold = conf->empty_pop_threshold;
#endif
-=======
+
pa_core_check_idle(c);
c->state = PA_CORE_RUNNING;
->>>>>>> upstream/15.0
pa_cpu_init(&c->cpu_info);
install_dir : privlibdir,
dependencies : [
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
-<<<<<<< HEAD
- x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep, dlog_dep
-=======
x11_dep, libsystemd_dep, glib_dep.partial_dependency(compile_args: true),
gtk_dep.partial_dependency(compile_args: true), asyncns_dep, libintl_dep,
- platform_dep, tcpwrap_dep, platform_socket_dep, execinfo_dep,
->>>>>>> upstream/15.0
+ platform_dep, tcpwrap_dep, platform_socket_dep, execinfo_dep, dlog_dep
],
implicit_include_directories : false)
card = pa_hashmap_get(backend->cards, path);
-<<<<<<< HEAD
-#ifndef __TIZEN__
- card->connecting = false;
-#endif
-
- if (!card || codec != HFP_AUDIO_CODEC_CVSD || card->fd >= 0) {
-=======
if (!card || (codec != HFP_AUDIO_CODEC_CVSD && codec != HFP_AUDIO_CODEC_MSBC) || card->fd >= 0) {
->>>>>>> upstream/15.0
pa_log_warn("New audio connection invalid arguments (path=%s fd=%d, codec=%d)", path, fd, codec);
pa_assert_se(r = dbus_message_new_error(m, "org.ofono.Error.InvalidArguments", "Invalid arguments in method call"));
shutdown(fd, SHUT_RDWR);
close(fd);
return r;
}
-#ifdef __TIZEN__
- card->connecting = false;
-#endif
pa_log_debug("New audio connection on card %s (fd=%d, codec=%d)", path, fd, codec);
break;
}
-<<<<<<< HEAD
-#ifdef __TIZEN_BT__
- case DBUS_TYPE_UINT16: {
- dbus_uint16_t value;
- dbus_message_iter_get_basic(&variant_i, &value);
-
- if (pa_streq(key, "Delay"))
- pa_bluetooth_transport_set_delay(t, value * 100); /* 1/10 ms to 1 us */
-
- break;
- }
-#endif
-=======
case DBUS_TYPE_UINT16: {
uint16_t value;
dbus_message_iter_get_basic(&variant_i, &value);
+#ifdef __TIZEN_BT__
+ if (pa_streq(key, "Delay"))
+ pa_bluetooth_transport_set_delay(t, value * 100); /* 1/10 ms to 1 us */
+ else if (pa_streq(key, "Volume")) {
+#else
if (pa_streq(key, "Volume")) {
+#endif
pa_volume_t volume = a2dp_gain_to_volume(value);
pa_bluetooth_transport_remote_volume_changed(t, volume);
}
break;
}
->>>>>>> upstream/15.0
}
return;
pa_log_debug("dbus: path=%s, interface=%s, member=%s", path, interface, member);
-<<<<<<< HEAD
-#ifdef __TIZEN_BT__
- pa_assert_se(path);
-#endif
-
- if (!a2dp_endpoint_to_a2dp_codec(path))
-=======
if (!a2dp_sep_to_a2dp_endpoint_conf(path))
->>>>>>> upstream/15.0
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) {
#define PA_BLUETOOTH_UUID_HFP_HF "0000111e-0000-1000-8000-00805f9b34fb"
#define PA_BLUETOOTH_UUID_HFP_AG "0000111f-0000-1000-8000-00805f9b34fb"
-<<<<<<< HEAD
+#define A2DP_MAX_GAIN 127
+#define HSP_MAX_GAIN 15
+
#ifdef __TIZEN_BT__
#ifdef pa_log_debug
#undef pa_log_debug
#define pa_log_debug(...) pa_log_level_meta(PA_LOG_INFO, __FILE__, __LINE__, __func__, __VA_ARGS__)
#endif
#endif
-=======
-#define A2DP_MAX_GAIN 127
-#define HSP_MAX_GAIN 15
->>>>>>> upstream/15.0
typedef struct pa_bluetooth_transport pa_bluetooth_transport;
typedef struct pa_bluetooth_device pa_bluetooth_device;
typedef struct pa_bluetooth_backend pa_bluetooth_backend;
typedef enum pa_bluetooth_hook {
-<<<<<<< HEAD
PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED, /* Call data: pa_bluetooth_device */
PA_BLUETOOTH_HOOK_DEVICE_UNLINK, /* Call data: pa_bluetooth_device */
PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED, /* Call data: pa_bluetooth_transport */
+ PA_BLUETOOTH_HOOK_TRANSPORT_SOURCE_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
+ PA_BLUETOOTH_HOOK_TRANSPORT_SINK_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
#ifdef __TIZEN_BT__
PA_BLUETOOTH_HOOK_TRANSPORT_DELAY_CHANGED, /* Call data: pa_bluetooth_transport */
PA_BLUETOOTH_HOOK_SCO_STATE_CHANGED, /* Call data: pa_bluetooth_transport */
#endif
- PA_BLUETOOTH_HOOK_TRANSPORT_MICROPHONE_GAIN_CHANGED, /* Call data: pa_bluetooth_transport */
- PA_BLUETOOTH_HOOK_TRANSPORT_SPEAKER_GAIN_CHANGED, /* Call data: pa_bluetooth_transport */
-=======
- PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED, /* Call data: pa_bluetooth_device */
- PA_BLUETOOTH_HOOK_DEVICE_UNLINK, /* Call data: pa_bluetooth_device */
- PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED, /* Call data: pa_bluetooth_transport */
- PA_BLUETOOTH_HOOK_TRANSPORT_SOURCE_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
- PA_BLUETOOTH_HOOK_TRANSPORT_SINK_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
->>>>>>> upstream/15.0
PA_BLUETOOTH_HOOK_MAX
} pa_bluetooth_hook_t;
int stream_write_type;
size_t last_read_size;
-<<<<<<< HEAD
- uint16_t microphone_gain;
- uint16_t speaker_gain;
#ifdef __TIZEN_BT__
int64_t delay;
#endif
-=======
+
pa_volume_t source_volume;
pa_volume_t sink_volume;
->>>>>>> upstream/15.0
pa_bluetooth_transport_state_t state;
void pa_bluetooth_transport_load_a2dp_sink_volume(pa_bluetooth_transport *t);
bool pa_bluetooth_device_any_transport_connected(const pa_bluetooth_device *d);
-<<<<<<< HEAD
#ifdef __TIZEN_BT__
bool pa_bluetooth_device_sink_transport_connected(const pa_bluetooth_device *d);
bool pa_bluetooth_device_source_transport_connected(const pa_bluetooth_device *d);
void pa_bluetooth_transport_set_delay(pa_bluetooth_transport *t, int64_t delay);
#endif
-=======
bool pa_bluetooth_device_switch_codec(pa_bluetooth_device *device, pa_bluetooth_profile_t profile, pa_hashmap *capabilities_hashmap, const pa_a2dp_endpoint_conf *endpoint_conf, void (*codec_switch_cb)(bool, pa_bluetooth_profile_t profile, void *), void *userdata);
->>>>>>> upstream/15.0
pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_path(pa_bluetooth_discovery *y, const char *path);
pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_address(pa_bluetooth_discovery *y, const char *remote, const char *local);
role = "media";
#else
role = "music";
-<<<<<<< HEAD
#endif
- else if (u->enable_ag && pa_streq(s, "headset_audio_gateway"))
-=======
else if (u->enable_ag && (pa_streq(s, "headset_audio_gateway") || pa_streq(s, "handsfree_audio_gateway")))
->>>>>>> upstream/15.0
role = "phone";
else {
pa_log_debug("Profile %s cannot be selected for loopback", s);
static const char* const valid_modargs[] = {
"path",
"autodetect_mtu",
-<<<<<<< HEAD
+ "output_rate_refresh_interval_ms",
+ "avrcp_absolute_volume",
#ifdef __TIZEN_BT__
"address",
"profile",
#endif
-=======
- "output_rate_refresh_interval_ms",
- "avrcp_absolute_volume",
->>>>>>> upstream/15.0
NULL
};
pa_hook_slot *device_connection_changed_slot;
pa_hook_slot *transport_state_changed_slot;
-<<<<<<< HEAD
-#ifdef __TIZEN_BT__
- pa_hook_slot *transport_delay_changed_slot;
- pa_hook_slot *sco_state_changed_slot;
-#endif
- pa_hook_slot *transport_speaker_gain_changed_slot;
- pa_hook_slot *transport_microphone_gain_changed_slot;
-=======
pa_hook_slot *transport_sink_volume_changed_slot;
pa_hook_slot *transport_source_volume_changed_slot;
pa_hook_slot *sink_volume_changed_slot;
pa_hook_slot *source_volume_changed_slot;
->>>>>>> upstream/15.0
+
+#ifdef __TIZEN_BT__
+ pa_hook_slot *transport_delay_changed_slot;
+ pa_hook_slot *sco_state_changed_slot;
+#endif
pa_bluetooth_discovery *discovery;
pa_bluetooth_device *device;
static void transport_config_mtu(struct userdata *u) {
pa_assert(u->bt_codec);
-<<<<<<< HEAD
- if (!pa_frame_aligned(u->read_block_size, &u->source->sample_spec)) {
-#ifdef __TIZEN__
- pa_log_debug("Got invalid read MTU: %zu, rounding down", u->read_block_size);
-#else
- pa_log_debug("Got invalid read MTU: %lu, rounding down", u->read_block_size);
-#endif
- u->read_block_size = pa_frame_align(u->read_block_size, &u->source->sample_spec);
- }
-=======
if (u->encoder_info) {
u->write_block_size = u->bt_codec->get_write_block_size(u->encoder_info, u->write_link_mtu);
->>>>>>> upstream/15.0
if (!pa_frame_aligned(u->write_block_size, &u->sink->sample_spec)) {
#ifdef __TIZEN__
u->read_block_size = u->bt_codec->get_read_block_size(u->decoder_info, u->read_link_mtu);
if (!pa_frame_aligned(u->read_block_size, &u->source->sample_spec)) {
+#ifdef __TIZEN__
+ pa_log_debug("Got invalid read MTU: %zu, rounding down", u->read_block_size);
+#else
pa_log_debug("Got invalid read MTU: %lu, rounding down", u->read_block_size);
+#endif
u->read_block_size = pa_frame_align(u->read_block_size, &u->source->sample_spec);
}
}
u->sink->parent.process_msg = sink_process_msg;
u->sink->set_state_in_io_thread = sink_set_state_in_io_thread_cb;
-<<<<<<< HEAD
- if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT || u->profile == PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY) {
- pa_sink_set_set_volume_callback(u->sink, sink_set_volume_cb);
- u->sink->n_volume_steps = 16;
- }
+ sink_setup_volume_callback(u->sink);
+
#ifdef __TIZEN__
pa_device_port_set_latency_offset(u->sink->active_port, u->transport->delay);
pa_log_info("transport[%s], sink[%s], delay[%" PRIu64 "us]", u->transport->path, u->sink->name, u->transport->delay);
#endif
-=======
- sink_setup_volume_callback(u->sink);
->>>>>>> upstream/15.0
return 0;
}
if (!module_loaded && pa_bluetooth_device_any_transport_connected(d)) {
/* a new device has been connected */
pa_module *m;
-<<<<<<< HEAD
#ifdef __TIZEN_BT__
const char *profile = NULL;
char *args = NULL;
-=======
- char *args = pa_sprintf_malloc("path=%s autodetect_mtu=%i output_rate_refresh_interval_ms=%u"
- " avrcp_absolute_volume=%i",
- d->path,
- (int)u->autodetect_mtu,
- u->output_rate_refresh_interval_ms,
- (int)u->avrcp_absolute_volume);
->>>>>>> upstream/15.0
if (pa_bluetooth_device_sink_transport_connected(d))
profile = "a2dp_sink";
args = pa_sprintf_malloc("address=\"%s\" path=\"%s\" autodetect_mtu=%i profile=\"%s\"",
d->address, d->path, (int)u->autodetect_mtu, pa_strnull(profile));
#else
- char *args = pa_sprintf_malloc("path=%s autodetect_mtu=%i", d->path, (int)u->autodetect_mtu);
+ char *args = pa_sprintf_malloc("path=%s autodetect_mtu=%i output_rate_refresh_interval_ms=%u"
+ " avrcp_absolute_volume=%i",
+ d->path,
+ (int)u->autodetect_mtu,
+ u->output_rate_refresh_interval_ms,
+ (int)u->avrcp_absolute_volume);
#endif
pa_log_debug("Loading module-bluez5-device %s", args);
pa_module_load(&m, u->module->core, "module-bluez5-device", args);
[ 'module-suspend-on-idle', 'module-suspend-on-idle.c' ],
[ 'module-switch-on-connect', 'module-switch-on-connect.c' ],
[ 'module-switch-on-port-available', 'module-switch-on-port-available.c' ],
-<<<<<<< HEAD
- [ 'module-tunnel-sink', 'module-tunnel.c', [], [], [x11_dep] ],
- [ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c', [], [], [vconf_dep] ],
-=======
[ 'module-tunnel-sink', 'module-tunnel.c', [], ['-DTUNNEL_SINK=1'], [x11_dep] ],
- [ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c' ],
->>>>>>> upstream/15.0
+ [ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c', [], [], [vconf_dep] ],
[ 'module-tunnel-source', 'module-tunnel.c', [], [], [x11_dep] ],
[ 'module-tunnel-source-new', 'module-tunnel-source-new.c', [], [], [vconf_dep] ],
[ 'module-virtual-sink', 'module-virtual-sink.c' ],
if (!u->restore_bluetooth_profile) {
const char *s = pa_proplist_gets(card->proplist, PA_PROP_DEVICE_BUS);
if (pa_safe_streq(s, "bluetooth"))
-<<<<<<< HEAD
-#ifdef __TIZEN__
- {
- entry_free(e);
- return PA_HOOK_OK;
- }
-#else
- return PA_HOOK_OK;
-#endif
-=======
goto finish;
->>>>>>> upstream/15.0
}
card->profile_is_sticky = e->profile_is_sticky;
/* Drop or insert samples if fast_adjust_threshold_msec was specified and the latency difference is too large. */
if (u->fast_adjust_threshold > 0 && abs(latency_difference) > u->fast_adjust_threshold) {
-<<<<<<< HEAD
-#ifdef __TIZEN__
- pa_log_debug ("Latency difference larger than %llu msec, skipping or inserting samples.", u->fast_adjust_threshold / PA_USEC_PER_MSEC);
-#else
- pa_log_debug ("Latency difference larger than %lu msec, skipping or inserting samples.", u->fast_adjust_threshold / PA_USEC_PER_MSEC);
-#endif
-=======
pa_log_debug ("Latency difference larger than %" PRIu64 " msec, skipping or inserting samples.", u->fast_adjust_threshold / PA_USEC_PER_MSEC);
->>>>>>> upstream/15.0
pa_asyncmsgq_send(u->sink_input->sink->asyncmsgq, PA_MSGOBJECT(u->sink_input), SINK_INPUT_MESSAGE_FAST_ADJUST, NULL, current_source_sink_latency, NULL);
if (current_memblockq_length > requested_memblockq_length) {
/* Drop audio from queue */
buffer_correction = current_memblockq_length - requested_memblockq_length;
-<<<<<<< HEAD
-#ifdef __TIZEN__
- pa_log_info("Dropping %llu usec of audio from queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
-#else
- pa_log_info("Dropping %lu usec of audio from queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
-#endif
-=======
pa_log_info("Dropping %" PRIu64 " usec of audio from queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
->>>>>>> upstream/15.0
pa_memblockq_drop(u->memblockq, buffer_correction);
} else if (current_memblockq_length < requested_memblockq_length && allow_push) {
/* Add silence to queue */
buffer_correction = requested_memblockq_length - current_memblockq_length;
-<<<<<<< HEAD
-#ifdef __TIZEN__
- pa_log_info("Adding %llu usec of silence to queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
-#else
- pa_log_info("Adding %lu usec of silence to queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
-#endif
-=======
pa_log_info("Adding %" PRIu64 " usec of silence to queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
->>>>>>> upstream/15.0
pa_memblockq_seek(u->memblockq, (int64_t)buffer_correction, PA_SEEK_RELATIVE, true);
}
}
if (!format) {
pa_log(_("Failed to set format: invalid format string %s"), f);
-<<<<<<< HEAD
-#ifdef __TIZEN__
- pa_xfree(f);
-#endif
-=======
pa_xfree(f);
->>>>>>> upstream/15.0
goto fail;
}
pa_xfree(f);
pa_idxset_put(u->formats, format, NULL);
-#ifdef __TIZEN__
- pa_xfree(f);
-#endif
}
} else {
format = pa_format_info_new();
stream_changed_buffer_attr_cb(stream, userdata);
}
-<<<<<<< HEAD
+/* called when the server experiences an underrun of our buffer */
+static void stream_underflow_callback(pa_stream *stream, void *userdata) {
+ pa_log_info("Server signalled buffer underrun.");
+}
+
+/* called when the server experiences an overrun of our buffer */
+static void stream_overflow_callback(pa_stream *stream, void *userdata) {
+ pa_log_info("Server signalled buffer overrun.");
+}
+
#ifdef __TIZEN__
static void stream_event_cb(pa_stream *stream, const char *name, pa_proplist *pl, void *userdata) {
char *t;
pa_xfree(t);
}
#endif
-=======
-/* called when the server experiences an underrun of our buffer */
-static void stream_underflow_callback(pa_stream *stream, void *userdata) {
- pa_log_info("Server signalled buffer underrun.");
-}
-
-/* called when the server experiences an overrun of our buffer */
-static void stream_overflow_callback(pa_stream *stream, void *userdata) {
- pa_log_info("Server signalled buffer overrun.");
-}
->>>>>>> upstream/15.0
static void context_state_cb(pa_context *c, void *userdata) {
struct userdata *u = userdata;
pa_stream_set_state_callback(u->stream, stream_state_cb, userdata);
pa_stream_set_buffer_attr_callback(u->stream, stream_changed_buffer_attr_cb, userdata);
-<<<<<<< HEAD
+ pa_stream_set_underflow_callback(u->stream, stream_underflow_callback, userdata);
+ pa_stream_set_overflow_callback(u->stream, stream_overflow_callback, userdata);
#ifdef __TIZEN__
pa_stream_set_event_callback(u->stream, stream_event_cb, userdata);
#endif
-
-=======
- pa_stream_set_underflow_callback(u->stream, stream_underflow_callback, userdata);
- pa_stream_set_overflow_callback(u->stream, stream_overflow_callback, userdata);
->>>>>>> upstream/15.0
if (pa_stream_connect_playback(u->stream,
u->remote_sink_name,
&bufferattr,
payload = packet[1] ^ 0x80;
switch (payload) {
case PAYLOAD_TIMING_REQUEST:
-<<<<<<< HEAD
-#ifdef __TIZEN__
- pa_log_debug("Sending timing packet at %llu", rci);
-#else
- pa_log_debug("Sending timing packet at %lu", rci);
-#endif
-=======
pa_log_debug("Sending timing packet at %" PRIu64 , rci);
->>>>>>> upstream/15.0
written = send_udp_timing_packet(c, data, rci);
break;
case PAYLOAD_TIMING_REPLY:
/** \endcond */
#endif
-<<<<<<< HEAD
#ifdef TIZEN_VOLUME_RAMP
/** \cond fulldocs */
#define PA_VOLUMER_RAMP_TYPE_LINEAR PA_VOLUMER_RAMP_TYPE_LINEAR
#define PA_VOLUMER_RAMP_TYPE_CUBIC PA_VOLUMER_RAMP_TYPE_CUBIC
/** \endcond */
#endif
-=======
/** Port type. New types can be added in the future, so applications should
* gracefully handle situations where a type identifier doesn't match any item
* in this enumeration. \since 14.0 */
PA_DEVICE_PORT_TYPE_ANALOG = 22,
} pa_device_port_type_t;
->>>>>>> upstream/15.0
PA_C_DECL_END
#endif
return o;
}
-<<<<<<< HEAD
-#ifdef TIZEN_PCM_DUMP
-pa_operation* pa_context_set_pcm_dump(pa_context *c, uint32_t dump_type, int dump_type_enable, pa_context_success_cb_t cb, void *userdata) {
-=======
/** Object response string processing **/
static void context_string_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
}
pa_operation* pa_context_send_message_to_object(pa_context *c, const char *object_path, const char *message, const char *message_parameters, pa_context_string_cb_t cb, void *userdata) {
->>>>>>> upstream/15.0
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
-<<<<<<< HEAD
-
- o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
-
- t = pa_tagstruct_command(c, PA_COMMAND_SET_PCM_DUMP, &tag);
- pa_tagstruct_putu32(t, dump_type);
- pa_tagstruct_put_boolean(t, dump_type_enable);
- pa_pstream_send_tagstruct(c->pstream, t);
- pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
-
- return o;
-}
-#endif
-=======
PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 35, PA_ERR_NOTSUPPORTED);
o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
return o;
}
->>>>>>> upstream/15.0
+
+#ifdef TIZEN_PCM_DUMP
+pa_operation* pa_context_set_pcm_dump(pa_context *c, uint32_t dump_type, int dump_type_enable, pa_context_success_cb_t cb, void *userdata) {
+ pa_operation *o;
+ pa_tagstruct *t;
+ uint32_t tag;
+
+ pa_assert(c);
+ pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+ PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
+ PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
+
+ o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
+
+ t = pa_tagstruct_command(c, PA_COMMAND_SET_PCM_DUMP, &tag);
+ pa_tagstruct_putu32(t, dump_type);
+ pa_tagstruct_put_boolean(t, dump_type_enable);
+ pa_pstream_send_tagstruct(c->pstream, t);
+ pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, pa_operation_ref(o), (pa_free_cb_t) pa_operation_unref);
+
+ return o;
+}
+#endif
pa_context_set_default_source;
pa_context_set_event_callback;
pa_context_set_name;
-<<<<<<< HEAD:src/map-file
pa_context_set_pcm_dump;
-=======
pa_context_set_port_latency_offset;
->>>>>>> upstream/15.0:src/pulse/map-file
pa_context_set_sink_input_mute;
pa_context_set_sink_input_volume;
pa_context_set_sink_mute_by_index;
pa_check_signal_is_blocked(SIGPIPE);
#endif
-<<<<<<< HEAD
- pa_core_check_idle(c);
-
- c->state = PA_CORE_RUNNING;
#ifdef TIZEN_PCM_DUMP
c->pcm_dump = 0;
#endif
c->empty_pop_threshold = 10;
#endif
-=======
->>>>>>> upstream/15.0
return c;
}
pa_sink_input_dump_info(si);
pa_log_warn("<< Dump finished!");
}
-#endif
\ No newline at end of file
+#endif
* provided buffer. The same buffer is the return value of this function. */
const char *pa_suspend_cause_to_string(pa_suspend_cause_t cause, char buf[PA_SUSPEND_CAUSE_TO_STRING_BUF_SIZE]);
-<<<<<<< HEAD
-#ifdef __TIZEN__
-void pa_core_dump_sink_inputs(pa_core *core);
-#endif
-=======
void pa_core_move_streams_to_newly_available_preferred_sink(pa_core *c, pa_sink *s);
void pa_core_move_streams_to_newly_available_preferred_source(pa_core *c, pa_source *s);
->>>>>>> upstream/15.0
+
+#ifdef __TIZEN__
+void pa_core_dump_sink_inputs(pa_core *core);
+#endif
#endif
install_rpath : privlibdir,
install_dir : privlibdir,
link_with : libpulsecore_simd_lib,
-<<<<<<< HEAD
- dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep, cynara_client_dep, cynara_creds_socket_dep, cynara_session_dep],
-=======
- dependencies : [libm_dep, libpulsecommon_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep, libintl_dep, platform_dep, platform_socket_dep,],
->>>>>>> upstream/15.0
+ dependencies : [libm_dep, libpulsecommon_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep, libintl_dep, platform_dep, platform_socket_dep, cynara_client_dep, cynara_creds_socket_dep, cynara_session_dep],
implicit_include_directories : false)
libpulsecore_dep = declare_dependency(link_with: libpulsecore)
}
void pa_mutex_unlock(pa_mutex *m) {
-<<<<<<< HEAD
-#ifdef __TIZEN__
- int ret;
-#endif
- pa_assert(m);
-
-#ifdef __TIZEN__
- ret = pthread_mutex_unlock(&m->mutex);
- if (ret != 0)
- pa_log_error("pthread_mutex_unlock [%p] error [%d], (%d/%d)", &m->mutex, ret, m->lock, m->unlock);
- pa_assert_se(ret == 0);
- m->unlock++;
-#else
- pa_assert_se(pthread_mutex_unlock(&m->mutex) == 0);
-#endif
-=======
int err;
pa_assert(m);
if ((err = pthread_mutex_unlock(&m->mutex)) != 0) {
+#ifdef __TIZEN__
+ pa_log_error("pthread_mutex_unlock [%p] error [%d], (%d/%d)", &m->mutex, err, m->lock, m->unlock);
+#else
pa_log("pthread_mutex_unlock() failed: %s", pa_cstrerror(err));
+#endif
pa_assert_not_reached();
}
->>>>>>> upstream/15.0
+#ifdef __TIZEN__
+ m->unlock++;
+#endif
}
pa_cond *pa_cond_new(void) {
* BOTH DIRECTIONS */
PA_COMMAND_REGISTER_MEMFD_SHMID,
-<<<<<<< HEAD
+ /* Supported since protocol v34 (14.0) */
+ PA_COMMAND_SEND_OBJECT_MESSAGE,
+
#ifdef __TIZEN__
PA_COMMAND_SET_PCM_DUMP,
PA_COMMAND_SET_PCM_DUMP_OPTION,
PA_COMMAND_CHECK_PRIVILEGE,
#endif
-=======
- /* Supported since protocol v34 (14.0) */
- PA_COMMAND_SEND_OBJECT_MESSAGE,
->>>>>>> upstream/15.0
PA_COMMAND_MAX
};
pa_memblockq_drop(u->memblockq, chunk->length);
#ifdef __TIZEN__
if (pa_memblockq_peek(u->memblockq, chunk) < 0) {
- pa_log_error("failed to peek data. empty %d, blocks %u, write index %llu, read index %llu",
+ pa_log_error("failed to peek data. empty %d, blocks %u, write index %" PRId64 ", read index %" PRId64 "",
pa_memblockq_is_empty(u->memblockq),
pa_memblockq_get_nblocks(u->memblockq),
pa_memblockq_get_write_index(u->memblockq),
[PA_COMMAND_REGISTER_MEMFD_SHMID] = command_register_memfd_shmid,
-<<<<<<< HEAD
+ [PA_COMMAND_SEND_OBJECT_MESSAGE] = command_send_object_message,
+
[PA_COMMAND_EXTENSION] = command_extension,
#ifdef TIZEN_PCM_DUMP
[PA_COMMAND_SET_PCM_DUMP] = command_set_pcm_dump,
#ifdef TIZEN_SECURITY
[PA_COMMAND_CHECK_PRIVILEGE] = command_check_privilege,
#endif
-
-=======
- [PA_COMMAND_SEND_OBJECT_MESSAGE] = command_send_object_message,
-
- [PA_COMMAND_EXTENSION] = command_extension
->>>>>>> upstream/15.0
};
/*** pstream callbacks ***/
if (i->volume_factor_sink_items)
pa_hashmap_free(i->volume_factor_sink_items);
-<<<<<<< HEAD
+ if (i->preferred_sink)
+ pa_xfree(i->preferred_sink);
+
#ifdef TIZEN_VOLUME_RAMP
if (i->ramp_factor_items)
pa_hashmap_free(i->ramp_factor_items);
#endif
-=======
- if (i->preferred_sink)
- pa_xfree(i->preferred_sink);
->>>>>>> upstream/15.0
pa_xfree(i->driver);
pa_xfree(i);
}
pa_cvolume_snprint_verbose(new_ratio_str, sizeof(new_ratio_str), ratio, &i->channel_map, true));
}
-<<<<<<< HEAD
-#ifdef __TIZEN__
-void pa_sink_input_dump_info(pa_sink_input *i) {
- pa_assert(i);
-
- pa_log_warn("#%4u: client(%5d), sink(%2u), state(%d), muted(%d), app(pid:%s, org:%s, binary:%s), media(name:%s, role:%s)",
- i->index,
- i->client ? (int)i->client->index : -1,
- i->sink->index, i->state, i->muted,
- pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_PROCESS_ID),
- pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_PROCESS_ID_ORIGIN),
- pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_PROCESS_BINARY),
- pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME),
- pa_proplist_gets(i->proplist, PA_PROP_MEDIA_ROLE));
-}
-#endif
-=======
/* Called from the main thread.
*
* This is called when e.g. module-stream-restore wants to change the preferred
pa_sink_input_move_to(i, i->core->default_sink, false);
}
}
->>>>>>> upstream/15.0
+
+#ifdef __TIZEN__
+void pa_sink_input_dump_info(pa_sink_input *i) {
+ pa_assert(i);
+
+ pa_log_warn("#%4u: client(%5d), sink(%2u), state(%d), muted(%d), app(pid:%s, org:%s, binary:%s), media(name:%s, role:%s)",
+ i->index,
+ i->client ? (int)i->client->index : -1,
+ i->sink->index, i->state, i->muted,
+ pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_PROCESS_ID),
+ pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_PROCESS_ID_ORIGIN),
+ pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_PROCESS_BINARY),
+ pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME),
+ pa_proplist_gets(i->proplist, PA_PROP_MEDIA_ROLE));
+}
+#endif
* i->reference_ratio and logs a message if the value changes. */
void pa_sink_input_set_reference_ratio(pa_sink_input *i, const pa_cvolume *ratio);
-<<<<<<< HEAD
+void pa_sink_input_set_preferred_sink(pa_sink_input *i, pa_sink *s);
+
#ifdef __TIZEN__
void pa_sink_input_update_empty_pop(pa_sink_input *i, size_t length, bool *is_timeout);
void pa_sink_input_dump_info(pa_sink_input *i);
#endif
-=======
-void pa_sink_input_set_preferred_sink(pa_sink_input *i, pa_sink *s);
->>>>>>> upstream/15.0
#define pa_sink_input_assert_io_context(s) \
pa_assert(pa_thread_mq_get() || !PA_SINK_INPUT_IS_LINKED((s)->state))
else
s->alternate_sample_rate = s->core->alternate_sample_rate;
-<<<<<<< HEAD
- s->avoid_resampling = data->avoid_resampling;
+ if (data->avoid_resampling_is_set)
+ s->avoid_resampling = data->avoid_resampling;
+ else
+ s->avoid_resampling = s->core->avoid_resampling;
#ifdef __TIZEN__
s->origin_avoid_resampling = data->avoid_resampling;
s->selected_sample_format = s->sample_spec.format;
s->selected_sample_rate = s->sample_spec.rate;
#endif
-=======
- if (data->avoid_resampling_is_set)
- s->avoid_resampling = data->avoid_resampling;
- else
- s->avoid_resampling = s->core->avoid_resampling;
->>>>>>> upstream/15.0
s->inputs = pa_idxset_new(NULL, NULL);
s->n_corked = 0;