*/
if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL) {
+#ifdef MURPHY
+ if(!ASM_register_sound((int)param->param, ¶m->session_handle, param->session_type, ASM_STATE_PLAYING,
+ sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode)) {
+#else
if(!ASM_register_sound_ex((int)param->param, ¶m->session_handle, param->session_type, ASM_STATE_PLAYING,
sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode, __asm_process_message)) {
+#endif
debug_critical("ASM_register_sound() failed %d\n", errorcode);
pthread_mutex_unlock(&g_slot_mutex);
return MM_ERROR_POLICY_INTERNAL;
cleanup:
if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL && need_asm_unregister == 1) {
+#ifdef MURPHY
+ if(!ASM_unregister_sound(param->session_handle, param->session_type, &errorcode)) {
+#else
if(!ASM_unregister_sound_ex(param->session_handle, param->session_type, &errorcode,__asm_process_message)) {
+#endif
debug_error("Unregister sound failed 0x%X\n", errorcode);
return MM_ERROR_POLICY_INTERNAL;
}
int need_asm_unregister = 0;
if(param->session_type != ASM_EVENT_CALL && param->session_type != ASM_EVENT_VIDEOCALL) {
+#ifdef MURPHY
+ if(!ASM_register_sound((int)param->param, ¶m->session_handle, param->session_type, ASM_STATE_PLAYING,
+ sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode)) {
+#else
if(!ASM_register_sound_ex((int)param->param, ¶m->session_handle, param->session_type, ASM_STATE_PLAYING,
sound_codec_asm_callback, (void*)*slotid, ASM_RESOURCE_NONE, &errorcode, __asm_process_message)) {
+#endif
debug_critical("ASM_register_sound() failed %d\n", errorcode);
pthread_mutex_unlock(&g_slot_mutex);
return MM_ERROR_POLICY_INTERNAL;
if(g_slots[param].session_type != ASM_EVENT_CALL && g_slots[param].session_type != ASM_EVENT_VIDEOCALL) {
debug_msg("[CODEC MGR] ASM unregister\n");
+#ifdef MURPHY
+ if(!ASM_unregister_sound(g_slots[param].session_handle, g_slots[param].session_type, &errorcode)) {
+#else
if(!ASM_unregister_sound_ex(g_slots[param].session_handle, g_slots[param].session_type, &errorcode, __asm_process_message)) {
+#endif
debug_error("[CODEC MGR] Unregister sound failed 0x%X\n", errorcode);
}
}
/* ------------------------- ASM ------------------------------------*/
static pthread_mutex_t _asm_mutex = PTHREAD_MUTEX_INITIALIZER;
+#ifndef MURPHY
static bool _asm_register_for_headset (int * handle)
{
int asm_error = 0;
return true;
}
+#endif
/* ------------------------- INTERNAL FUNCTIONS ------------------------------------*/
return;
}
+#ifndef MURPHY
/* if bt was active, then do asm pause */
debug_msg("Do pause here");
_asm_pause_process (g_info.asm_handle);
+#endif
/* set bt device to none */
debug_msg("Deactivate BT_A2DP device\n");
return;
}
+#ifndef MURPHY
/* if bt was active, then do asm pause */
debug_msg("Do pause here");
_asm_pause_process (g_info.asm_handle);
+#endif
/* set bt device to none */
debug_msg("Deactivate WIRED IN/OUT device\n");
return;
}
+#ifndef MURPHY
/* if HDMI was active, then do asm pause */
debug_msg("Do pause here");
_asm_pause_process (g_info.asm_handle);
+#endif
/* set DOCK device to none */
debug_msg("Deactivate HDMIdevice\n");
return;
}
+#ifndef MURPHY
/* if WFD was active, then do asm pause */
debug_msg("Do pause here");
_asm_pause_process (g_info.asm_handle);
+#endif
/* set WFD device to none */
debug_msg("Deactivate WFD device\n");
return;
}
+#ifndef MURPHY
/* if device was active, then do asm pause */
debug_msg("Do pause here");
_asm_pause_process (g_info.asm_handle);
+#endif
/* set bt device to none */
debug_msg("Deactivate USB Audio device\n");
/* FIXME: Initial status should be updated */
__set_initial_active_device ();
+#ifndef MURPHY
/* Register for headset unplug */
if (_asm_register_for_headset (&g_info.asm_handle) == false) {
debug_error ("Failed to register ASM for headset\n");
}
+#endif
debug_fleave();
debug_fenter();
+#ifndef MURPHY
/* Unregister for headset unplug */
_asm_unregister_for_headset (&g_info.asm_handle);
+#endif
debug_fleave();