Initial conflict resolving 67/268567/4
authorSeungbae Shin <seungbae.shin@samsung.com>
Mon, 27 Dec 2021 05:24:16 +0000 (14:24 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 30 Dec 2021 07:33:41 +0000 (07:33 +0000)
Change-Id: Ia4f9d69834edafb1f11d0fd8385aed14b3894459

29 files changed:
meson.build
meson_options.txt
src/daemon/main.c
src/meson.build
src/modules/bluetooth/backend-ofono.c
src/modules/bluetooth/bluez5-util.c
src/modules/bluetooth/bluez5-util.h
src/modules/bluetooth/module-bluetooth-policy.c
src/modules/bluetooth/module-bluez5-device.c
src/modules/bluetooth/module-bluez5-discover.c
src/modules/meson.build
src/modules/module-card-restore.c
src/modules/module-loopback.c
src/modules/module-null-sink.c
src/modules/module-tunnel-sink-new.c
src/modules/raop/raop-client.c
src/pulse/def.h
src/pulse/introspect.c
src/pulse/map-file
src/pulsecore/core.c
src/pulsecore/core.h
src/pulsecore/meson.build
src/pulsecore/mutex-posix.c
src/pulsecore/native-common.h
src/pulsecore/play-memblockq.c
src/pulsecore/protocol-native.c
src/pulsecore/sink-input.c
src/pulsecore/sink-input.h
src/pulsecore/sink.c

index 2155131..b26d00e 100644 (file)
@@ -768,14 +768,7 @@ if x11_dep.found()
 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)
index a2d9fe6..dd5384e 100644 (file)
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
 option('dlog',
        type : 'boolean', value : true,
        description : 'dlog')
@@ -44,14 +43,12 @@ option('hal-datadir',
 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')
index 158319e..34d8f83 100644 (file)
@@ -480,7 +480,6 @@ fail:
 }
 #endif
 
