ACLOCAL_AMFLAGS = -I m4
-pulsemodlibexecdir= $(libdir)/pulse-11.1/modules
+pulsemodlibexecdir= $(libdir)/pulse-13.0/modules
pulselibexecdir=$(libexecdir)/pulse
AM_CFLAGS = \
Name: pulseaudio-modules-tizen
Summary: Pulseaudio modules for Tizen
-Version: 11.1.97
+Version: 13.0.1
Release: 0
Group: Multimedia/Audio
License: LGPL-2.1+
%manifest %{name}.manifest
%defattr(-,root,root,-)
%license LICENSE.LGPL-2.1+
-%{_libdir}/pulse-11.1/modules/module-hw-keysound.so
-%{_libdir}/pulse-11.1/modules/module-poweroff.so
-%{_libdir}/pulse-11.1/modules/module-sound-player.so
-%{_libdir}/pulse-11.1/modules/module-tizenaudio-policy.so
-%{_libdir}/pulse-11.1/modules/module-tizenaudio-sink.so
-%{_libdir}/pulse-11.1/modules/module-tizenaudio-source.so
-%{_libdir}/pulse-11.1/modules/libhal-interface.so
-%{_libdir}/pulse-11.1/modules/libcommunicator.so
+%{_libdir}/pulse-13.0/modules/module-hw-keysound.so
+%{_libdir}/pulse-13.0/modules/module-poweroff.so
+%{_libdir}/pulse-13.0/modules/module-sound-player.so
+%{_libdir}/pulse-13.0/modules/module-tizenaudio-policy.so
+%{_libdir}/pulse-13.0/modules/module-tizenaudio-sink.so
+%{_libdir}/pulse-13.0/modules/module-tizenaudio-source.so
+%{_libdir}/pulse-13.0/modules/libhal-interface.so
+%{_libdir}/pulse-13.0/modules/libcommunicator.so
%{_tmpfilesdir}/pulseaudio.conf
%if "%{tizen_profile_name}" == "tv"
-%{_libdir}/pulse-11.1/modules/module-vconf.so
+%{_libdir}/pulse-13.0/modules/module-vconf.so
%{_libexecdir}/pulse/vconf-helper
%endif
%{_libdir}/ladspa/*.so
%manifest %{name}.manifest
%defattr(-,root,root,-)
%license LICENSE.LGPL-2.1+
-%{_libdir}/pulse-11.1/modules/module-acm-sink.so
+%{_libdir}/pulse-13.0/modules/module-acm-sink.so
case PA_SINK_MESSAGE_SET_STATE: {
pa_sink_state_t new_state = PA_PTR_TO_UINT(data);
- if (pa_sink_get_state(u->sink) == PA_SINK_SUSPENDED || pa_sink_get_state(u->sink) == PA_SINK_INIT) {
+ if (u->sink->state == PA_SINK_SUSPENDED || u->sink->state == PA_SINK_INIT) {
if (new_state == PA_SINK_RUNNING || new_state == PA_SINK_IDLE)
u->timestamp = pa_rtclock_now();
}
else
dump_close(u);
#endif
- if (pa_sink_get_state(u->sink) == PA_SINK_RUNNING) {
+ if (u->sink->state == PA_SINK_RUNNING) {
if (new_state != PA_SINK_RUNNING)
ipc_request_drain(u);
}
if (pa_sink_isinstance(pdevice)) {
pa_sink *s = PA_SINK(pdevice);
- pa_sink_state_t state = pa_sink_get_state(s);
- pa_log_debug("=========== Sink(%p,%s) state has been changed to [%d](0:RUNNING, 1:IDLE, 2:SUSPEND) ==========", s, s->name, state);
+ pa_log_debug("=========== Sink(%p,%s) state has been changed to [%d](0:RUNNING, 1:IDLE, 2:SUSPEND) ==========", s, s->name, s->state);
if (!s->use_internal_codec && !pa_safe_streq(s->name, SINK_NAME_NULL))
if ((device = pa_device_manager_get_device_with_sink(s)))
- pa_tz_device_set_running_and_notify(device, (state == PA_SINK_RUNNING));
+ pa_tz_device_set_running_and_notify(device, (s->state == PA_SINK_RUNNING));
} else if (pa_source_isinstance(pdevice)) {
pa_source *s = PA_SOURCE(pdevice);
- pa_source_state_t state = pa_source_get_state(s);
- pa_log_debug("=========== Source(%p,%s) state has been changed to [%d](0:RUNNING, 1:IDLE, 2:SUSPEND) ==========", s, s->name, state);
+ pa_log_debug("=========== Source(%p,%s) state has been changed to [%d](0:RUNNING, 1:IDLE, 2:SUSPEND) ==========", s, s->name, s->state);
if (!s->use_internal_codec && !pa_safe_streq(s->name, SOURCE_NAME_NULL))
if ((device = pa_device_manager_get_device_with_source(s)))
- pa_tz_device_set_running_and_notify(device, (state == PA_SOURCE_RUNNING));
+ pa_tz_device_set_running_and_notify(device, (s->state == PA_SOURCE_RUNNING));
}
pa_log_debug("========= sink_source_state_changed_hook_cb END =====");
}
pa_log_info("argument : %s", full_params);
- if (!(module = pa_module_load(c, module_name, full_params))) {
+ if (pa_module_load(&module, c, module_name, full_params)) {
pa_log_error("Load module with name '%s' argument '%s' failed", module_name, full_params);
return NULL;
}
if (u->module_loopback)
pa_module_unload(u->module_loopback, true);
- u->module_loopback = pa_module_load(u->core, MODULE_LOOPBACK, args);
-
- pa_log_info(" -- load module-loopback with (%s)", args);
+ if (pa_module_load(&u->module_loopback, u->core, MODULE_LOOPBACK, args))
+ pa_log_error("failed to load module-loopback with (%s)", args);
+ else
+ pa_log_info(" -- load module-loopback with (%s)", args);
pa_xfree(args);
} else if (!load) {
char *args = pa_sprintf_malloc("sink_name=%s slaves=\"%s,%s\"",
SINK_NAME_COMBINED_EX, combine_sink_arg1->name, combine_sink_arg2->name);
pa_log_info(" -- combined sink is not prepared, now load module[%s]", args);
- u->module_combine_sink_for_ex = pa_module_load(u->core, MODULE_COMBINE_SINK, args);
+ if (pa_module_load(&u->module_combine_sink_for_ex, u->core, MODULE_COMBINE_SINK, args))
+ pa_log_error("failed to load module-combine-sink with args(%s)", args);
pa_xfree(args);
}
sink = (pa_sink*)pa_namereg_get(u->core, SINK_NAME_COMBINED_EX, PA_NAMEREG_SINK);
char *args = pa_sprintf_malloc("sink_name=%s slaves=\"%s,%s\"",
SINK_NAME_COMBINED, (*combine_sink_arg1)->name, (*combine_sink_arg2)->name);
pa_log_info("[ROUTE][AUTO_ALL] combined sink is not prepared, now load module[%s]", args);
- u->module_combine_sink = pa_module_load(u->core, MODULE_COMBINE_SINK, args);
+ if (pa_module_load(&u->module_combine_sink, u->core, MODULE_COMBINE_SINK, args))
+ pa_log_error("failed to load module-combine-sink with args(%s)", args);
pa_xfree(args);
}
if ((sink = (pa_sink*)pa_namereg_get(u->core, SINK_NAME_COMBINED, PA_NAMEREG_SINK))) {
/* load null sink/source */
args = pa_sprintf_malloc("sink_name=%s", SINK_NAME_NULL);
- u->module_null_sink = pa_module_load(u->core, MODULE_NULL_SINK, args);
+ if (pa_module_load(&u->module_null_sink, u->core, MODULE_NULL_SINK, args))
+ pa_log_error("failed to load module-null-sink");
pa_xfree(args);
args = pa_sprintf_malloc("source_name=%s", SOURCE_NAME_NULL);
- u->module_null_source = pa_module_load(u->core, MODULE_NULL_SOURCE, args);
+ if (pa_module_load(&u->module_null_source, u->core, MODULE_NULL_SOURCE, args))
+ pa_log_error("failed to load module-null-source");
pa_xfree(args);
__load_dump_config(u);
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
+#include <pulse/util.h>
#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
pa_log_debug("Thread starting up");
if (u->core->realtime_scheduling)
- pa_make_realtime(u->core->realtime_priority);
+ pa_thread_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
+#include <pulse/util.h>
#include <pulsecore/i18n.h>
#include <pulsecore/macro.h>
pa_log_debug("Thread starting up");
if (u->core->realtime_scheduling)
- pa_make_realtime(u->core->realtime_priority);
+ pa_thread_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
}
if (!module) {
char *args = pa_sprintf_malloc("autoclean_interval=%d", 0);
- pa_module_load(m->core, MODULE_FILTER_APPLY, args);
- pa_log("module-filter-apply loaded");
+ if (pa_module_load(&module, m->core, MODULE_FILTER_APPLY, args))
+ pa_log_error("failed to load module-filter-apply with args(%s)", args);
+ else
+ pa_log("module-filter-apply loaded");
pa_xfree(args);
}
}
}
static pa_hook_result_t sink_input_state_changed_cb(pa_core *core, pa_sink_input *i, pa_stream_manager *m) {
- pa_sink_input_state_t state;
-
pa_assert(i);
pa_assert(m);
- state = pa_sink_input_get_state(i);
- pa_log_debug("sink-input(%p, index:%u), state(%d)", i, i->index, state);
+ pa_log_debug("sink-input(%p, index:%u), state(%d)", i, i->index, i->state);
- switch (state) {
+ switch (i->state) {
case PA_SINK_INPUT_CORKED:
process_stream(m, i, STREAM_SINK_INPUT, PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_ENDED, false);
break;
- case PA_SINK_INPUT_DRAINED:
case PA_SINK_INPUT_RUNNING:
process_stream(m, i, STREAM_SINK_INPUT, PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_STARTED, false);
break;
}
static pa_hook_result_t source_output_state_changed_cb(pa_core *core, pa_source_output *o, pa_stream_manager *m) {
- pa_source_output_state_t state;
-
pa_assert(o);
pa_assert(m);
- state = pa_source_output_get_state(o);
- pa_log_debug("source-output(%p, index:%u), state(%d)", o, o->index, state);
+ pa_log_debug("source-output(%p, index:%u), state(%d)", o, o->index, o->state);
- switch (state) {
+ switch (o->state) {
case PA_SOURCE_OUTPUT_CORKED:
process_stream(m, o, STREAM_SOURCE_OUTPUT, PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_ENDED, false);
break;
void *state;
PA_HASHMAP_FOREACH(sink, device->playback_devices, state) {
- if (pa_sink_get_state(sink) != PA_SINK_SUSPENDED)
+ if (sink->state != PA_SINK_SUSPENDED)
return false;
}
PA_HASHMAP_FOREACH(source, device->capture_devices, state) {
- if (pa_source_get_state(source) != PA_SOURCE_SUSPENDED)
+ if (source->state != PA_SOURCE_SUSPENDED)
return false;
}