#define DPM_DISALLOWED 0
#ifdef _MMCAMCORDER_MURPHY_SUPPORT
-#define __MMCAMCORDER_RESOURCE_WAIT_TIME 5
+#define __MMCAMCORDER_RESOURCE_WAIT_TIME 3
#endif /* _MMCAMCORDER_MURPHY_SUPPORT */
if (info->videodev_type != MM_VIDEO_DEVICE_NONE) {
/* init for gdbus */
+ hcamcorder->gdbus_info_sound.mm_handle = hcamcorder;
g_mutex_init(&hcamcorder->gdbus_info_sound.sync_mutex);
g_cond_init(&hcamcorder->gdbus_info_sound.sync_cond);
+
+ hcamcorder->gdbus_info_solo_sound.mm_handle = hcamcorder;
g_mutex_init(&hcamcorder->gdbus_info_solo_sound.sync_mutex);
g_cond_init(&hcamcorder->gdbus_info_solo_sound.sync_cond);
}
if (dpm_camera_state == DPM_DISALLOWED) {
_mmcam_dbg_err("CAMERA DISALLOWED by DPM");
ret = MM_ERROR_POLICY_RESTRICTED;
+
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "camera");
+
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
} else {
if (dpm_mic_state == DPM_DISALLOWED) {
_mmcam_dbg_err("MIC DISALLOWED by DPM");
ret = MM_ERROR_COMMON_INVALID_PERMISSION;
+
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "microphone");
+
goto _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK;
}
} else {
_mmcamcorder_send_message((MMHandleType)hcamcorder, &msg);
}
- }
- goto DROP_MESSAGE;
+ goto DROP_MESSAGE;
+ }
}
if (err) {
}
}
+ /* reset flag not to run sound focus related code since now */
+ hcamcorder->sound_focus_register = FALSE;
+
_MMCAMCORDER_UNLOCK_ASM(hcamcorder);
_mmcam_dbg_warn("done");
if (focus_state == FOCUS_IS_RELEASED) {
_MMCamcorderMsgItem msg;
- _mmcam_dbg_log("other process's FOCUS is acquired");
+ _mmcam_dbg_log("other process's FOCUS is released");
msg.id = MM_MESSAGE_READY_TO_RESUME;
_mmcamcorder_send_message((MMHandleType)hcamcorder, &msg);
_mmcam_dbg_log("Finish opeartion");
} else if (focus_state == FOCUS_IS_ACQUIRED) {
- _mmcam_dbg_log("other process's FOCUS is released : Stop pipeline[state:%d]", current_state);
+ _mmcam_dbg_log("other process's FOCUS is acquired : Stop pipeline[state:%d]", current_state);
__mmcamcorder_force_stop(hcamcorder);
hcamcorder->state_change_by_system = _MMCAMCORDER_STATE_CHANGE_NORMAL;
_MMCAMCORDER_UNLOCK_ASM(hcamcorder);
+
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "camera");
}
_mmcam_dbg_warn("done");
_mmcam_dbg_warn("Stop recording.");
while ((itr_cnt--) && ((result = _mmcamcorder_commit((MMHandleType)hcamcorder)) != MM_ERROR_NONE)) {
- _mmcam_dbg_warn("Can't commit.(%x)", result);
+ _mmcam_dbg_warn("Can't commit.(%x), cancel it.", result);
+ _mmcamcorder_cancel((MMHandleType)hcamcorder);
}
break;
_MMCAMCORDER_UNLOCK_ASM(hcamcorder);
+ _mmcamcorder_request_dpm_popup(hcamcorder->gdbus_conn, "microphone");
+
return MM_ERROR_POLICY_RESTRICTED;
}
}