Turning on/off noise suppression APIs are added.
[Version] 0.7.3
[Issue Type] New Feature
Change-Id: I1917eb4afb541552252e7ec78a33f0475ccffc8a
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
*/
int sound_manager_get_echo_cancel_reference_device(sound_stream_info_h stream_info, int *device_id);
+/**
+ * @internal
+ * @brief Sets noise suppression status
+ * @since_tizen 7.5
+ * @param[in] stream_info The handle of stream information
+ * @param[in] enable The 'noise_suppression' property value to set: (@c true = enable, @c false = disable)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_get_noise_suppression()
+ */
+int sound_manager_set_noise_suppression(sound_stream_info_h stream_info, bool enable);
+
+/**
+ * @internal
+ * @brief Gets noise suppression status
+ * @since_tizen 7.5
+ * @param[in] stream_info The handle of stream information
+ * @param[out] enabled The 'noise_suppression' property value : (@c true = enable, @c false = disable)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_set_noise_suppression()
+ */
+int sound_manager_get_noise_suppression(sound_stream_info_h stream_info, bool *enabled);
+
/**
* @internal
* @brief Set force hdmi route
*/
int sound_manager_get_echo_cancel_reference_device(sound_stream_info_h stream_info, int *device_id);
+/**
+ * @internal
+ * @brief Sets noise suppression status
+ * @since_tizen 7.5
+ * @param[in] stream_info The handle of stream information
+ * @param[in] enable The 'noise_suppression' property value to set: (@c true = enable, @c false = disable)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_get_noise_suppression()
+ */
+int sound_manager_set_noise_suppression(sound_stream_info_h stream_info, bool enable);
+
+/**
+ * @internal
+ * @brief Gets noise suppression status
+ * @since_tizen 7.5
+ * @param[in] stream_info The handle of stream information
+ * @param[out] enabled The 'noise_suppression' property value : (@c true = enable, @c false = disable)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_set_noise_suppression()
+ */
+int sound_manager_get_noise_suppression(sound_stream_info_h stream_info, bool *enabled);
+
/**
* @internal
* @brief Gets the host volume level specified for a particular sound type.
manual_route_info_s manual_route_info;
preferred_device_info_s preferred_device_info;
int echo_cancel_reference_device;
+ bool noise_suppression;
pthread_mutex_t focus_state_mutex;
pthread_mutex_t focus_cb_mutex;
pthread_mutex_t vstream_mutex;
int _get_echo_cancel_reference_device(sound_stream_info_s *stream_info, int *device_id);
+int _set_noise_suppression(sound_stream_info_s *stream_info, bool enable);
+
+int _get_noise_suppression(sound_stream_info_s *stream_info, bool *enable);
+
int _set_rpi_playback_route(sound_rpi_playback_route_type type);
int _get_rpi_playback_route(sound_rpi_playback_route_type *type);
Name: capi-media-sound-manager
Summary: Sound Manager library
-Version: 0.7.2
+Version: 0.7.3
Release: 0
Group: Multimedia/API
License: Apache-2.0
return _get_echo_cancel_reference_device((sound_stream_info_s*)stream_info, device_id);
}
+int sound_manager_set_noise_suppression(sound_stream_info_h stream_info, bool enable)
+{
+ return _set_noise_suppression((sound_stream_info_s*)stream_info, enable);
+}
+
+int sound_manager_get_noise_suppression(sound_stream_info_h stream_info, bool *enabled)
+{
+ return _get_noise_suppression((sound_stream_info_s*)stream_info, enabled);
+}
+
int sound_manager_set_rpi_playback_route(sound_rpi_playback_route_type type)
{
return _set_rpi_playback_route(type);
SM_ARG_CHECK(device_id);
return _get_current_media_routing_path("out", device_id, &unused);
-}
\ No newline at end of file
+}
return SOUND_MANAGER_ERROR_NONE;
}
+int _set_noise_suppression(sound_stream_info_s *stream_info, bool enable)
+{
+ SM_ARG_CHECK(stream_info);
+
+ if (!stream_info->stream_conf_info.avail_in_devices[0]) {
+ LOGE("stream_info[%p, %s] does not support any input devices", stream_info, stream_info->stream_type);
+ return SOUND_MANAGER_ERROR_POLICY;
+ }
+
+ stream_info->noise_suppression = enable;
+
+ LOGI("stream_info[%p, %s] noise_suppression[%d]",
+ stream_info, stream_info->stream_type, stream_info->noise_suppression);
+
+ return SOUND_MANAGER_ERROR_NONE;
+}
+
+int _get_noise_suppression(sound_stream_info_s *stream_info, bool *enabled)
+{
+ SM_ARG_CHECK(stream_info);
+ SM_ARG_CHECK(enabled);
+
+ *enabled = stream_info->noise_suppression;
+
+ LOGI("stream_info[%p, %s] noise_suppression[%d]",
+ stream_info, stream_info->stream_type, *enabled);
+
+ return SOUND_MANAGER_ERROR_NONE;
+}
+
int _set_rpi_playback_route(sound_rpi_playback_route_type type)
{
int ret;
return ret;
}
-//LCOV_EXCL_STOP
\ No newline at end of file
+//LCOV_EXCL_STOP