diff options
author | Seungbae Shin <seungbae.shin@samsung.com> | 2012-08-21 17:59:19 +0900 |
---|---|---|
committer | Seungbae Shin <seungbae.shin@samsung.com> | 2012-08-21 20:51:34 +0900 |
commit | 4b557013c69aba50fe1197bf556d4c24dc9f96e3 (patch) | |
tree | 296377f274d9c20213753ec0710116a18f5745d4 /server/mm_sound_recovery.c | |
parent | 13c42beed719f9c7911c2d82c5c3b6b531a06e55 (diff) | |
download | libmm-sound-4b557013c69aba50fe1197bf556d4c24dc9f96e3.tar.gz libmm-sound-4b557013c69aba50fe1197bf556d4c24dc9f96e3.tar.bz2 libmm-sound-4b557013c69aba50fe1197bf556d4c24dc9f96e3.zip |
2.0 init
Change-Id: I1fccce4dee3e9a772dc8b9b3580296eaad513a77
Diffstat (limited to 'server/mm_sound_recovery.c')
-rw-r--r-- | server/mm_sound_recovery.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/server/mm_sound_recovery.c b/server/mm_sound_recovery.c index 7d601b6..20f7637 100644 --- a/server/mm_sound_recovery.c +++ b/server/mm_sound_recovery.c @@ -26,7 +26,9 @@ #include <vconf.h> #include <avsys-audio.h> +#include "../include/mm_sound.h" #include "include/mm_sound_common.h" +#include "include/mm_sound_mgr_session.h" int sound_system_bootup_recovery() @@ -36,10 +38,14 @@ int sound_system_bootup_recovery() VCONF_KEY_VOLUME_TYPE_RINGTONE, VCONF_KEY_VOLUME_TYPE_MEDIA, VCONF_KEY_VOLUME_TYPE_CALL, VCONF_KEY_VOLUME_TYPE_ANDROID,VCONF_KEY_VOLUME_TYPE_JAVA, VCONF_KEY_VOLUME_TYPE_MEDIA}; int vol[AVSYS_AUDIO_VOLUME_TYPE_MAX] = {5,7,6,13,7,7,0,11,11}, i=0; +#ifdef SEPARATE_EARPHONE_VOLUME + mm_sound_device_in device_in = MM_SOUND_DEVICE_OUT_NONE; + mm_sound_device_out device_out = MM_SOUND_DEVICE_OUT_NONE; +#endif - for(i=0; i<AVSYS_AUDIO_VOLUME_TYPE_MAX; i++) { - if(vconf_get_int(keystr[i], (int*)&vol[i])) { - if(vconf_set_int(keystr[i], vol[i])) { + for (i=0; i<AVSYS_AUDIO_VOLUME_TYPE_MAX; i++) { + if (vconf_get_int(keystr[i], (int*)&vol[i])) { + if (vconf_set_int(keystr[i], vol[i])) { debug_error("Error on volume vconf key %s\n", keystr[i]); } else { debug_error("Set %s to default value %d\n", keystr[i], vol[i]); @@ -47,6 +53,15 @@ int sound_system_bootup_recovery() } else { debug_msg("Volume value of %s is %d\n", keystr[i], vol[i]); } +#ifdef SEPARATE_EARPHONE_VOLUME + /* Get volume value of current device */ + MMSoundMgrSessionGetDeviceActive(&device_out, &device_in); + if (device_out == MM_SOUND_DEVICE_OUT_WIRED_ACCESSORY) { + vol[i] = vol[i] >> 8; + } else { + vol[i] = vol[i] & 0x00FF; + } +#endif } err = avsys_audio_hibernation_reset(vol); |