diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/mm_camcorder_internal.c | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 6631a03..abcaccb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,6 +45,7 @@ libmmfcamcorder_la_CFLAGS = -I$(srcdir)/include \ $(SNDFILE_CFLAGS) \ $(CAMSRCJPEGENC_CFLAGS) \ $(VCONF_CFLAGS) \ + $(PMAPI_CFLAGS) \ $(AUDIOSESSIONMGR_CFLAGS) libmmfcamcorder_la_LIBADD = \ @@ -60,6 +61,7 @@ libmmfcamcorder_la_LIBADD = \ $(SNDFILE_LIBS) \ $(CAMSRCJPEGENC_LIBS) \ $(VCONF_LIBS) \ + $(PMAPI_LIBS) \ $(AUDIOSESSIONMGR_LIBS) libmmfcamcorder_la_CFLAGS += $(MMLOGSVR_CFLAGS) -DMMF_LOG_OWNER=0x010 -DMMF_DEBUG_PREFIX=\"MMF-CAMCORDER\" -D_INTERNAL_SESSION_MANAGER_ diff --git a/src/mm_camcorder_internal.c b/src/mm_camcorder_internal.c index 6300f8b..1cf1f61 100644 --- a/src/mm_camcorder_internal.c +++ b/src/mm_camcorder_internal.c @@ -40,6 +40,8 @@ #include <mm_session_private.h> #include <audio-session-manager.h> +#include <pmapi.h> + /*--------------------------------------------------------------------------------------- | GLOBAL VARIABLE DEFINITIONS for internal | ---------------------------------------------------------------------------------------*/ @@ -626,6 +628,10 @@ int _mmcamcorder_realize(MMHandleType handle) _mmcam_dbg_log("VCONFKEY_CAMERA_STATE prev %d -> cur %d", vconf_camera_state, VCONFKEY_CAMERA_STATE_OPEN); + + /* LOCK PM control */ + pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW | HOLD_KEY_BLOCK, 0); + _mmcam_dbg_log("LOCK PM State"); } /* Set async state */ @@ -894,6 +900,10 @@ int _mmcamcorder_unrealize(MMHandleType handle) _mmcam_dbg_log("VCONFKEY_CAMERA_STATE prev %d -> cur %d", vconf_camera_state, VCONFKEY_CAMERA_STATE_NULL); + + /* UNLOCK PM State */ + pm_unlock_state(LCD_NORMAL, PM_RESET_TIMER); + _mmcam_dbg_log("UNLOCK PM State"); } _MMCAMCORDER_UNLOCK_CMD(hcamcorder); |