Modification for core version upgrade 05/167605/6 accepted/tizen/unified/20180227.062920 submit/tizen/20180226.072000
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 18 Jan 2018 14:36:01 +0000 (23:36 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 22 Feb 2018 04:44:14 +0000 (13:44 +0900)
[Version] 11.1.0
[Issue Type] Core Upgrade

Change-Id: I80c07bc225b5d732900610d5d0e06d036d83c424

12 files changed:
Makefile.am
packaging/pulseaudio-modules-tizen.spec
src/device-manager.c
src/module-hw-keysound.c
src/module-sound-player.c
src/module-tizenaudio-policy.c
src/module-tizenaudio-sink.c
src/module-tizenaudio-source.c
src/stream-manager-filter.c
src/stream-manager-priv.h
src/stream-manager-volume.c
src/tizen-device.c

index f7ce5dc..3022822 100644 (file)
@@ -17,7 +17,7 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-pulsemodlibexecdir= $(libdir)/pulse-5.0/modules
+pulsemodlibexecdir= $(libdir)/pulse-11.1/modules
 pulselibexecdir=$(libexecdir)/pulse
 
 AM_CFLAGS = \
index 15e01ee..7b5c7c2 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.176
+Version:          11.1.0
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
@@ -60,12 +60,12 @@ install -m 0644 %SOURCE1 %{buildroot}%{_tmpfilesdir}/pulseaudio.conf
 %manifest pulseaudio-modules-tizen.manifest
 %defattr(-,root,root,-)
 %license LICENSE.LGPL-2.1+
-%{_libdir}/pulse-5.0/modules/module-*.so
-%{_libdir}/pulse-5.0/modules/libhal-interface.so
-%{_libdir}/pulse-5.0/modules/libcommunicator.so
+%{_libdir}/pulse-11.1/modules/module-*.so
+%{_libdir}/pulse-11.1/modules/libhal-interface.so
+%{_libdir}/pulse-11.1/modules/libcommunicator.so
 %{_tmpfilesdir}/pulseaudio.conf
 %if "%{?TIZEN_PRODUCT_TV}" == "1"
-%{_libdir}/pulse-5.0/modules/module-vconf.so
+%{_libdir}/pulse-11.1/modules/module-vconf.so
 %{_libexecdir}/pulse/vconf-helper
 %endif
 %{_libdir}/ladspa/*.so
index 7194ce1..cd90bf3 100644 (file)
@@ -1036,7 +1036,7 @@ static const char* build_params_to_load_device(const char *device_string, const
         if (params) {
             pa_strbuf_printf(args_buf, "%s", params);
         }
-        pa_strlcpy(args, pa_strbuf_tostring_free(args_buf), DEVICE_PARAM_STRING_MAX);
+        pa_strlcpy(args, pa_strbuf_to_string_free(args_buf), DEVICE_PARAM_STRING_MAX);
     } else {
         return params;
     }
@@ -1494,7 +1494,7 @@ static pa_sink* _device_manager_set_default_sink(pa_device_manager *dm,  const c
         return NULL;
     }
 
-    sink = pa_namereg_set_default_sink(dm->core, sink);
+//    sink = pa_namereg_set_default_sink(dm->core, sink);
     return sink;
 }
 
@@ -1517,7 +1517,7 @@ static pa_source* _device_manager_set_default_source(pa_device_manager *dm,  con
         return NULL;
     }
 
-    source = pa_namereg_set_default_source(dm->core, source);
//   source = pa_namereg_set_default_source(dm->core, source);
     return source;
 }
 
@@ -1867,7 +1867,7 @@ static void unload_device(pa_core *c, bool is_sink, const char *device_string) {
             if (pulse_device_is_monitor(PA_OBJECT(sink)))
                 continue;
             if (pulse_device_same_device_string(PA_OBJECT(sink), device_string))
-                pa_module_unload(c, sink->module, true);
+                pa_module_unload(sink->module, true);
         }
     } else {
         pa_source *source;
@@ -1876,7 +1876,7 @@ static void unload_device(pa_core *c, bool is_sink, const char *device_string) {
             if (pulse_device_is_monitor(PA_OBJECT(source)))
                 continue;
             if (pulse_device_same_device_string(PA_OBJECT(source), device_string))
-                pa_module_unload(c, source->module, true);
+                pa_module_unload(source->module, true);
         }
     }
 }
index eac87c2..4c03fba 100644 (file)
@@ -104,7 +104,7 @@ static void _hw_keysound_play(struct userdata *u, const char *file_path) {
 
     /* Play sample */
     pa_log_debug("pa_scache_play_item() start");
-    ret = pa_scache_play_item(u->module->core, name, pa_namereg_get_default_sink(u->module->core), PA_VOLUME_NORM, p, &stream_idx);
+    ret = pa_scache_play_item(u->module->core, name, pa_namereg_get(u->module->core, NULL, PA_NAMEREG_SINK), PA_VOLUME_NORM, p, &stream_idx);
     if (ret < 0)
         pa_log_error("pa_scache_play_item fail, ret[%d]", ret);
     else
index b879205..7ef1a7e 100644 (file)
@@ -193,7 +193,7 @@ static int _simple_play(struct userdata *u, const char *file_path, const char *r
     if (vol_gain_type)
         pa_proplist_sets(p, PA_PROP_MEDIA_TIZEN_VOLUME_GAIN_TYPE, vol_gain_type);
 
-    sink = pa_namereg_get_default_sink(u->module->core);
+    sink = pa_namereg_get(u->module->core, NULL, PA_NAMEREG_SINK);
 
     pa_log_debug("role[%s], volume_gain_type[%s]", role, vol_gain_type);
     snprintf(name, sizeof(name)-1, "%s_%s", name_prefix, file_path);
@@ -243,7 +243,7 @@ static int _sample_play(struct userdata *u, const char *sample_name, const char
     if (vol_gain_type)
         pa_proplist_sets(p, PA_PROP_MEDIA_TIZEN_VOLUME_GAIN_TYPE, vol_gain_type);
 
-    sink = pa_namereg_get_default_sink(u->module->core);
+    sink = pa_namereg_get(u->module->core, NULL, PA_NAMEREG_SINK);
 
     pa_log_debug("role[%s], volume_gain_type[%s]", role, vol_gain_type);
 
index 118719b..3f9456d 100644 (file)
@@ -472,7 +472,7 @@ static void update_loopback_module(struct userdata *u, bool load) {
                                  u->loopback_args.sink->name, u->loopback_args.source->name,
                                  u->loopback_args.latency_msec, u->loopback_args.adjust_sec);
         if (u->module_loopback)
-            pa_module_unload(u->core, u->module_loopback, true);
+            pa_module_unload(u->module_loopback, true);
 
         u->module_loopback = pa_module_load(u->core, MODULE_LOOPBACK, args);
 
@@ -481,7 +481,7 @@ static void update_loopback_module(struct userdata *u, bool load) {
 
     } else if (!load) {
         if (u->module_loopback) {
-            pa_module_unload(u->core, u->module_loopback, true);
+            pa_module_unload(u->module_loopback, true);
             u->module_loopback = NULL;
             u->loopback_args.sink = NULL;
             u->loopback_args.source = NULL;
@@ -525,7 +525,7 @@ static void unload_combine_sink_module(struct userdata *u, const char *combine_s
             pa_sink_suspend(combine_sink, true, PA_SUSPEND_USER);
         }
         pa_log_info("unload combine sink module[%s]", combine_sink_name);
-        pa_module_unload(u->core, *combine_sink_module, true);
+        pa_module_unload(*combine_sink_module, true);
         *combine_sink_module = NULL;
     } else
         pa_log_warn("module combine sink(%s) has been already unloaded", combine_sink_name);
@@ -1533,10 +1533,10 @@ void pa__done(pa_module *m)
     bt_sco_close(u, false);
 
     if (u->module_null_sink)
-        pa_module_unload(u->core, u->module_null_sink, true);
+        pa_module_unload(u->module_null_sink, true);
 
     if (u->module_null_source)
-        pa_module_unload(u->core, u->module_null_source, true);
+        pa_module_unload(u->module_null_source, true);
 
     if (u->device_manager)
         pa_device_manager_unref(u->device_manager);
index 95b349a..a898a5e 100644 (file)
@@ -418,7 +418,7 @@ static void thread_func(void *userdata) {
         }
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
index 90fc735..f72ec87 100644 (file)
@@ -364,7 +364,7 @@ static void thread_func(void *userdata) {
         }
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
index 1257328..9aeb9cb 100644 (file)
@@ -532,7 +532,7 @@ void deinit_filters(pa_stream_manager *m) {
     /* Unload module-filter-apply */
     PA_IDXSET_FOREACH(i, m->core->modules, idx) {
         if (pa_streq(i->name, MODULE_FILTER_APPLY)) {
-            pa_module_unload(m->core, i, true);
+            pa_module_unload(i, true);
             pa_log("module-filter-apply unloaded");
             break;
         }
index d4b001e..1ab8b0d 100644 (file)
@@ -100,7 +100,7 @@ typedef enum _notify_command_type {
       (type == STREAM_SINK_INPUT ? (focus & STREAM_FOCUS_ACQUIRED_PLAYBACK) : (focus & STREAM_FOCUS_ACQUIRED_CAPTURE))
 
 #define CHECK_STREAM_UNLINKED(stream, type) \
-      (type == STREAM_SINK_INPUT ? ((pa_sink_input*)stream)->unlinked : ((pa_source_output*)stream)->unlinked)
+      (type == STREAM_SINK_INPUT ? ((pa_sink_input*)stream)->state == PA_SINK_INPUT_UNLINKED : ((pa_source_output*)stream)->state == PA_SOURCE_OUTPUT_UNLINKED)
 
 #define CHECK_STREAM_RUNNING(stream, type) \
       (type == STREAM_SINK_INPUT ? ((pa_sink_input*)stream)->state == PA_SINK_INPUT_RUNNING : ((pa_source_output*)stream)->state == PA_SOURCE_OUTPUT_RUNNING)
index dc9e535..a6b6fed 100644 (file)
@@ -510,9 +510,9 @@ int32_t set_volume_level_with_new_data(pa_stream_manager *m, void *stream, strea
         }
         pa_cvolume_set(&cv, GET_STREAM_NEW_SAMPLE_SPEC(stream, stream_type).channels, pa_sw_volume_from_linear(volume_linear));
         if (stream_type == STREAM_SINK_INPUT)
-            pa_sink_input_new_data_set_volume((pa_sink_input_new_data*)stream, &cv, true);
+            pa_sink_input_new_data_set_volume((pa_sink_input_new_data*)stream, &cv);
         else if (stream_type == STREAM_SOURCE_OUTPUT)
-            pa_source_output_new_data_set_volume((pa_source_output_new_data*)stream, &cv, true);
+            pa_source_output_new_data_set_volume((pa_source_output_new_data*)stream, &cv);
     }
     pa_log_debug("stream_type[%d], volume_type[%s], level[%u], value[%f]",
                  stream_type, volume_type_str, volume_level, volume_linear);
index 99defa5..2275440 100644 (file)
@@ -104,7 +104,7 @@ static char* get_playback_list_str(pa_hashmap *playback_devices) {
     PA_HASHMAP_FOREACH_KV(role, sink, playback_devices, state)
         pa_strbuf_printf(buf, "        %-13s -> %s\n", role, sink->name);
 
-    return pa_strbuf_tostring_free(buf);
+    return pa_strbuf_to_string_free(buf);
 }
 
 static char* get_capture_list_str(pa_hashmap *capture_devices) {
@@ -121,7 +121,7 @@ static char* get_capture_list_str(pa_hashmap *capture_devices) {
     PA_HASHMAP_FOREACH_KV(role, source, capture_devices, state)
         pa_strbuf_printf(buf, "        %-13s -> %s\n", role, source->name);
 
-    return pa_strbuf_tostring_free(buf);
+    return pa_strbuf_to_string_free(buf);
 }
 
 static char* _device_get_info_str(pa_tz_device *device) {
@@ -157,7 +157,7 @@ static char* _device_get_info_str(pa_tz_device *device) {
     pa_xfree(playback_str);
     pa_xfree(capture_str);
 
-    return pa_strbuf_tostring_free(buf);
+    return pa_strbuf_to_string_free(buf);
 }