SET(submodule "sound-manager")
# for package file
-SET(dependents "mm-sound dlog capi-base-common mm-session libpulse gio-2.0 vconf")
+SET(dependents "mm-sound dlog capi-base-common mm-session libpulse gio-2.0 vconf capi-system-info")
SET(pc_dependents "capi-base-common")
# for deb
Name: capi-media-sound-manager
Summary: Sound Manager library
-Version: 0.3.63
+Version: 0.3.64
Release: 0
Group: Multimedia/API
License: Apache-2.0
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(gio-2.0)
+BuildRequires: pkgconfig(capi-system-info)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
#include "sound_manager.h"
#include "sound_manager_private.h"
+#include <system_info.h>
+#define FEATURE_MICROPHONE "http://tizen.org/feature/microphone"
_session_interrupt_info_s g_session_interrupt_cb_table = {0, 0, NULL, NULL};
_volume_changed_info_s g_volume_changed_cb_table = {0, NULL, NULL};
int ret = MM_ERROR_NONE;
int cur_session = -1;
int new_session = MM_SESSION_TYPE_MEDIA;
+ bool mic_enable = false;
LOGI(">> enter : type=%d", type);
if (type < SOUND_SESSION_TYPE_MEDIA || type > SOUND_SESSION_TYPE_VOIP)
return _convert_sound_manager_error_code(__func__, MM_ERROR_INVALID_ARGUMENT);
+ /* If session type is VOIP but MIC is not enabled, return false */
+ if (type == SOUND_SESSION_TYPE_VOIP) {
+ ret = system_info_get_platform_bool(FEATURE_MICROPHONE, &mic_enable);
+ LOGI("system_info_platform [%s]=[%d], ret[%d]", FEATURE_MICROPHONE, mic_enable, ret);
+ if (ret != SYSTEM_INFO_ERROR_NONE || !mic_enable)
+ return _convert_sound_manager_error_code(__func__, MM_ERROR_NOT_SUPPORT_API);
+ }
+
/* it is not supported both session and stream feature at the same time */
if (g_stream_info_count) {
LOGE("Could not set this type(%d) because of being used stream feature", type);