* @since_tizen 3.0
*/
typedef enum {
- SOUND_STREAM_TYPE_RINGTONE_CALL = 100, /**< Sound stream type for ringtone for call */
- SOUND_STREAM_TYPE_RINGBACKTONE_CALL, /**< Sound stream type for ringback tone for call */
- SOUND_STREAM_TYPE_VOICE_CALL, /**< Sound stream type for voice-call */
- SOUND_STREAM_TYPE_VIDEO_CALL, /**< Sound stream type for video-call */
- SOUND_STREAM_TYPE_RADIO, /**< Sound stream type for radio */
- SOUND_STREAM_TYPE_LOOPBACK, /**< Sound stream type for loopback */
- SOUND_STREAM_TYPE_LOOPBACK_MIRRORING, /**< Sound stream type for loopback-mirroring */
- SOUND_STREAM_TYPE_SOLO, /**< Sound stream type for solo */
+ SOUND_STREAM_TYPE_RINGTONE_CALL = 100, /**< Sound stream type for ringtone for call */
+ SOUND_STREAM_TYPE_RINGBACKTONE_CALL, /**< Sound stream type for ringback tone for call */
+ SOUND_STREAM_TYPE_VOICE_CALL, /**< Sound stream type for voice-call */
+ SOUND_STREAM_TYPE_VIDEO_CALL, /**< Sound stream type for video-call */
+ SOUND_STREAM_TYPE_RADIO, /**< Sound stream type for radio */
+ SOUND_STREAM_TYPE_LOOPBACK, /**< Sound stream type for loopback */
+ SOUND_STREAM_TYPE_LOOPBACK_MIRRORING, /**< Sound stream type for loopback-mirroring */
+ SOUND_STREAM_TYPE_SOLO, /**< Sound stream type for solo */
+ SOUND_STREAM_TYPE_VOICE_RECOGNITION_SERVICE, /**< Sound stream type for voice recognition by service (Since 4.0) */
+ SOUND_STREAM_TYPE_MEDIA_COMPRESSED, /**< Sound stream type for compressed media (Since 4.0) */
} sound_stream_type_internal_e;
/**
*/
int sound_manager_get_index_from_stream_information(sound_stream_info_h stream_info, int *index);
+/**
+ * @internal
+ * @brief Adds the device id to the stream information for the stream routing.
+ * @since_tizen 4.0
+ *
+ * @remarks Use sound_manager_get_device_list(), sound_manager_get_next_device() and sound_manager_get_device_id()\n
+ * to get the device id.\n
+ * #SOUND_MANAGER_ERROR_POLICY could be returned according to the stream type of the @a stream_info.\n
+ * The available types of the @a stream_info for this function are #SOUND_STREAM_TYPE_VOIP and #SOUND_STREAM_TYPE_MEDIA_EXTERNAL_ONLY.
+ *
+ * @param[in] stream_info The handle of stream information
+ * @param[in] device_id The device id
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SOUND_MANAGER_ERROR_POLICY Noncompliance with the sound system policy
+ * @pre Call sound_manager_create_stream_information() before calling this function.
+ * @post You can apply this setting by calling sound_manager_apply_stream_routing().
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_destroy_stream_information()
+ * @see sound_manager_remove_device_id_for_stream_routing()
+ * @see sound_manager_apply_stream_routing()
+ */
+int sound_manager_add_device_id_for_stream_routing(sound_stream_info_h stream_info, int device_id);
+
+/**
+ * @internal
+ * @brief Removes the device id to the stream information for the stream routing.
+ * @since_tizen 4.0
+ *
+ * @remarks Use sound_manager_get_device_list(), sound_manager_get_next_device() and sound_manager_get_device_id()\n
+ * to get the device id.\n
+ *
+ * @param[in] stream_info The handle of stream information
+ * @param[in] device The device id
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Call sound_manager_create_stream_information() and sound_manager_add_device_for_stream_routing() before calling this function.
+ * @post You can apply this setting by calling sound_manager_apply_stream_routing().
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_destroy_stream_information()
+ * @see sound_manager_add_device_id_for_stream_routing()
+ * @see sound_manager_apply_stream_routing()
+ */
+int sound_manager_remove_device_id_for_stream_routing(sound_stream_info_h stream_info, int device_id);
+
+/**
+ * @internal
+ * @brief Gets the state of the device by id.
+ * @since_tizen 4.0
+ * @param[in] device_id The device id
+ * @param[out] state The state of the device
+ * @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_get_device_list()
+ * @see sound_manager_get_next_device()
+ * @see sound_manager_get_prev_device()
+ * @see sound_manager_get_device_id()
+ * @see sound_manager_free_device_list()
+ */
+int sound_manager_get_device_state_by_id(int device_id, sound_device_state_e *state);
+
/**
* @internal
* @brief Gets the internal stream information handle for VoIP session.
* @retval #SOUND_MANAGER_ERROR_NONE Success
* @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #SOUND_MANAGER_ERROR_NO_DATA No data
+ * @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system
* @see sound_manager_set_session_type()
* @see sound_manager_set_voip_session_mode()
*/
*/
int sound_manager_set_filter_preset(sound_stream_type_e stream_type, sound_filter_e filter, sound_filter_preset_e preset);
+/**
+ * @internal
+ * @brief Gets the vendor id of the device.
+ * @since_tizen 4.0
+ *
+ * @remarks It works only with USB audio device. Otherwise, #SOUND_MANAGER_ERROR_NOT_SUPPORTED will be returned.\n
+ *
+ * @param[in] device The device item
+ * @param[out] vendor_id The vendor id of the device
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SOUND_MANAGER_ERROR_NOT_SUPPORTED Not supported
+ * @see sound_manager_get_device_list()
+ * @see sound_manager_get_next_device()
+ * @see sound_manager_get_prev_device()
+ * @see sound_manager_get_device_type()
+ * @see sound_manager_get_device_io_direction()
+ * @see sound_manager_get_device_name()
+ * @see sound_manager_get_device_state()
+ * @see sound_manager_get_device_id()
+ * @see sound_manager_get_device_product_id()
+ * @see sound_manager_free_device_list()
+ */
+int sound_manager_get_device_vendor_id(sound_device_h device, int *vendor_id);
+
+/**
+ * @internal
+ * @brief Gets the product id of the device.
+ * @since_tizen 4.0
+ *
+ * @remarks It works only with USB audio device. Otherwise, #SOUND_MANAGER_ERROR_NOT_SUPPORTED will be returned.\n
+ *
+ * @param[in] device The device item
+ * @param[out] product_id The product id of the device
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SOUND_MANAGER_ERROR_NOT_SUPPORTED Not supported
+ * @see sound_manager_get_device_list()
+ * @see sound_manager_get_next_device()
+ * @see sound_manager_get_prev_device()
+ * @see sound_manager_get_device_type()
+ * @see sound_manager_get_device_io_direction()
+ * @see sound_manager_get_device_name()
+ * @see sound_manager_get_device_state()
+ * @see sound_manager_get_device_id()
+ * @see sound_manager_get_device_vendor_id()
+ * @see sound_manager_free_device_list()
+ */
+int sound_manager_get_device_product_id(sound_device_h device, int *product_id);
+
/**
* @}
*/