Make ASM handling external.
[profile/ivi/libmm-sound.git] / server / mm_sound_mgr_codec.c
index 849de31..2dc6f7d 100644 (file)
@@ -241,8 +241,8 @@ int MMSoundMgrCodecPlay(int *slotid, const mmsound_mgr_codec_param_t *param)
         */
 
        if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL) {
-               if(!ASM_register_sound_ex((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
-                                                               sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode, __asm_process_message))        {
+               if(!ASM_register_sound((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
+                                                               sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode))       {
                        debug_critical("ASM_register_sound() failed %d\n", errorcode);
                        pthread_mutex_unlock(&g_slot_mutex);
                        return MM_ERROR_POLICY_INTERNAL;
@@ -286,7 +286,7 @@ int MMSoundMgrCodecPlay(int *slotid, const mmsound_mgr_codec_param_t *param)
 
 cleanup:
        if(param->session_type != ASM_EVENT_CALL  && param->session_type != ASM_EVENT_VIDEOCALL && need_asm_unregister == 1) {
-               if(!ASM_unregister_sound_ex(param->session_handle, param->session_type, &errorcode,__asm_process_message)) {
+               if(!ASM_unregister_sound(param->session_handle, param->session_type, &errorcode)) {
                        debug_error("Unregister sound failed 0x%X\n", errorcode);
                        return MM_ERROR_POLICY_INTERNAL;
                }
@@ -358,8 +358,8 @@ int MMSoundMgrCodecPlayDtmf(int *slotid, const mmsound_mgr_codec_param_t *param)
        int need_asm_unregister = 0;
 
        if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL) {
-               if(!ASM_register_sound_ex((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
-                                                               sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode, __asm_process_message)) {
+               if(!ASM_register_sound((int)param->param, &param->session_handle, param->session_type, ASM_STATE_PLAYING,
+                                                               sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode)) {
                        debug_critical("ASM_register_sound() failed %d\n", errorcode);
                        pthread_mutex_unlock(&g_slot_mutex);
                        return MM_ERROR_POLICY_INTERNAL;
@@ -454,7 +454,7 @@ static int _MMSoundMgrCodecStopCallback(int param)
 
        if(g_slots[param].session_type != ASM_EVENT_CALL && g_slots[param].session_type != ASM_EVENT_VIDEOCALL) {
                debug_msg("[CODEC MGR] ASM unregister\n");
-               if(!ASM_unregister_sound_ex(g_slots[param].session_handle, g_slots[param].session_type, &errorcode, __asm_process_message)) {
+               if(!ASM_unregister_sound(g_slots[param].session_handle, g_slots[param].session_type, &errorcode)) {
                        debug_error("[CODEC MGR] Unregister sound failed 0x%X\n", errorcode);
                }
        }