4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
\r
6 * Contact: Seungbae Shin <seungbae.shin@samsung.com>
\r
8 * Licensed under the Apache License, Version 2.0 (the "License");
\r
9 * you may not use this file except in compliance with the License.
\r
10 * You may obtain a copy of the License at
\r
12 * http://www.apache.org/licenses/LICENSE-2.0
\r
14 * Unless required by applicable law or agreed to in writing, software
\r
15 * distributed under the License is distributed on an "AS IS" BASIS,
\r
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
17 * See the License for the specific language governing permissions and
\r
18 * limitations under the License.
\r
22 #ifndef __MM_SOUND_COMMON_H__
\r
23 #define __MM_SOUND_COMMON_H__
\r
25 ///////////////////////////////////
\r
26 //// MMSOUND VOLUME APIs
\r
27 ///////////////////////////////////
\r
28 #define VCONF_KEY_VOLUME_PREFIX "file/private/sound/volume"
\r
29 #define VCONF_KEY_VOLUME_TYPE_SYSTEM VCONF_KEY_VOLUME_PREFIX"/system"
\r
30 #define VCONF_KEY_VOLUME_TYPE_NOTIFICATION VCONF_KEY_VOLUME_PREFIX"/notification"
\r
31 #define VCONF_KEY_VOLUME_TYPE_ALARM VCONF_KEY_VOLUME_PREFIX"/alarm"
\r
32 #define VCONF_KEY_VOLUME_TYPE_RINGTONE VCONF_KEY_VOLUME_PREFIX"/ringtone"
\r
33 #define VCONF_KEY_VOLUME_TYPE_MEDIA VCONF_KEY_VOLUME_PREFIX"/media"
\r
34 #define VCONF_KEY_VOLUME_TYPE_CALL VCONF_KEY_VOLUME_PREFIX"/call"
\r
35 #define VCONF_KEY_VOLUME_TYPE_VOIP VCONF_KEY_VOLUME_PREFIX"/voip"
\r
36 #define VCONF_KEY_VOLUME_TYPE_ANDROID VCONF_KEY_VOLUME_PREFIX"/fixed"
\r
37 #define VCONF_KEY_VOLUME_TYPE_JAVA VCONF_KEY_VOLUME_PREFIX"/java"
\r
39 #define ASM_READY_KEY "memory/Sound/ASMReady"
\r
41 #define MMSOUND_ENTER_CRITICAL_SECTION(x_mutex) \
\r
42 switch ( pthread_mutex_lock( x_mutex ) ) \
\r
45 debug_warning("try mutex init..\n"); \
\r
46 if( 0 > pthread_mutex_init( x_mutex, NULL) ) { \
\r
55 debug_error("mutex lock failed\n"); \
\r
59 #define MMSOUND_ENTER_CRITICAL_SECTION_WITH_RETURN(x_mutex,x_return) \
\r
60 switch ( pthread_mutex_lock( x_mutex ) ) \
\r
63 debug_warning("try mutex init..\n"); \
\r
64 if( 0 > pthread_mutex_init( x_mutex, NULL) ) { \
\r
73 debug_error("mutex lock failed\n"); \
\r
77 #define MMSOUND_LEAVE_CRITICAL_SECTION(x_mutex) \
\r
78 if( pthread_mutex_unlock( x_mutex ) ) { \
\r
79 debug_error("mutex unlock failed\n"); \
\r
82 #endif /* __MM_SOUND_COMMON_H__ */
\r