2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __TIZEN_MEDIA_SOUND_MANAGER_DOC_H__
19 #define __TIZEN_MEDIA_SOUND_MANAGER_DOC_H__
23 * @file sound_manager_doc.h
24 * @brief This file contains high level documentation of the Sound Manager API.
28 * @defgroup CAPI_MEDIA_SOUND_MANAGER_MODULE Sound Manager
29 * @brief The @ref CAPI_MEDIA_SOUND_MANAGER_MODULE APIs provides functions to get and set sound parameters like volume and route policy.
30 * @ingroup CAPI_MEDIA_FRAMEWORK
32 * @section CAPI_MEDIA_SOUND_MANAGER_MODULE_HEADER Required Header
33 * \#include <sound_manager.h>
35 * @section CAPI_MEDIA_SOUND_MANAGER_OVERVIEW Overview
36 * The Sound Manager service provides APIs to manage audio output.
38 * The Sound Manager API allows you to:
39 * - check/control output volume
40 * - change audio route policy
41 * - handle volume changed notification
42 * - handle audio route policy change notificat
44 * Current volume level can be checked with sound_manager_get_volume().
45 * To get maximum supported volume level, call sound_manager_get_max_volume().
46 * The volume level can be adjusted with sound_manager_set_volume().
48 * The Sound Manager has predefined types of sounds, such as ringtone, call, alarm, etc. The type of the currently playing sound may be
49 * obtained by calling sound_manager_get_current_sound_type().
51 * @subsection CAPI_MEDIA_SOUND_MANAGER_DESCRIPTION_ROUTE_POLICY Route policy
52 * The route policy is responsible for selection of sound sources and outputs that should be active. \n
53 * Note: The bluetooth headset microphone is used only in the voice call mode.
56 * <li> The default audio route policy is #SOUND_ROUTE_DEFAULT <p></li>
59 * <td><b>Mode</b></td>
60 * <td><b>Bluetooth headset</b></td>
61 * <td><b>Wired headset</b></td>
62 * <td><b>Used device</b></td>
68 * <td>Bluetooth headset</td>
74 * <td>Bluetooth headset</td>
78 * <td>disconnected</td>
80 * <td>Wired headset</td>
84 * <td>disconnected</td>
86 * <td>Loudspeaker</td>
92 * <td>Wired headset microphone</td>
102 * <td>disconnected</td>
104 * <td>Wired headset microphone</td>
108 * <td>disconnected</td>
110 * <td>Built-in microphone</td>
114 * <li> The bluetooth headset will be ignored for the routing policy set to #SOUND_ROUTE_IGNORE_A2DP <p></li>
117 * <td><b>Mode</b></td>
118 * <td><b>Bluetooth headset</b></td>
119 * <td><b>Wired headset</b></td>
120 * <td><b>Used device</b></td>
126 * <td>Wired headset</td>
132 * <td>Loudspeaker</td>
136 * <td>disconnected</td>
138 * <td>Wired headset</td>
142 * <td>disconnected</td>
144 * <td>Loudspeaker</td>
150 * <td>Wired headset microphone</td>
156 * <td>Microphone</td>
160 * <td>disconnected</td>
162 * <td>Wired headset microphone</td>
166 * <td>disconnected</td>
168 * <td>Built-in microphone</td>
172 * <li> Only the loudspeaker and microphone will be used for the routing policy set to #SOUND_ROUTE_HANDSET_ONLY <p></li>
175 * <td><b>Mode</b></td>
176 * <td><b>Bluetooth headset</b></td>
177 * <td><b>Wired headset</b></td>
178 * <td><b>Used device</b></td>
184 * <td>Loudspeaker</td>
190 * <td>Loudspeaker</td>
194 * <td>disconnected</td>
196 * <td>Loudspeaker</td>
200 * <td>disconnected</td>
202 * <td>Loudspeaker</td>
208 * <td>Microphone</td>
214 * <td>Microphone</td>
218 * <td>disconnected</td>
220 * <td>Microphone</td>
224 * <td>disconnected</td>
226 * <td>Microphone</td>
231 * The sound_manager_set_route_policy() and sound_manager_get_route_policy() functions set and check the route policy, which is limited to the pre-defined policies described.
233 * @subsection CAPI_MEDIA_SOUND_MANAGER_LIFE_CYCLE_ASYNCHRONOUS_OPERATIONS Asynchronous operations
234 * The Sound Manager API provides only asynchronous operations. \n
235 * Thus the result will be passed to the application via the callback mechanism.
236 * An appropriate callback can be called in response to changes initiated from outside the application. \n
237 * Possible callbacks are listed below:
240 * <li> sound_manager_volume_changed_cb - invoked when volume level is changed.<p></li>
241 * <li> sound_manager_route_policy_changed_cb - invoked when route policy is changed.<p></li>
244 * @subsection CAPI_MEDIA_SOUND_MANAGER_MODULE_LIFE_CYCLE_CALLBACK_OPERATIONS Callback(Event) Operations
245 * The callback mechanism is used to notify the application about significant sound manager events.
246 * <div><table class="doxtable" >
248 * <th><b> REGISTER</b></th>
249 * <th><b> UNREGISTER</b></th>
250 * <th><b> CALLBACK</b></th>
251 * <th><b> DESCRIPTION</b></th>
254 * <td> sound_manager_set_volume_changed_cb()</td>
255 * <td> sound_manager_unset_volume_changed_cb()</td>
256 * <td> sound_manager_volume_changed_cb()</td>
257 * <td> This callback is called when volume value is changed.</td>
260 * <td> sound_manager_set_route_policy_changed_cb()</td>
261 * <td> sound_manager_unset_route_policy_changed_cb()</td>
262 * <td> sound_manager_route_policy_changed_cb()</td>
263 * <td> This callback is called when the route policy is changed.</td>
269 #endif /* __TIZEN_MEDIA_SOUND_MANAGER_DOC_H__ */