Exemple #1
0
/*
* FUNCTION
*	   IMGPROC_Close
*
* DESCRIPTION
*   	Release the ownership of IMGPORC
*
* CALLS
*
* PARAMETERS
*
* RETURNS
*	   None
*
* GLOBALS AFFECTED
*     imgproc_dcb.owner
*/
kal_int32 API IMGPROC_Close(MMDI_SCENERIO_ID owner)
{
#if (defined(DRV_IDP_6219_SERIES))
	ASSERT(imgproc_dcb.owner == owner);
	IMGPROC_Stop(owner);
	IMGPROC_RESET();
	IMGPROC_DISABLE_INT();
	kal_mem_set(&imgproc_dcb,0,sizeof(IMGPROC_DCB_STRUCT));
   DRVPDN_Enable(DRVPDN_CON3,DRVPDN_CON3_IMGPROC,PDN_IMGPROC);
#endif
	return NO_ERROR;
}
Exemple #2
0
/*************************************************************************
* FUNCTION
*	exit_usbvideo_camera_preview
*
* DESCRIPTION
*	This function exit camera preview
*
* PARAMETERS
*	None
*
* RETURNS
*	None
*
* GLOBALS AFFECTED
*
*************************************************************************/
void exit_usbvideo_camera_preview(void)
{
	uvideos_CameraStopPreview();
#if 0//JiaShuo Delete for webcam
	if (sensor_err_check<0)
		return ;
	
	if (usbvideo_cam_operation_state==USBVIDEO_CAM_PREVIEW_CHECK_STATE)
	{
   	kal_uint32 save_irq_mask;

     	save_irq_mask=SaveAndSetIRQMask();
   	usbvideo_cam_operation_state=USBVIDEO_CAM_STANDBY_STATE;
  	   RestoreIRQMask(save_irq_mask);
#if (!defined(YUV_SENSOR_SUPPORT))	
   	ae_on_off(KAL_FALSE);
   	awb_on_off(KAL_FALSE);
#endif   	
#if  (!defined(DRV_ISP_6225_SERIES))
      if(jpeg_encoder_operation_state==JPEG_ENCODER_ENCODING_STATE)
      {
   		kal_uint32 i;      	
   		/* wait until JPEG encode completely */
   		for (i=0;i<20;i++)
   		{
   			kal_sleep_task(20);
				if ((jpeg_encoder_encode_result & JPEG_ENCODE_STALL)||
					 (jpeg_encoder_encode_result & JPEG_ENCODE_DONE))
   				i=100;
   		}
   		DISABLE_CMOS_SESNOR;
   		DISABLE_VIEW_FINDER_MODE;
#if (defined(DRV_ISP_6219_SERIES)||defined(DRV_ISP_6227_SERIES))
   		RESZ_Stop(scene_id);
   		RESZ_Close(scene_id);

   		clean_imgprc_coefficient(scene_id);
   		IMGPROC_Stop(scene_id);
   		IMGPROC_Close(scene_id);

   		stop_image_dma(scene_id);
   		IMGDMA_Close(scene_id);

   		intmem_deinit();
   		extmem_deinit();
#elif (defined(DRV_ISP_6228_SERIES)||defined(DRV_ISP_6229_SERIES))      
			close_image_data_path(scene_id);
#endif      
      }
#elif (defined(DRV_ISP_6225_SERIES))	
       		DISABLE_CMOS_SESNOR;
       		DISABLE_VIEW_FINDER_MODE;		           
            RESZ_Stop(scene_id); 
            RESZ_Close(scene_id);
            
            intmem_deinit();
            extmem_deinit();
#endif      
      
   }
   else if (usbvideo_cam_operation_state!=USBVIDEO_CAM_STANDBY_STATE)
      ASSERT(0);
#if (!defined(DRV_ISP_6225_SERIES))			                 
   jpeg_codec_power_down();
#endif
#endif
}	/* exit_usbvideo_camera_preview() */