-<<<<<<< HEAD
 #ifdef TIZEN_PA_READY
 static int create_ready_file(const char *path) {
     int ready_fd = -1;
@@ -512,7 +511,6 @@ static void notify_daemon_ready(void) {
 }
 #endif /* TIZEN_PA_READY */
 
-=======
 #ifdef OS_IS_WIN32
 #define SVC_NAME "PulseAudio"
 static bool is_svc = true;
@@ -550,7 +548,6 @@ int main(int p_argc, char *p_argv[]) {
 
 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;
@@ -1266,16 +1263,13 @@ int main(int argc, char *argv[]) {
 #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);
 
index 0cc5fbe..895a24f 100644 (file)
@@ -198,13 +198,9 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
   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)
 
index 671f913..85dec44 100644 (file)
@@ -695,24 +695,13 @@ static DBusMessage *hf_audio_agent_new_connection(DBusConnection *c, DBusMessage
 
     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);
 
index 1cf4f4f..1f4906a 100644 (file)
@@ -965,31 +965,23 @@ static void parse_transport_property(pa_bluetooth_transport *t, DBusMessageIter
 
             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;
@@ -2448,15 +2440,7 @@ static DBusHandlerResult endpoint_handler(DBusConnection *c, DBusMessage *m, voi
 
     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")) {
index dafefbf..6d8ac82 100644 (file)
 #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;
@@ -71,23 +69,15 @@ typedef struct pa_bluetooth_discovery pa_bluetooth_discovery;
 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;
 
@@ -129,16 +119,12 @@ struct pa_bluetooth_transport {
     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;
 
@@ -225,15 +211,12 @@ void pa_bluetooth_transport_free(pa_bluetooth_transport *t);
 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);
index ec3d623..2585413 100644 (file)
@@ -89,12 +89,8 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
         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);
index c44b74f..f205acd 100644 (file)
@@ -78,15 +78,12 @@ PA_MODULE_USAGE(
 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
 };
 
@@ -118,20 +115,16 @@ struct userdata {
 
     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;
@@ -683,19 +676,8 @@ static void handle_sink_block_size_change(struct userdata *u) {
 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__
@@ -711,7 +693,11 @@ static void transport_config_mtu(struct userdata *u) {
         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);
         }
     }
@@ -1284,19 +1270,13 @@ static int add_sink(struct userdata *u) {
     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;
 }
 
index 97cc287..a08622d 100644 (file)
@@ -104,18 +104,9 @@ static pa_hook_result_t device_connection_changed_cb(pa_bluetooth_discovery *y,
     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";
@@ -125,7 +116,12 @@ static pa_hook_result_t device_connection_changed_cb(pa_bluetooth_discovery *y,
         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);
index c9758e2..b213f70 100644 (file)
@@ -54,13 +54,8 @@ all_modules = [
   [ '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' ],
index 5997832..08f8333 100644 (file)
@@ -578,18 +578,7 @@ static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_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;
index e28d3f2..48690b3 100644 (file)
@@ -405,15 +405,7 @@ static void adjust_rates(struct userdata *u) {
 
     /* 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);
 
@@ -565,29 +557,13 @@ static void memblockq_adjust(struct userdata *u, int64_t latency_offset_usec, bo
     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);
     }
 }
index 368cb1b..7cb52cb 100644 (file)
@@ -348,21 +348,12 @@ int pa__init(pa_module*m) {
 
             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();
index 15d0515..cec0c47 100644 (file)
@@ -310,7 +310,16 @@ static void stream_set_buffer_attr_cb(pa_stream *stream, int success, void *user
     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;
@@ -332,17 +341,6 @@ static void stream_event_cb(pa_stream *stream, const char *name, pa_proplist *pl
     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;
@@ -394,15 +392,11 @@ static void context_state_cb(pa_context *c, void *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,
index a4d4a89..3bd7490 100644 (file)
@@ -673,15 +673,7 @@ static size_t handle_udp_timing_packet(pa_raop_client *c, const uint8_t packet[]
     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:
index 0a0f32a..2c29b5b 100644 (file)
@@ -1075,7 +1075,6 @@ typedef enum pa_port_available {
 /** \endcond */
 #endif
 
-<<<<<<< HEAD
 #ifdef TIZEN_VOLUME_RAMP
 /** \cond fulldocs */
 #define PA_VOLUMER_RAMP_TYPE_LINEAR PA_VOLUMER_RAMP_TYPE_LINEAR
@@ -1083,7 +1082,6 @@ typedef enum pa_port_available {
 #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 */
@@ -1113,7 +1111,6 @@ typedef enum pa_device_port_type {
     PA_DEVICE_PORT_TYPE_ANALOG = 22,
 } pa_device_port_type_t;
 
->>>>>>> upstream/15.0
 PA_C_DECL_END
 
 #endif
index babf73c..5e71565 100644 (file)
@@ -2206,10 +2206,6 @@ pa_operation* pa_context_suspend_source_by_index(pa_context *c, uint32_t idx, in
     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) {
@@ -2257,7 +2253,6 @@ finish:
 }
 
 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;
@@ -2267,20 +2262,6 @@ pa_operation* pa_context_send_message_to_object(pa_context *c, const char *objec
 
     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);
@@ -2296,4 +2277,27 @@ pa_operation* pa_context_send_message_to_object(pa_context *c, const char *objec
 
     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
index 9abd9df..186628a 100644 (file)
@@ -93,11 +93,8 @@ pa_context_set_default_sink;
 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;
index 1c07896..35c3216 100644 (file)
@@ -201,10 +201,6 @@ pa_core* pa_core_new(pa_mainloop_api *m, bool shared, bool enable_memfd, size_t
     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
@@ -212,8 +208,6 @@ pa_core* pa_core_new(pa_mainloop_api *m, bool shared, bool enable_memfd, size_t
     c->empty_pop_threshold = 10;
 #endif
 
-=======
->>>>>>> upstream/15.0
     return c;
 }
 
@@ -698,4 +692,4 @@ void pa_core_dump_sink_inputs(pa_core *core) {
         pa_sink_input_dump_info(si);
     pa_log_warn("<< Dump finished!");
 }
-#endif
\ No newline at end of file
+#endif
index 04c117f..1a2c5eb 100644 (file)
@@ -302,14 +302,12 @@ static const size_t PA_SUSPEND_CAUSE_TO_STRING_BUF_SIZE =
  * 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
index 3c4529d..629f3b0 100644 (file)
@@ -227,11 +227,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
   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)
index fac2d29..865df53 100644 (file)
@@ -142,31 +142,21 @@ bool pa_mutex_try_lock(pa_mutex *m) {
 }
 
 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) {
index f6250db..d2c548c 100644 (file)
@@ -187,16 +187,14 @@ enum {
      * 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
 };
index 78ed3f3..57cf919 100644 (file)
@@ -138,7 +138,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
         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),
index f87525d..4ce4093 100644 (file)
@@ -5271,7 +5271,8 @@ static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
 
     [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,
@@ -5279,12 +5280,6 @@ static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
 #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 ***/
index 6a32dc9..acd39b0 100644 (file)
@@ -964,16 +964,14 @@ static void sink_input_free(pa_object *o) {
     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);
 }
@@ -2909,23 +2907,6 @@ void pa_sink_input_set_reference_ratio(pa_sink_input *i, const pa_cvolume *ratio
                  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
@@ -2952,4 +2933,19 @@ void pa_sink_input_set_preferred_sink(pa_sink_input *i, pa_sink *s) {
         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
index 6a54820..9d8271a 100644 (file)
@@ -506,14 +506,12 @@ void pa_sink_input_set_volume_direct(pa_sink_input *i, const pa_cvolume *volume)
  * 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))
index afabb4b..61b7c8f 100644 (file)
@@ -347,19 +347,15 @@ pa_sink* pa_sink_new(
     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;