cdata.set('TIZEN_TV_PROD_LWIPC', 1)
endif
+boost_tv_dep = dependency('capi-boost-tv', required : get_option('cpu-boosting'))
+system_info_dep = dependency('capi-system-info', required : get_option('cpu-boosting'))
+
if get_option('aec')
cdata.set('TIZEN_AEC', 1)
endif
' aec: @0@'.format(get_option('aec')),
' prelink (for TV): @0@'.format(get_option('prelink')),
' lwipc (for TV): @0@'.format(get_option('lwipc')),
+ ' cpu-boosting (for TV): @0@'.format(get_option('cpu-boosting')),
]
message('\n '.join(summary))
Name: pulseaudio
Summary: Improved Linux sound server
Version: 15.0
-Release: 20
+Release: 21
Group: Multimedia/Audio
License: LGPL-2.1
URL: http://pulseaudio.org
BuildRequires: doxygen
%if "%{tizen_profile_name}" == "tv"
BuildRequires: pkgconfig(lwipc)
+BuildRequires: pkgconfig(capi-boost-tv)
+BuildRequires: pkgconfig(capi-system-info)
%endif
Requires: udev
Requires(post): /sbin/ldconfig
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_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, dlog_dep
+ platform_dep, tcpwrap_dep, platform_socket_dep, execinfo_dep, dlog_dep,
+ boost_tv_dep, system_info_dep
],
implicit_include_directories : false)
link_args : [nodelete_link_args, versioning_link_args],
install : true,
install_rpath : privlibdir,
- dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep, dl_dep, iconv_dep, libintl_dep, platform_dep, platform_socket_dep],
+ dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep, dl_dep, iconv_dep, libintl_dep, platform_dep, platform_socket_dep, boost_tv_dep, system_info_dep],
implicit_include_directories : false)
libpulse_dep = declare_dependency(link_with: libpulse)
#include <pulsecore/rtkit.h>
#endif
+#ifdef TIZEN_TV_PROD_CPU_BOOSTING
+#include <system_info.h>
+#include <boost-api.h>
+
+#define FMS_KEY_PROJECTOR_TYPE "com.samsung/featureconf/projector_feature_support"
+#endif
+
char *pa_get_user_name(char *s, size_t l) {
const char *p;
char *name = NULL;
#endif
}
+#ifdef TIZEN_TV_PROD_CPU_BOOSTING
+static int set_cpu_boosting(const char* feature_type) {
+ bool is_supported = false;
+ int boost_ret = 0;
+
+ if (system_info_get_custom_bool(feature_type, &is_supported))
+ pa_log_error("Get %s failed", feature_type);
+
+ pa_log_info("%s is %s", feature_type, is_supported ? "supported" : "not supported");
+
+ if (!is_supported)
+ return -1;
+
+ boost_mm_info_t mm_info;
+ pid_t process_id = getpid();
+ pid_t thread_id = gettid();
+
+ mm_info.parent.framework_type = BOOST_MM_FW;
+ mm_info.status = BOOST_MM_STATUS_REGISTER;
+ mm_info.type = BOOST_MM_TYPE_VIDEO;
+ mm_info.mmPid = process_id;
+
+ boost_ret = boost_request_by_tid(thread_id, (const boost_info_t *)&mm_info);
+ pa_log_info("boost_request_by_tid(), pid(%d), tid(%d) : %d", process_id, thread_id, boost_ret);
+
+ mm_info.parent.framework_type = BOOST_MM_FW;
+ mm_info.status = BOOST_MM_STATUS_START;
+ mm_info.type = BOOST_MM_TYPE_VIDEO;
+ mm_info.mmPid = process_id;
+
+ boost_ret = boost_request_by_pid(process_id, (const boost_info_t *)&mm_info);
+ pa_log_info("Feature is supported, using boost_request_by_pid() : %d", boost_ret);
+
+ return 0;
+}
+#endif
+
#ifdef _POSIX_PRIORITY_SCHEDULING
static int set_scheduler(int rtprio) {
#ifdef HAVE_SCHED_H
dbus_error_init(&error);
#endif
+#ifdef TIZEN_TV_PROD_CPU_BOOSTING
+ if (set_cpu_boosting(FMS_KEY_PROJECTOR_TYPE) == 0) {
+ pa_log_debug("set_cpu_boosting worked.");
+ return 0;
+ }
+#endif
pa_zero(sp);
sp.sched_priority = rtprio;