Add new internal APIs to sound_manager_internal_tv.h 60/136060/1 accepted/tizen/unified/20170703.064222 submit/tizen/20170628.044505 submit/tizen/20170629.015859 submit/tizen/20170630.031137
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 28 Jun 2017 02:22:29 +0000 (11:22 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 28 Jun 2017 02:23:45 +0000 (11:23 +0900)
[Version] 0.4.15
[Issue Type] Header

Change-Id: I84bf5e3f28ed7a71801d28ce348003eb06fddd83

include/sound_manager_internal_tv.h
packaging/capi-media-sound-manager.spec

index f0caebc088c0d39bd900f0487ac84cb5d94e717e..000ee33e07481c9c7364f620e80a69bacb48d93a 100644 (file)
@@ -61,14 +61,16 @@ typedef enum {
  * @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;
 
 /**
@@ -195,6 +197,73 @@ int sound_manager_get_type_from_stream_information(sound_stream_info_h stream_in
  */
 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.
@@ -209,6 +278,7 @@ int sound_manager_get_index_from_stream_information(sound_stream_info_h stream_i
  * @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()
  */
@@ -348,6 +418,60 @@ int sound_manager_unset_filter(sound_stream_type_e stream_type);
  */
 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);
+
 /**
  * @}
  */
index 9581142c7c81792f65cc4024ab2fc5a17b443dde..bd93ba58927f5f930e68ac98de51915f7848e5b4 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.4.14
+Version:    0.4.15
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0