4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungbae Shin <seungbae.shin@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
24 * @brief Application interface library for sound module.
28 * Application interface library for sound module.
31 #ifndef __MM_SOUND_H__
32 #define __MM_SOUND_H__
36 #include <mm_message.h>
46 This part is describes the sound module of multimedia framework. Sound
47 module provides APIs to implement play wav file with simple api, to handle volume information,
48 to handle audio route policy.
51 There is six different volume type for normal usage. application should set proper volume type to multimedia playback APIs.
55 <td><B>Description</B></td>
58 <td>VOLUME_TYPE_SYSTEM</td>
59 <td>volume for normal system sound (e.g. keysound, camera shutter)</td>
62 <td>VOLUME_TYPE_NOTIFICATION</td>
63 <td>volume for notification (e.g. message, email notification)</td>
66 <td>VOLUME_TYPE_RINGTONE</td>
67 <td>volume for incoming call ring</td>
70 <td>VOLUME_TYPE_MEDIA</td>
71 <td>volume for media playback (e.g. music, video playback)</td>
74 <td>VOLUME_TYPE_CALL</td>
75 <td>volume for call</td>
80 application can change audio route policy with mm-sound API.
81 Audio route is input and output of audio stream.
84 @image html audio_device.png "Figure1. Audio Devices of mobile phone" width=12cm
85 @image latex audio_device.png "Figure1. Audio Devices of mobile phone" width=12cm
88 Default audio route policy is like follows
93 <td><B>Bluetooth headset</B></td>
94 <td><B>Wired headset</B></td>
95 <td><B>Playback Device</B></td>
100 <td>Bluetooth headset</td>
105 <td>Bluetooth headset</td>
108 <td>disconnected</td>
110 <td>Wired headset</td>
113 <td>disconnected</td>
115 <td>Loud speaker</td>
120 for capture (bluetooth headset mic used only in call mode)
123 <td><B>Bluetooth headset mic</B></td>
124 <td><B>Wired headset mic</B></td>
125 <td><B>Capture Device</B></td>
130 <td>Wired headset mic</td>
138 <td>disconnected</td>
140 <td>Wired headset mic</td>
143 <td>disconnected</td>
145 <td>Wired headset mic</td>
150 If application changes routing policy to SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP with mm_sound_route_set_system_policy
151 audio routing policy has changed to ignore bluetooth headset connection.
156 <td><B>Bluetooth headset</B></td>
157 <td><B>Wired headset</B></td>
158 <td><B>Playback Device</B></td>
163 <td>Wired headset</td>
168 <td>Loud speaker</td>
171 <td>disconnected</td>
173 <td>Wired headset</td>
176 <td>disconnected</td>
178 <td>Loud speaker</td>
183 for capture (bluetooth headset mic used only in call mode)
186 <td><B>Bluetooth headset mic</B></td>
187 <td><B>Wired headset mic</B></td>
188 <td><B>Capture Device</B></td>
193 <td>Wired headset mic</td>
201 <td>disconnected</td>
203 <td>Wired headset mic</td>
206 <td>disconnected</td>
208 <td>Wired headset mic</td>
213 If application changes routing policy to SYSTEM_AUDIO_ROUTE_POLICY_HANDSET_ONLY with mm_sound_route_set_system_policy
214 audio routing policy has changed to use only loud speaker and microphone.
219 <td><B>Bluetooth headset</B></td>
220 <td><B>Wired headset</B></td>
221 <td><B>Playback Device</B></td>
226 <td>Loud speaker</td>
231 <td>Loud speaker</td>
234 <td>disconnected</td>
236 <td>Loud speaker</td>
239 <td>disconnected</td>
241 <td>Loud speaker</td>
246 for capture (bluetooth headset mic used only in call mode)
249 <td><B>Bluetooth headset mic</B></td>
250 <td><B>Wired headset mic</B></td>
251 <td><B>Capture Device</B></td>
264 <td>disconnected</td>
269 <td>disconnected</td>
276 #define MM_SOUND_STREAM_TYPE_LEN 64
279 * MMSound Volume APIs
283 * Enumerations of Volume type.
287 VOLUME_TYPE_SYSTEM, /**< System volume type */
288 VOLUME_TYPE_NOTIFICATION, /**< Notification volume type */
289 VOLUME_TYPE_ALARM, /**< Alarm volume type */
290 VOLUME_TYPE_RINGTONE, /**< Ringtone volume type */
291 VOLUME_TYPE_MEDIA, /**< Media volume type */
292 VOLUME_TYPE_CALL, /**< Call volume type */
293 VOLUME_TYPE_VOIP, /**< VOIP volume type */
294 VOLUME_TYPE_VOICE, /**< VOICE volume type */
295 VOLUME_TYPE_FIXED, /**< Volume type for fixed acoustic level */
296 VOLUME_TYPE_MAX, /**< Volume type count */
297 VOLUME_TYPE_UNKNOWN = -1, /**< volume type is not determined */
301 VOLUME_GAIN_DEFAULT = 0,
302 VOLUME_GAIN_DIALER = 1<<8,
303 VOLUME_GAIN_TOUCH = 2<<8,
304 VOLUME_GAIN_AF = 3<<8,
305 VOLUME_GAIN_SHUTTER1 = 4<<8,
306 VOLUME_GAIN_SHUTTER2 = 5<<8,
307 VOLUME_GAIN_CAMCORDING = 6<<8,
308 VOLUME_GAIN_MIDI = 7<<8,
309 VOLUME_GAIN_BOOTING = 8<<8,
310 VOLUME_GAIN_VIDEO = 9<<8,
311 VOLUME_GAIN_TTS = 10<<8,
315 * @brief Enumerations of supporting source_type
318 SUPPORT_SOURCE_TYPE_DEFAULT,
319 SUPPORT_SOURCE_TYPE_MIRRORING,
320 SUPPORT_SOURCE_TYPE_VOICECONTROL,
321 SUPPORT_SOURCE_TYPE_SVR,
322 SUPPORT_SOURCE_TYPE_VIDEOCALL,
323 SUPPORT_SOURCE_TYPE_VOICERECORDING,
324 SUPPORT_SOURCE_TYPE_VOIP, /* Supporting VoIP source*/
325 SUPPORT_SOURCE_TYPE_CALL_FORWARDING,
326 SUPPORT_SOURCE_TYPE_FMRADIO,
327 SUPPORT_SOURCE_TYPE_LOOPBACK,
328 } mm_sound_source_type_e;
331 * Active volume change callback function type.
333 * @param type [in] The sound type of changed volume
334 * @param volume [in] The new volume value
335 * @param user_data [in] Argument passed when callback has called
337 * @return No return value
339 * @see mm_sound_add_volume_changed_callback mm_sound_remove_volume_changed_callback
341 typedef void (*mm_sound_volume_changed_cb) (volume_type_t type, unsigned int volume, void *user_data);
346 int mm_sound_add_volume_changed_callback(mm_sound_volume_changed_cb func, void* user_data, unsigned int *id);
350 * This function is to remove volume changed callback.
352 * @param type [in] volume type to set change callback function
354 * @return This function returns MM_ERROR_NONE on success, or negative value
357 * @pre Callback function should be registered previously for given volume type.
358 * @post Callback function will not be called anymore.
362 void _volume_callback(void *data)
364 printf("Callback function\n");
367 int volume_callback()
370 int vol_type = VOLUME_TYPE_MEDIA;
372 mm_sound_volume_add_callback(vol_type, _volume_callback, NULL);
374 ret = mm_sound_volume_remove_callback(vol_type);
375 if ( MM_ERROR_NONE == ret)
377 printf("Remove callback success\n");
381 printf("Remove callback failed\n");
389 int mm_sound_volume_remove_callback(volume_type_t type);
392 * This function is to remove volume change callback.
394 * @return This function returns MM_ERROR_NONE on success, or negative value
397 int mm_sound_remove_volume_changed_callback(unsigned int id);
400 * This function is to set volume level of certain volume type.
402 * @param type [in] volume type to set value.
403 * @param value [in] volume value.
405 * @return This function returns MM_ERROR_NONE on success, or negative value
407 * @remark value should be 0 ~ MAX
408 * @see mm_sound_volume_get_value volume_type_t
410 * @post Volume value will be changed to given value for given volume type.
413 int mm_sound_volume_set_value(volume_type_t type, const unsigned int volume_level);
417 * This function is to get volume level of certain volume type.
419 * @param type [in] volume type to get value.
420 * @param value [out] volume value.
422 * @return This function returns MM_ERROR_NONE on success, or negative value
427 * @see volume_type_t mm_sound_volume_set_value
433 ret = mm_sound_volume_get_value(VOLUME_TYPE_SYSTEM, &value);
436 printf("Can not get volume\n");
440 printf("System type volume is %d\n", value);
443 * @see mm_sound_volume_set_value
445 int mm_sound_volume_get_value(volume_type_t type, unsigned int *value);
450 * This function is to set primary volume type.
452 * @param type [in] volume type to set as primary volume type.
454 * @return This function returns MM_ERROR_NONE on success, or negative value
456 * @remark Application should use this function during foreground.
458 * @post Volume app. will be update given volume type when H/W volume control key pressed.
462 static int _resume(void *data)
466 ret = mm_sound_volume_primary_type_set(VOLUME_TYPE_MEDIA);
469 printf("Can not set primary volume type\n");
474 static int _pause(void* data)
478 ret = mm_sound_volume_primary_type_set(VOLUME_TYPE_UNKNOWN);
481 printf("Can not clear primary volume type\n");
489 struct appcore_ops ops = {
491 .terminate = _terminate,
497 return appcore_efl_main(PACKAGE, ..., &ops);
501 int mm_sound_volume_primary_type_set(volume_type_t type);
502 int mm_sound_volume_primary_type_get(volume_type_t *type);
505 * Terminate callback function type.
507 * @param data [in] Argument passed when callback was set
508 * @param id [in] handle which has completed playing
510 * @return No return value
511 * @remark It is not allowed to call MMSound API recursively or do time-consuming
512 * task in this callback because this callback is called synchronously.
513 * @see mm_sound_play_sound
515 typedef void (*mm_sound_stop_callback_func) (void *data, int id);
522 * This function is to play system sound.
524 * @param filename [in] Sound filename to play
525 * @param volume config [in] Volume type & volume gain
526 * @param callback [in] Callback function pointer when playing is terminated.
527 * @param data [in] Pointer to user data when callback is called.
528 * @param handle [out] Handle of sound play.
530 * @return This function returns MM_ERROR_NONE on success, or negative value
532 * @remark When the stop callback is set, it will be called when system sound is
533 * terminated. If mm_sound_stop_sound() is called apparently before
534 * system sound is terminated, stop_callback will not be called.
535 * @see mm_sound_stop_sound mm_sound_stop_callback_func volume_type_t volume_gain_t
537 * @post Sound will be generated with given filename.
541 void _stop_callback(void* data)
543 printf("Stop callback\n");
549 char filename[] ="testfile.wav";
550 volume_type_t volume = VOLUME_TYPE_SYSTEM;
554 ret = mm_sound_play_sound(filename, volume, _stop_callback, NULL, &handle);
557 printf("play file failed\n");
561 printf("play file success\n");
567 printf("play stopped\n");
572 int mm_sound_play_sound(const char *filename, int volume_config, mm_sound_stop_callback_func callback, void *data, int *handle);
575 * This function is to play system sound. And other audio stream will be mute during playing time
577 * @param filename [in] Sound filename to play
578 * @param volume config [in] Volume type & volume gain
579 * @param callback [in] Callback function pointer when playing is terminated.
580 * @param data [in] Pointer to user data when callback is called.
581 * @param handle [out] Handle of sound play.
583 * @return This function returns MM_ERROR_NONE on success, or negative value
585 * @remark This function is almost same with mm_sound_play_sound,
586 * but this make other audio playback stream to mute during playing time.
587 * @see mm_sound_stop_sound mm_sound_stop_callback_func volume_type_t volume_gain_t
589 * @post Sound will be generated with given filename.
593 void _stop_callback(void* data)
595 printf("Stop callback\n");
601 char filename[] ="testfile.wav";
602 volume_type_t volume = VOLUME_TYPE_SYSTEM;
606 ret = mm_sound_play_loud_solo_sound(filename, volume, _stop_callback, NULL, &handle);
609 printf("play file failed\n");
613 printf("play file success\n");
619 printf("play stopped\n");
624 int mm_sound_play_loud_solo_sound(const char *filename, int volume_config, mm_sound_stop_callback_func callback, void *data, int *handle);
627 * This function is to stop playing system sound.
629 * @param handle [in] Handle of mm_sound_play_sound
631 * @return This function returns MM_ERROR_NONE on success, or negative value
634 * @remark When system sound is terminated with this function call, it does not
635 * call stop callback which was set when start playing system sound.
636 * @see mm_sound_play_sound
637 * @pre An sound play handle should be valid.
638 * @post Playing sound file will be stopped.
642 void _stop_callback(void* data)
644 printf("Stop callback\n");
648 int play_file_one_second()
650 char filename[] ="testfile.wav";
651 volume_type_t volume = VOLUME_TYPE_SYSTEM;
655 ret = mm_sound_play_sound(filename, volume, _stop_callback, NULL, &handle);
658 printf("play file failed\n");
662 printf("play file success\n");
665 sleep(1); //wait 1 second
667 ret = mm_sound_stop_sound(handle);
670 printf("stop failed\n");
674 printf("play stopped\n");
680 int mm_sound_stop_sound(int handle);
684 * Enumerations for TONE
688 MM_SOUND_TONE_DTMF_0 = 0, /**< Predefined DTMF 0 */
689 MM_SOUND_TONE_DTMF_1, /**< Predefined DTMF 1 */
690 MM_SOUND_TONE_DTMF_2, /**< Predefined DTMF 2 */
691 MM_SOUND_TONE_DTMF_3, /**< Predefined DTMF 3 */
692 MM_SOUND_TONE_DTMF_4, /**< Predefined DTMF 4 */
693 MM_SOUND_TONE_DTMF_5, /**< Predefined DTMF 5 */
694 MM_SOUND_TONE_DTMF_6, /**< Predefined DTMF 6 */
695 MM_SOUND_TONE_DTMF_7, /**< Predefined DTMF 7 */
696 MM_SOUND_TONE_DTMF_8, /**< Predefined DTMF 8 */
697 MM_SOUND_TONE_DTMF_9, /**< Predefined DTMF 9 */
698 MM_SOUND_TONE_DTMF_S, /**< Predefined DTMF Star - Asterisk (*) */
699 MM_SOUND_TONE_DTMF_P, /**< Predefined DTMF sharP (#) */
700 MM_SOUND_TONE_DTMF_A, /**< Predefined DTMF A (A) */
701 MM_SOUND_TONE_DTMF_B, /**< Predefined DTMF B (B) */
702 MM_SOUND_TONE_DTMF_C, /**< Predefined DTMF C (C) */
703 MM_SOUND_TONE_DTMF_D, /**< Predefined DTMF D (D) */
705 /**< Pre-defined TONE */
706 MM_SOUND_TONE_SUP_DIAL, /**Call supervisory tone, Dial tone: CEPT: 425Hz, continuous */
707 MM_SOUND_TONE_ANSI_DIAL, /**Call supervisory tone, Dial tone: ANSI (IS-95): 350Hz+440Hz, continuous */
708 MM_SOUND_TONE_JAPAN_DIAL, /**Call supervisory tone, Dial tone: JAPAN: 400Hz, continuous*/
709 MM_SOUND_TONE_SUP_BUSY, /**Call supervisory tone, Busy: CEPT: 425Hz, 500ms ON, 500ms OFF... */
710 MM_SOUND_TONE_ANSI_BUSY, /**Call supervisory tone, Busy: ANSI (IS-95): 480Hz+620Hz, 500ms ON, 500ms OFF... */
711 MM_SOUND_TONE_JAPAN_BUSY, /**Call supervisory tone, Busy: JAPAN: 400Hz, 500ms ON, 500ms OFF...*/
712 MM_SOUND_TONE_SUP_CONGESTION, /**Call supervisory tone, Congestion: CEPT, JAPAN: 425Hz, 200ms ON, 200ms OFF */
713 MM_SOUND_TONE_ANSI_CONGESTION, /**Call supervisory tone, Congestion: ANSI (IS-95): 480Hz+620Hz, 250ms ON, 250ms OFF... */
714 MM_SOUND_TONE_SUP_RADIO_ACK, /**Call supervisory tone, Radio path acknowlegment : CEPT, ANSI: 425Hz, 200ms ON */
715 MM_SOUND_TONE_JAPAN_RADIO_ACK, /**Call supervisory tone, Radio path acknowlegment : JAPAN: 400Hz, 1s ON, 2s OFF...*/
716 MM_SOUND_TONE_SUP_RADIO_NOTAVAIL, /**Call supervisory tone, Radio path not available: 425Hz, 200ms ON, 200 OFF 3 bursts */
717 MM_SOUND_TONE_SUP_ERROR, /**Call supervisory tone, Error/Special info: 950Hz+1400Hz+1800Hz, 330ms ON, 1s OFF... */
718 MM_SOUND_TONE_SUP_CALL_WAITING, /**Call supervisory tone, Call Waiting: CEPT, JAPAN: 425Hz, 200ms ON, 600ms OFF, 200ms ON, 3s OFF... */
719 MM_SOUND_TONE_ANSI_CALL_WAITING, /**Call supervisory tone, Call Waiting: ANSI (IS-95): 440 Hz, 300 ms ON, 9.7 s OFF, (100 ms ON, 100 ms OFF, 100 ms ON, 9.7s OFF ...) */
720 MM_SOUND_TONE_SUP_RINGTONE, /**Call supervisory tone, Ring Tone: CEPT, JAPAN: 425Hz, 1s ON, 4s OFF... */
721 MM_SOUND_TONE_ANSI_RINGTONE, /**Call supervisory tone, Ring Tone: ANSI (IS-95): 440Hz + 480Hz, 2s ON, 4s OFF... */
722 MM_SOUND_TONE_PROP_BEEP, /**General beep: 400Hz+1200Hz, 35ms ON */
723 MM_SOUND_TONE_PROP_ACK, /**Proprietary tone, positive acknowlegement: 1200Hz, 100ms ON, 100ms OFF 2 bursts */
724 MM_SOUND_TONE_PROP_NACK, /**Proprietary tone, negative acknowlegement: 300Hz+400Hz+500Hz, 400ms ON */
725 MM_SOUND_TONE_PROP_PROMPT, /**Proprietary tone, prompt tone: 400Hz+1200Hz, 200ms ON */
726 MM_SOUND_TONE_PROP_BEEP2, /**Proprietary tone, general double beep: twice 400Hz+1200Hz, 35ms ON, 200ms OFF, 35ms ON */
727 MM_SOUND_TONE_SUP_INTERCEPT, /**Call supervisory tone (IS-95), intercept tone: alternating 440 Hz and 620 Hz tones, each on for 250 ms */
728 MM_SOUND_TONE_SUP_INTERCEPT_ABBREV, /**Call supervisory tone (IS-95), abbreviated intercept: intercept tone limited to 4 seconds */
729 MM_SOUND_TONE_SUP_CONGESTION_ABBREV, /**Call supervisory tone (IS-95), abbreviated congestion: congestion tone limited to 4 seconds */
730 MM_SOUND_TONE_SUP_CONFIRM, /**Call supervisory tone (IS-95), confirm tone: a 350 Hz tone added to a 440 Hz tone repeated 3 times in a 100 ms on, 100 ms off cycle */
731 MM_SOUND_TONE_SUP_PIP, /**Call supervisory tone (IS-95), pip tone: four bursts of 480 Hz tone (0.1 s on, 0.1 s off). */
732 MM_SOUND_TONE_CDMA_DIAL_TONE_LITE, /**425Hz continuous */
733 MM_SOUND_TONE_CDMA_NETWORK_USA_RINGBACK, /**CDMA USA Ringback: 440Hz+480Hz 2s ON, 4000 OFF ...*/
734 MM_SOUND_TONE_CDMA_INTERCEPT, /**CDMA Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON ...*/
735 MM_SOUND_TONE_CDMA_ABBR_INTERCEPT, /**CDMA Abbr Intercept tone: 440Hz 250ms ON, 620Hz 250ms ON */
736 MM_SOUND_TONE_CDMA_REORDER, /**CDMA Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF... */
737 MM_SOUND_TONE_CDMA_ABBR_REORDER, /**CDMA Abbr Reorder tone: 480Hz+620Hz 250ms ON, 250ms OFF repeated for 8 times */
738 MM_SOUND_TONE_CDMA_NETWORK_BUSY, /**CDMA Network Busy tone: 480Hz+620Hz 500ms ON, 500ms OFF continuous */
739 MM_SOUND_TONE_CDMA_CONFIRM, /**CDMA Confirm tone: 350Hz+440Hz 100ms ON, 100ms OFF repeated for 3 times */
740 MM_SOUND_TONE_CDMA_ANSWER, /**CDMA answer tone: silent tone - defintion Frequency 0, 0ms ON, 0ms OFF */
741 MM_SOUND_TONE_CDMA_NETWORK_CALLWAITING, /**CDMA Network Callwaiting tone: 440Hz 300ms ON */
742 MM_SOUND_TONE_CDMA_PIP, /**CDMA PIP tone: 480Hz 100ms ON, 100ms OFF repeated for 4 times */
743 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL, /**ISDN Call Signal Normal tone: {2091Hz 32ms ON, 2556 64ms ON} 20 times, 2091 32ms ON, 2556 48ms ON, 4s OFF */
744 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP, /**ISDN Call Signal Intergroup tone: {2091Hz 32ms ON, 2556 64ms ON} 8 times, 2091Hz 32ms ON, 400ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 8times, 2091Hz 32ms ON, 4s OFF.*/
745 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI, /**ISDN Call Signal SP PRI tone:{2091Hz 32ms ON, 2556 64ms ON} 4 times 2091Hz 16ms ON, 200ms OFF, {2091Hz 32ms ON, 2556Hz 64ms ON} 4 times, 2091Hz 16ms ON, 200ms OFF */
746 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_PAT3, /**SDN Call sign PAT3 tone: silent tone */
747 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING, /**ISDN Ping Ring tone: {2091Hz 32ms ON, 2556Hz 64ms ON} 5 times 2091Hz 20ms ON */
748 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_PAT5, /**ISDN Pat5 tone: silent tone */
749 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_PAT6, /**ISDN Pat6 tone: silent tone */
750 MM_SOUND_TONE_CDMA_CALL_SIGNAL_ISDN_PAT7, /**ISDN Pat7 tone: silent tone */
751 MM_SOUND_TONE_CDMA_HIGH_L, /**TONE_CDMA_HIGH_L tone: {3700Hz 25ms, 4000Hz 25ms} 40 times 4000ms OFF, Repeat .... */
752 MM_SOUND_TONE_CDMA_MED_L, /**TONE_CDMA_MED_L tone: {2600Hz 25ms, 2900Hz 25ms} 40 times 4000ms OFF, Repeat .... */
753 MM_SOUND_TONE_CDMA_LOW_L, /**TONE_CDMA_LOW_L tone: {1300Hz 25ms, 1450Hz 25ms} 40 times, 4000ms OFF, Repeat .... */
754 MM_SOUND_TONE_CDMA_HIGH_SS, /**CDMA HIGH SS tone: {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 400ms OFF, repeat .... */
755 MM_SOUND_TONE_CDMA_MED_SS, /**CDMA MED SS tone: {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 400ms OFF, repeat .... */
756 MM_SOUND_TONE_CDMA_LOW_SS, /**CDMA LOW SS tone: {1300z 25ms, 1450Hz 25ms} repeat 16 times, 400ms OFF, repeat .... */
757 MM_SOUND_TONE_CDMA_HIGH_SSL, /**CDMA HIGH SSL tone: {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... */
758 MM_SOUND_TONE_CDMA_MED_SSL, /**CDMA MED SSL tone: {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... */
759 MM_SOUND_TONE_CDMA_LOW_SSL, /**CDMA LOW SSL tone: {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} repeat 16 times, 4000ms OFF, repeat ... */
760 MM_SOUND_TONE_CDMA_HIGH_SS_2, /**CDMA HIGH SS2 tone: {3700Hz 25ms, 4000Hz 25ms} 20 times, 1000ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 3000ms OFF, repeat .... */
761 MM_SOUND_TONE_CDMA_MED_SS_2, /**CDMA MED SS2 tone: {2600Hz 25ms, 2900Hz 25ms} 20 times, 1000ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 3000ms OFF, repeat .... */
762 MM_SOUND_TONE_CDMA_LOW_SS_2, /**CDMA LOW SS2 tone: {1300Hz 25ms, 1450Hz 25ms} 20 times, 1000ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 3000ms OFF, repeat .... */
763 MM_SOUND_TONE_CDMA_HIGH_SLS, /**CDMA HIGH SLS tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 20 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 3000ms OFF, REPEAT */
764 MM_SOUND_TONE_CDMA_MED_SLS, /**CDMA MED SLS tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 20 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 3000ms OFF, REPEAT */
765 MM_SOUND_TONE_CDMA_LOW_SLS, /**CDMA LOW SLS tone: {1300Hz 25ms, 1450Hz 25ms} 10 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 20 times, 500ms OFF, {1300Hz 25ms, 1450Hz 25ms} 10 times, 3000ms OFF, REPEAT */
766 MM_SOUND_TONE_CDMA_HIGH_S_X4, /**CDMA HIGH S X4 tone: {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 500ms OFF, {3700Hz 25ms, 4000Hz 25ms} 10 times, 2500ms OFF, REPEAT.... */
767 MM_SOUND_TONE_CDMA_MED_S_X4, /**CDMA MED S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT.... */
768 MM_SOUND_TONE_CDMA_LOW_S_X4, /**CDMA LOW S X4 tone: {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 500ms OFF, {2600Hz 25ms, 2900Hz 25ms} 10 times, 2500ms OFF, REPEAT....*/
769 MM_SOUND_TONE_CDMA_HIGH_PBX_L, /**CDMA HIGH PBX L: {3700Hz 25ms, 4000Hz 25ms}20 times, 2000ms OFF, REPEAT.... */
770 MM_SOUND_TONE_CDMA_MED_PBX_L, /**CDMA MED PBX L: {2600Hz 25ms, 2900Hz 25ms}20 times, 2000ms OFF, REPEAT.... */
771 MM_SOUND_TONE_CDMA_LOW_PBX_L, /**CDMA LOW PBX L: {1300Hz 25ms,1450Hz 25ms}20 times, 2000ms OFF, REPEAT.... */
772 MM_SOUND_TONE_CDMA_HIGH_PBX_SS, /**CDMA HIGH PBX SS tone: {3700Hz 25ms, 4000Hz 25ms} 8 times 200 ms OFF, {3700Hz 25ms 4000Hz 25ms}8 times, 2000ms OFF, REPEAT.... */
773 MM_SOUND_TONE_CDMA_MED_PBX_SS, /**CDMA MED PBX SS tone: {2600Hz 25ms, 2900Hz 25ms} 8 times 200 ms OFF, {2600Hz 25ms 2900Hz 25ms}8 times, 2000ms OFF, REPEAT.... */
774 MM_SOUND_TONE_CDMA_LOW_PBX_SS, /**CDMA LOW PBX SS tone: {1300Hz 25ms, 1450Hz 25ms} 8 times 200 ms OFF, {1300Hz 25ms 1450Hz 25ms}8 times, 2000ms OFF, REPEAT.... */
775 MM_SOUND_TONE_CDMA_HIGH_PBX_SSL, /**CDMA HIGH PBX SSL tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 1000ms OFF, REPEAT.... */
776 MM_SOUND_TONE_CDMA_MED_PBX_SSL, /**CDMA MED PBX SSL tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 1000ms OFF, REPEAT.... */
777 MM_SOUND_TONE_CDMA_LOW_PBX_SSL, /**CDMA LOW PBX SSL tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 1000ms OFF, REPEAT.... */
778 MM_SOUND_TONE_CDMA_HIGH_PBX_SLS, /**CDMA HIGH PBX SLS tone:{3700Hz 25ms, 4000Hz 25ms} 8 times 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 16 times, 200ms OFF, {3700Hz 25ms, 4000Hz 25ms} 8 times, 1000ms OFF, REPEAT.... */
779 MM_SOUND_TONE_CDMA_MED_PBX_SLS, /**CDMA MED PBX SLS tone:{2600Hz 25ms, 2900Hz 25ms} 8 times 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 16 times, 200ms OFF, {2600Hz 25ms, 2900Hz 25ms} 8 times, 1000ms OFF, REPEAT.... */
780 MM_SOUND_TONE_CDMA_LOW_PBX_SLS, /**CDMA LOW PBX SLS tone:{1300Hz 25ms, 1450Hz 25ms} 8 times 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 16 times, 200ms OFF, {1300Hz 25ms, 1450Hz 25ms} 8 times, 1000ms OFF, REPEAT.... */
781 MM_SOUND_TONE_CDMA_HIGH_PBX_S_X4, /**CDMA HIGH PBX X S4 tone: {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 200ms OFF, {3700Hz 25ms 4000Hz 25ms} 8 times, 800ms OFF, REPEAT... */
782 MM_SOUND_TONE_CDMA_MED_PBX_S_X4, /**CDMA MED PBX X S4 tone: {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 200ms OFF, {2600Hz 25ms 2900Hz 25ms} 8 times, 800ms OFF, REPEAT... */
783 MM_SOUND_TONE_CDMA_LOW_PBX_S_X4, /**CDMA LOW PBX X S4 tone: {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 200ms OFF, {1300Hz 25ms 1450Hz 25ms} 8 times, 800ms OFF, REPEAT... */
784 MM_SOUND_TONE_CDMA_ALERT_NETWORK_LITE, /**CDMA Alert Network Lite tone: 1109Hz 62ms ON, 784Hz 62ms ON, 740Hz 62ms ON 622Hz 62ms ON, 1109Hz 62ms ON */
785 MM_SOUND_TONE_CDMA_ALERT_AUTOREDIAL_LITE, /**CDMA Alert Auto Redial tone: {1245Hz 62ms ON, 659Hz 62ms ON} 3 times, 1245 62ms ON */
786 MM_SOUND_TONE_CDMA_ONE_MIN_BEEP, /**CDMA One Min Beep tone: 1150Hz+770Hz 400ms ON */
787 MM_SOUND_TONE_CDMA_KEYPAD_VOLUME_KEY_LITE, /**CDMA KEYPAD Volume key lite tone: 941Hz+1477Hz 120ms ON */
788 MM_SOUND_TONE_CDMA_PRESSHOLDKEY_LITE, /**CDMA PRESSHOLDKEY LITE tone: 587Hz 375ms ON, 1175Hz 125ms ON */
789 MM_SOUND_TONE_CDMA_ALERT_INCALL_LITE, /**CDMA ALERT INCALL LITE tone: 587Hz 62ms, 784 62ms, 831Hz 62ms, 784Hz 62ms, 1109 62ms, 784Hz 62ms, 831Hz 62ms, 784Hz 62ms*/
790 MM_SOUND_TONE_CDMA_EMERGENCY_RINGBACK, /**CDMA EMERGENCY RINGBACK tone: {941Hz 125ms ON, 10ms OFF} 3times 4990ms OFF, REPEAT... */
791 MM_SOUND_TONE_CDMA_ALERT_CALL_GUARD, /**CDMA ALERT CALL GUARD tone: {1319Hz 125ms ON, 125ms OFF} 3 times */
792 MM_SOUND_TONE_CDMA_SOFT_ERROR_LITE, /**CDMA SOFT ERROR LITE tone: 1047Hz 125ms ON, 370Hz 125ms */
793 MM_SOUND_TONE_CDMA_CALLDROP_LITE, /**CDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms */
794 MM_SOUND_TONE_CDMA_NETWORK_BUSY_ONE_SHOT, /**CDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF. */
795 MM_SOUND_TONE_CDMA_ABBR_ALERT, /**CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON */
796 MM_SOUND_TONE_CDMA_SIGNAL_OFF, /**CDMA_SIGNAL_OFF - silent tone */
797 MM_SOUND_TONE_LOW_FRE, /**100Hz continuous */
798 MM_SOUND_TONE_MED_FRE, /**200Hz continuous */
799 MM_SOUND_TONE_HIGH_FRE, /**300Hz continuous */
803 typedef unsigned long sound_time_msec_t; /**< millisecond unit */
806 * This function is to play tone sound.
808 * @param num [in] predefined tone type (MMSoundTone_t)
809 * volume config [in] volume type & volume gain
810 * volume [in] volume ratio (0.0 ~1.0)
811 * duration [in] millisecond (-1 for infinite)
812 * handle [in] Handle of mm_sound_play_tone
813 * enable_session [in] set enable/unable session
815 * @return This function returns MM_ERROR_NONE on success, or negative value
818 * @remark It doesn't provide stop
819 * @see volume_type_t volume_gain_t MMSoundTone_t
821 * @post TONE sound will be played.
826 ret = mm_sound_play_tone_ex(MM_SOUND_TONE_DTMF_9, VOLUME_TYPE_SYSTEM, 1.0, 1000, &handle, TRUE); //play 1 second with volume ratio 1.0
829 printf("play tone failed\n");
833 printf("play tone success\n");
837 int mm_sound_play_tone_ex (MMSoundTone_t num, int volume_config, const double volume, const int duration, int *handle, bool enable_session);
840 * This function is to play tone sound.
842 * @param num [in] predefined tone type (MMSoundTone_t)
843 * volume config [in] volume type & volume gain
844 * volume [in] volume ratio (0.0 ~1.0)
845 * duration [in] millisecond (-1 for infinite)
846 * handle [in] Handle of mm_sound_play_tone
848 * @return This function returns MM_ERROR_NONE on success, or negative value
851 * @remark It doesn't provide stop
852 * @see volume_type_t volume_gain_t MMSoundTone_t
854 * @post TONE sound will be played.
859 ret = mm_sound_play_tone(MM_SOUND_TONE_DTMF_9, VOLUME_TYPE_SYSTEM, 1.0, 1000, &handle); //play 1 second with volume ratio 1.0
862 printf("play tone failed\n");
866 printf("play tone success\n");
870 int mm_sound_play_tone (MMSoundTone_t num, int volume_config, const double volume, const int duration, int *handle);
872 int mm_sound_play_tone_with_stream_info(MMSoundTone_t tone, char *stream_type, int stream_id, const double volume, const int duration, int *handle);
875 * Enumerations of device & route
879 MM_SOUND_DIRECTION_NONE,
880 MM_SOUND_DIRECTION_IN, /**< Capture */
881 MM_SOUND_DIRECTION_OUT, /**< Playback */
882 } mm_sound_direction;
885 MM_SOUND_DEVICE_IN_NONE = 0x00,
886 MM_SOUND_DEVICE_IN_MIC = 0x01, /**< Device builtin mic. */
887 MM_SOUND_DEVICE_IN_WIRED_ACCESSORY = 0x02, /**< Wired input devices */
888 MM_SOUND_DEVICE_IN_BT_SCO = 0x08, /**< Bluetooth SCO device */
889 } mm_sound_device_in;
892 MM_SOUND_DEVICE_OUT_NONE = 0x000,
893 MM_SOUND_DEVICE_OUT_SPEAKER = 0x001<<8, /**< Device builtin speaker */
894 MM_SOUND_DEVICE_OUT_RECEIVER = 0x002<<8, /**< Device builtin receiver */
895 MM_SOUND_DEVICE_OUT_WIRED_ACCESSORY = 0x004<<8, /**< Wired output devices such as headphone, headset, and so on. */
896 MM_SOUND_DEVICE_OUT_BT_SCO = 0x008<<8, /**< Bluetooth SCO device */
897 MM_SOUND_DEVICE_OUT_BT_A2DP = 0x010<<8, /**< Bluetooth A2DP device */
898 MM_SOUND_DEVICE_OUT_DOCK = 0x020<<8, /**< DOCK device */
899 MM_SOUND_DEVICE_OUT_HDMI = 0x040<<8, /**< HDMI device */
900 MM_SOUND_DEVICE_OUT_MIRRORING = 0x080<<8, /**< MIRRORING device */
901 MM_SOUND_DEVICE_OUT_USB_AUDIO = 0x100<<8, /**< USB Audio device */
902 MM_SOUND_DEVICE_OUT_MULTIMEDIA_DOCK = 0x200<<8, /**< Multimedia DOCK device */
903 } mm_sound_device_out;
906 MM_SOUND_VOLUME_DEVICE_OUT_SPEAKER, /**< Device builtin speaker */
907 MM_SOUND_VOLUME_DEVICE_OUT_RECEIVER, /**< Device builtin receiver */
908 MM_SOUND_VOLUME_DEVICE_OUT_WIRED_ACCESSORY, /**< Wired output devices such as headphone, headset, and so on. */
909 MM_SOUND_VOLUME_DEVICE_OUT_BT_SCO, /**< Bluetooth SCO device */
910 MM_SOUND_VOLUME_DEVICE_OUT_BT_A2DP, /**< Bluetooth A2DP device */
911 MM_SOUND_VOLUME_DEVICE_OUT_DOCK, /**< DOCK device */
912 MM_SOUND_VOLUME_DEVICE_OUT_HDMI, /**< HDMI device */
913 MM_SOUND_VOLUME_DEVICE_OUT_MIRRORING, /**< MIRRORING device */
914 MM_SOUND_VOLUME_DEVICE_OUT_USB_AUDIO, /**< USB Audio device */
915 MM_SOUND_VOLUME_DEVICE_OUT_MULTIMEDIA_DOCK, /**< Multimedia DOCK device */
916 } mm_sound_volume_device_out_t;
918 #define MM_SOUND_ROUTE_NUM 16
919 #define MM_SOUND_NAME_NUM 32
922 * MMSound Device APIs
926 MM_SOUND_DEVICE_IO_DIRECTION_IN_FLAG = 0x0001, /**< Flag for input devices */
927 MM_SOUND_DEVICE_IO_DIRECTION_OUT_FLAG = 0x0002, /**< Flag for output devices */
928 MM_SOUND_DEVICE_IO_DIRECTION_BOTH_FLAG = 0x0004, /**< Flag for input/output devices (both directions are available) */
929 MM_SOUND_DEVICE_TYPE_INTERNAL_FLAG = 0x0010, /**< Flag for built-in devices */
930 MM_SOUND_DEVICE_TYPE_EXTERNAL_FLAG = 0x0020, /**< Flag for external devices */
931 MM_SOUND_DEVICE_STATE_DEACTIVATED_FLAG = 0x1000, /**< Flag for deactivated devices */
932 MM_SOUND_DEVICE_STATE_ACTIVATED_FLAG = 0x2000, /**< Flag for activated devices */
933 MM_SOUND_DEVICE_ALL_FLAG = 0xFFFF, /**< Flag for all devices */
934 } mm_sound_device_flags_e;
937 MM_SOUND_DEVICE_IO_DIRECTION_IN = 0x1,
938 MM_SOUND_DEVICE_IO_DIRECTION_OUT = 0x2,
939 MM_SOUND_DEVICE_IO_DIRECTION_BOTH = MM_SOUND_DEVICE_IO_DIRECTION_IN | MM_SOUND_DEVICE_IO_DIRECTION_OUT,
940 } mm_sound_device_io_direction_e;
943 MM_SOUND_DEVICE_STATE_DEACTIVATED,
944 MM_SOUND_DEVICE_STATE_ACTIVATED,
945 } mm_sound_device_state_e;
949 MM_SOUND_DEVICE_TYPE_BUILTIN_SPEAKER, /**< Built-in speaker. */
950 MM_SOUND_DEVICE_TYPE_BUILTIN_RECEIVER, /**< Built-in receiver. */
951 MM_SOUND_DEVICE_TYPE_BUILTIN_MIC, /**< Built-in mic. */
952 MM_SOUND_DEVICE_TYPE_AUDIOJACK, /**< Audio jack such as headphone, headset, and so on. */
953 MM_SOUND_DEVICE_TYPE_BLUETOOTH, /**< Bluetooth */
954 MM_SOUND_DEVICE_TYPE_BLUETOOTH_A2DP = MM_SOUND_DEVICE_TYPE_BLUETOOTH, /**< Bluetooth A2DP */
955 MM_SOUND_DEVICE_TYPE_HDMI, /**< HDMI. */
956 MM_SOUND_DEVICE_TYPE_MIRRORING, /**< MIRRORING. */
957 MM_SOUND_DEVICE_TYPE_USB_AUDIO, /**< USB Audio. */
958 MM_SOUND_DEVICE_TYPE_BLUETOOTH_SCO, /**< Bluetooth SCO */
959 } mm_sound_device_type_e;
961 typedef void *MMSoundDevice_t; /**< MMsound Device handle */
962 typedef void *MMSoundDeviceList_t; /**< MMsound Device list handle */
963 typedef void (*mm_sound_device_connected_cb) (MMSoundDevice_t device_h, bool is_connected, void *user_data);
964 typedef void (*mm_sound_device_info_changed_cb) (MMSoundDevice_t device_h, int changed_info_type, void *user_data);
965 typedef void (*mm_sound_device_state_changed_cb) (MMSoundDevice_t device_h, mm_sound_device_state_e state, void *user_data);
967 int mm_sound_add_device_connected_callback(int flags, mm_sound_device_connected_cb func, void *user_data, unsigned int *id);
968 int mm_sound_remove_device_connected_callback(unsigned int id);
969 int mm_sound_add_device_information_changed_callback(int flags, mm_sound_device_info_changed_cb func, void *user_data, unsigned int *id);
970 int mm_sound_remove_device_information_changed_callback(unsigned int id);
971 int mm_sound_add_device_state_changed_callback(int flags, mm_sound_device_state_changed_cb func, void *user_data, unsigned int *id);
972 int mm_sound_remove_device_state_changed_callback(unsigned int id);
974 int mm_sound_get_current_device_list(mm_sound_device_flags_e device_mask, MMSoundDeviceList_t *device_list);
975 int mm_sound_get_device_list(int device_mask, MMSoundDeviceList_t *device_list);
976 int mm_sound_free_device_list(MMSoundDeviceList_t device_list);
977 int mm_sound_get_next_device (MMSoundDeviceList_t device_list, MMSoundDevice_t *device);
978 int mm_sound_get_prev_device (MMSoundDeviceList_t device_list, MMSoundDevice_t *device);
979 int mm_sound_get_device_type(MMSoundDevice_t device_h, mm_sound_device_type_e *type);
980 int mm_sound_get_device_io_direction(MMSoundDevice_t device_h, mm_sound_device_io_direction_e *io_direction);
981 int mm_sound_get_device_id(MMSoundDevice_t device_h, int *id);
982 int mm_sound_get_device_state(MMSoundDevice_t device_h, mm_sound_device_state_e *state);
983 int mm_sound_get_device_name(MMSoundDevice_t device_h, char **name);
986 * Active device changed callback function type.
988 * @param user_data [in] Argument passed when callback has called
990 * @return No return value
992 * @see mm_sound_add_active_device_changed_callback mm_sound_remove_active_device_changed_callback
994 typedef void (*mm_sound_active_device_changed_cb) (mm_sound_device_in device_in, mm_sound_device_out device_out, void *user_data);
996 typedef void (*mm_sound_test_cb) (int a, void *user_data);
997 int mm_sound_test(int a, int b, int* get);
998 int mm_sound_add_test_callback(mm_sound_test_cb func, void *user_data, unsigned int *id);
999 int mm_sound_remove_test_callback(unsigned int sub_id);
1001 void mm_sound_convert_volume_type_to_stream_type(int volume_type, char *stream_type);
1004 MM_SOUND_SIGNAL_RELEASE_INTERNAL_FOCUS,
1005 MM_SOUND_SIGNAL_MAX,
1006 } mm_sound_signal_name_t;
1008 typedef void (*mm_sound_signal_callback) (mm_sound_signal_name_t signal_type, int value, void *user_data);
1009 int mm_sound_subscribe_signal(mm_sound_signal_name_t signal_type, unsigned int *subscribe_id, mm_sound_signal_callback callback, void *user_data);
1010 int mm_sound_subscribe_signal_for_daemon(mm_sound_signal_name_t signal_type, int client_pid, unsigned int *subscribe_id, mm_sound_signal_callback callback, void *user_data);
1011 void mm_sound_unsubscribe_signal(unsigned int subscribe_id);
1012 int mm_sound_send_signal(mm_sound_signal_name_t signal_type, int value);
1013 int mm_sound_get_signal_value(mm_sound_signal_name_t signal_type, int *value);
1014 int mm_sound_is_stream_on_device(int stream_id, MMSoundDevice_t device_h, bool *is_on);
1024 #endif /* __MM_SOUND_H__ */