【原创】在全志A64平台点亮GC2145(分色排版)V1.0

在全志A64平台点亮GC2145

大文实验室出品

2017/5/25 15:13

版本:V1.0

小技巧,直接在全志A64的SDK中搜索ov5640(默认是几乎通的),全部替换为gc2145即可。

rootroot@rootroot-E400:~/wyb$ cd gc2145_bpi_a64_android/
rootroot@rootroot-E400:~/wyb/gc2145_bpi_a64_android$ grep ov5640 . -R

1、

R:\wyb\gc2145_bpi_a64_android\android\device\softwinner\bpi-m64-lcd\configs\camera.cfg

;-------------------------------------------------------------------------------

; 用于camera的配置
;
; 采用格式:

; key = key_value

; 注意: 每个key需要顶格写;

; key_value紧跟着key后面的等号后面, 位于同一行中;

; key_value限制大小为256字节以内;

;

; exif information of “make” and “model”

;-------------------------------------------------------------------------------

key_camera_exif_make = MAKE_A64

key_camera_exif_model = MODEL_A64

;-------------------------------------------------------------------------------

; 1 for single camera, 2 for double camera

;-------------------------------------------------------------------------------

number_of_camera = 1

;-------------------------------------------------------------------------------

; CAMERA_FACING_BACK

; ov5640 gc2145

;-------------------------------------------------------------------------------

camera_id = 0

;-------------------------------------------------------------------------------

; 1 for CAMERA_FACING_FRONT

; 0 for CAMERA_FACING_BACK

;-------------------------------------------------------------------------------

camera_facing = 0

;-------------------------------------------------------------------------------

; 1 for camera without isp(using built-in isp of Axx)

; 0 for camera with isp

;-------------------------------------------------------------------------------

use_builtin_isp = 0

;-------------------------------------------------------------------------------

; camera orientation (0, 90, 180, 270)

;-------------------------------------------------------------------------------

camera_orientation = 180

;-------------------------------------------------------------------------------

; driver device name

;-------------------------------------------------------------------------------

camera_device = /dev/video0

;-------------------------------------------------------------------------------

; device id

; for two camera devices with one CSI

;-------------------------------------------------------------------------------

device_id = 0

used_preview_size = 1

key_support_preview_size = 640x480

key_default_preview_size = 640x480

used_picture_size = 1

key_support_picture_size = 1600x1200, 1280x720, 800x600, 640x480

;key_support_picture_size = 1600x1200, 640x480

key_default_picture_size = 640x480

used_flash_mode = 0

key_support_flash_mode = on,off,auto

key_default_flash_mode = on

used_color_effect = 1

key_support_color_effect = none,mono,negative,sepia,aqua

key_default_color_effect = none

used_frame_rate = 1

key_support_frame_rate = 30

key_default_frame_rate = 30

used_focus_mode = 1

key_support_focus_mode = auto,infinity,macro,fixed,continuous-video,continuous-picture

key_default_focus_mode = auto

used_scene_mode = 0

key_support_scene_mode = auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,barcode

key_default_scene_mode = auto

used_white_balance = 1

key_support_white_balance = auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight

key_default_white_balance = auto

used_exposure_compensation = 1

key_max_exposure_compensation = 3

key_min_exposure_compensation = -3

key_step_exposure_compensation = 1

key_default_exposure_compensation = 0

key_horizonal_view_angle = 48.6

key_vertical_view_angle = 37.0

used_zoom = 1

key_zoom_supported = true

key_smooth_zoom_supported = false

key_zoom_ratios = 100,120,150,200,230,250,300

key_max_zoom = 30

key_default_zoom = 0

2、

R:\wyb\gc2145_bpi_a64_android\android\device\softwinner\bpi-m64-lcd\init.sun50iw1p1.rc

# csi module

insmod /system/vendor/modules/videobuf2-core.ko

insmod /system/vendor/modules/videobuf2-memops.ko

insmod /system/vendor/modules/videobuf2-dma-contig.ko

insmod /system/vendor/modules/vfe_io.ko

insmod /system/vendor/modules/actuator.ko

insmod /system/vendor/modules/dw9714_act.ko

#insmod /system/vendor/modules/ov5640.ko

insmod /system/vendor/modules/gc2145.ko

insmod /system/vendor/modules/vfe_v4l2.ko

3、(可选操作:)

R:\wyb\gc2145_bpi_a64_android\android\device\softwinner\bpi-m64-lcd\ueventd.sun50iw1p1.rc

/dev/video0 0770 media media

#/dev/video1 0770 media media

4、

R:\wyb\gc2145_bpi_a64_android\lichee\linux-3.10\arch\arm64\boot\dts\sun50iw1p1.dtsi

	csi0:vfe@0 {

		device_type= "csi0";

		compatible = "allwinner,sunxi-vfe";

		interrupts = <GIC_SPI 84 4>;/*SUNXI_IRQ_CSI0 (SUNXI_GIC_START + 84 ) = 116*/

		pinctrl-names 		= "default","sleep";

		pinctrl-0 			= <&csi0_pins_a>;

		pinctrl-1 			= <&csi0_pins_b>;

		cci_sel			= <0>;

		csi_sel			= <0>;

		mipi_sel			= <0>;

		isp_sel			= <0>;

		csi0_sensor_list	= <0>;

		csi0_mck 			= <&pio PE 1 1 0 1 0>; /*PE1 .mul_sel = 1, .pull = 0, .drv_level = 1, .data = 0*/

		status = "okay";

		csi0_dev0:dev@0{

			csi0_dev0_mname         = "ov5640";

			修改为:

			csi0_dev0_mname         = "gc2145";

			

			csi0_dev0_twi_addr      = <0x78>;

			csi0_dev0_pos			= "rear";

			csi0_dev0_isp_used      = <1>;

			csi0_dev0_fmt           = <0>;

			csi0_dev0_stby_mode     = <0>;

			csi0_dev0_vflip         = <0>;

			csi0_dev0_hflip         = <0>;

			csi0_dev0_iovdd         = "iovdd-csi";

			csi0_dev0_iovdd_vol     = <2800000>;

			csi0_dev0_avdd          = "avdd-csi";

			csi0_dev0_avdd_vol      = <2800000>;

			csi0_dev0_dvdd          = "dvdd-csi-18";

			csi0_dev0_dvdd_vol      = <1500000>;

			csi0_dev0_afvdd         = "";

			csi0_dev0_afvdd_vol     = <>;

			csi0_dev0_power_en		= <>;

			csi0_dev0_reset 		= <&pio PE 14 1 0 1 0>; /*PE14 .mul_sel = 1, .pull = 0, .drv_level = 1, .data = 0*/

			csi0_dev0_pwdn 			= <&pio PE 15 1 0 1 0>; /*PE15 .mul_sel = 1, .pull = 0, .drv_level = 1, .data = 0*/

			csi0_dev0_flash_used	= <1>;

			csi0_dev0_flash_type	= <2>;

			csi0_dev0_flash_en		= <>;

			csi0_dev0_flash_mode	= <>;

			csi0_dev0_flvdd         = "vdd-csi-led";

			csi0_dev0_flvdd_vol     = <3300000>;

			csi0_dev0_af_pwdn		= <>;

			csi0_dev0_act_used      = <0>;

			csi0_dev0_act_name      = "ad5820_act";

			csi0_dev0_act_slave		= <0x18>;

			status	= "okay";

		};

……

	};

5、

R:\wyb\gc2145_bpi_a64_android\lichee\linux-3.10\drivers\media\platform\sunxi-vfe\device\Makefile

(小技巧,可以除了gc2145之外的全部的摄像头驱动都用#注释掉,以减少编译时间和生成的IMG的体积!)

obj-m += ov5640.o

obj-m += ov2640.o

#obj-m += ov7736.o

#obj-m += s5k4ec.o

#obj-m += s5k4ec_mipi.o

#obj-m += gc2035.o

#obj-m += gt2005.o

#obj-m += gc0307.o

obj-m += gc0308.o

#obj-m += gc0328.o

#obj-m += gc0328c.o

obj-m += gc2145.o

#obj-m += gc0329.o

#obj-m += gc0311.o

#obj-m += hi253.o

#obj-m += sp2518.o

#obj-m += sp2519.o

#obj-m += sp0718.o

#obj-m += sp0838.o

#obj-m += ov16825.o

#obj-m += ov5650.o

#obj-m += ov5647.o

#obj-m += ov5647_mipi.o

#obj-m += t8et5.o

#obj-m += s5k4e1.o

#obj-m += s5k4e1_mipi.o

#obj-m += sp2518.o

#obj-m += sp0718.o

#obj-m += gc5004.o

#obj-m += gc5004_mipi.o

#obj-m += ov5648.o

#obj-m += ar0330.o

#obj-m += ov5648.o

#obj-m += sp5408.o

#obj-m += ov12830.o

#obj-m += ov8825.o

#obj-m += ov8850.o

#obj-m += gc2155.o

#obj-m += ov8858.o

#obj-m += ov13850.o

#obj-m += imx214.o

#obj-m += ov8858_4lane.o

#obj-m += sp5409.o

#obj-m += s5k5e2yx.o

#obj-m += ov2710_mipi.o

#obj-m += ov2686.o

6、

R:\wyb\gc2145_bpi_a64_android\lichee\linux-3.10\drivers\media\platform\sunxi-vfe\utility\sensor_info.c

struct sensor_item sensor_list_t] =

{

//         name                  i2c_addr               sensor type               sensor size          sensor max pclk

{	"ov2640"		,	0x60,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"ov5640"		,	0x78,		SENSOR_YUV	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"ov5647"		,	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"ov5647_mipi"	,	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"ov5650"		,	0x50,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"ov5648"		,	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"ov8825"		, 	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_8M		, CORE_CLK_RATE_FOR_8M},

{	"ov8850"		, 	0x20,		SENSOR_RAW	,	 PIXEL_NUM_8M		, CORE_CLK_RATE_FOR_8M},

{	"ov12830"		, 	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_12M		, CORE_CLK_RATE_FOR_16M},

{	"ov16825"		, 	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_16M		, CORE_CLK_RATE_FOR_16M},

{	"gc0329"		,	0x62,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc0309"		,	0x42,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc0307"		,	0x42,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc0308"		,	0x42,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc2035"		,	0x78,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"gt2005"		,	0x78,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"gc2015"		,	0x60,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"gc2235"		,	0x78,		SENSOR_RAW	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"sp0838"		,	0x30,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"sp0718"		, 	0x6c,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"sp2518"		, 	0x6c,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"hi253"			,	0x40,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"hi257"			,	0x40,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"s5k4ec"		,	0x5a,		SENSOR_YUV	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"s5k4ec_mipi"	,	0x5a,		SENSOR_YUV	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"s5k4e1"		,	0x20,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"s5k4e1_mipi"	,	0x20,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"t4k05"			, 	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_8M		, CORE_CLK_RATE_FOR_8M},

{	"t8et5"			,	0x78,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"ar0330"		,	0x20,		SENSOR_RAW	,	 PIXEL_NUM_3M		, CORE_CLK_RATE_FOR_3M},

{	"bf3a03"		,	0xDC,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc0311"		,	0x66,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc0311"		,	0x66,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc5004"		,	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"gc5004_mipi"	,	0x6c,		SENSOR_RAW	,	 PIXEL_NUM_5M		, CORE_CLK_RATE_FOR_5M},

{	"nt99252"		,	0x6c,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"ov7736"		,	0x42,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc2145"		,	0x78,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"gc2155"		,	0x78,		SENSOR_YUV	,	 PIXEL_NUM_2M		, CORE_CLK_RATE_FOR_2M},

{	"gc0328c"		,	0x42,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

{	"gc0328"		,	0x42,		SENSOR_YUV	,	 PIXEL_NUM_0_3M		, CORE_CLK_RATE_FOR_2M},

};

7、

R:\wyb\gc2145_bpi_a64_android\lichee\linux-3.10\drivers\media\platform\sunxi-vfe\config.c

struct ccm_config ccm0_def_cfg] = {

{

	.ccm = "ov5640",

	修改为:

	.ccm = "gc2145",

	.twi_id = 1,

	.i2c_addr = 0x78,

	.is_isp_used = 0,

	.is_bayer_raw = 0,

	.vflip = 0,

	.hflip = 0,

	.iovdd_str = "",

	.avdd_str = "",

	.dvdd_str = "",

	.afvdd_str = "",

	.flvdd_str = "",

	.power = {

		.stby_mode = 1,

		.iovdd_vol =2800000, /* voltage of sensor module for interface */

		.avdd_vol =2800000,  /* voltage of sensor module for analog */

		.dvdd_vol =1500000,	 /* voltage of sensor module for core */

		.afvdd_vol =2800000, /* voltage of sensor module for vcm sink */

		.flvdd_vol = 3300000,/* voltage of sensor module for flash led */

	},

	.gpio = {

		[MCLK_PIN] = {.gpio = GPIOE(1)/*129*/, .mul_sel = 1, .pull = 0, .drv_level = 1, .data = 0,},

		[RESET] = {GPIOE(14)/*142*/, 1, 0, 1, 0,},

		[PWDN] = {GPIOE(15)/*143*/, 1, 0, 1, 0,},

		[POWER_EN] = {GPIO_INDEX_INVALID, 	   0, 0, 0, 0,},

= {GPIO_INDEX_INVALID, 0, 0, 0, 0,},

= {GPIO_INDEX_INVALID, 0, 0, 0, 0,},

		[AF_PWDN] =  {GPIO_INDEX_INVALID, 	 0, 0, 0, 0,},

	},

	.flash_used = 0,

	.flash_type = 0,	

	.act_used = 0,

	.act_name = "ad5820_act",

	.act_slave = 0x18,

},

};

8、

R:\wyb\gc2145_bpi_a64_android\lichee\tools\pack\chips\sun50iw1p1\configs\bpi-m64-lcd\sys_config.fex

;--------------------------------------------------------------------------------

;csi (COMS Sensor Interface) configuration

;csi(x)_dev(x)_used: 0:disable 1:enable

;csi(x)_dev(x)_isp_used 0:not use isp 1:use isp

;csi(x)_dev(x)_fmt: 0:yuv 1:bayer raw rgb

;csi(x)_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby

;csi(x)_dev(x)_vflip: flip in vertical direction 0:disable 1:enable

;csi(x)_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable

;csi(x)_dev(x)_iovdd: camera module io power handle string, pmu power supply

;csi(x)_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply

;csi(x)_dev(x)_avdd: camera module analog power handle string, pmu power supply

;csi(x)_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply

;csi(x)_dev(x)_dvdd: camera module core power handle string, pmu power supply

;csi(x)_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply

;csi(x)_dev(x)_afvdd: camera module vcm power handle string, pmu power supply

;csi(x)_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply

;fill voltage in uV, e.g. iovdd = 2.8V, csix_iovdd_vol = 2800000

;fill handle string as below:

;axp22_eldo3

;axp22_dldo4

;axp22_eldo2

;fill handle string “” when not using any pmu power supply

;--------------------------------------------------------------------------------

[csi0]

csi0_used = 1

csi0_sensor_list = 1

修改为:

csi0_sensor_list = 0

csi0_pck = port:PE00<2>

csi0_mck = port:PE01<0><0><1><0>

修改为:

csi0_mck = port:PE01<2>

csi0_hsync = port:PE02<2>

csi0_vsync = port:PE03<2>

csi0_d0 = port:PE04<2>

csi0_d1 = port:PE05<2>

csi0_d2 = port:PE06<2>

csi0_d3 = port:PE07<2>

csi0_d4 = port:PE08<2>

csi0_d5 = port:PE09<2>

csi0_d6 = port:PE10<2>

csi0_d7 = port:PE11<2>

csi0_sck = port:PE12<2>

csi0_sda = port:PE13<2>

[csi0/csi0_dev0]

csi0_dev0_used = 1

csi0_dev0_mname = “ov5640”

修改为:

csi0_dev0_mname = “gc2145”

csi0_dev0_twi_addr = 0x78

csi0_dev0_pos = “rear”

csi0_dev0_isp_used = 1

csi0_dev0_fmt = 0

csi0_dev0_stby_mode = 0

csi0_dev0_vflip = 1

csi0_dev0_hflip = 1

csi0_dev0_iovdd = “avdd-csi”

csi0_dev0_iovdd_vol = 2800000

csi0_dev0_avdd = “avdd-csi”

csi0_dev0_avdd_vol = 2800000

csi0_dev0_dvdd = “dvdd-csi-18”

csi0_dev0_dvdd_vol = 1500000

csi0_dev0_afvdd = “avdd-csi”

csi0_dev0_afvdd_vol = 2800000

csi0_dev0_power_en =

csi0_dev0_reset = port:PE16<0><0><1><0>

csi0_dev0_pwdn = port:PE17<0><0><1><0>

csi0_dev0_flash_used = 0

csi0_dev0_flash_type = 2

csi0_dev0_flash_en =

csi0_dev0_flash_mode =

csi0_dev0_flvdd = “”

csi0_dev0_flvdd_vol =

csi0_dev0_af_pwdn =

csi0_dev0_act_used = 1

csi0_dev0_act_name = “dw9714_act”

csi0_dev0_act_slave = 0x18

小缺陷:

本文的方法是可以点亮gc2145,并且可以以VGA分辨率预览,以1600x1200, 1280x720, 800x600, 640x480拍照正常。但是录像出错(480P/720P)。愿意不明。

出错的logcat:

01-01 09:30:51.417 8118 8118 I CAM_VideoModule: startVideoRecording: Thread[main,5,main]

01-01 09:30:51.418 8118 8118 V CAM_VideoUI: mFocusRing.stopFocusAnimations()

01-01 09:30:51.418 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:51.423 8118 12119 D CAM_Storage: External storage state=mounted

01-01 09:30:51.435 8118 8118 I CAM_VideoModule: initializeRecorder: Thread[main,5,main]

01-01 09:30:51.440 3592 6982 W StagefrightRecorder: Max file duration is not positive: 0 us. Disabling duration limit.

01-01 09:30:51.440 3592 6982 W StagefrightRecorder: Target duration (0 us) too short to be respected

01-01 09:30:51.440 8118 8118 D CAM_LcyLocProvider: No location received yet.

01-01 09:30:51.441 8118 8118 D CAM_LcyLocProvider: No location received yet.

01-01 09:30:51.441 8118 8118 V CAM_VideoModule: New video filename: /storage/emulated/0/DCIM/Camera/VID_20100101_093051.mp4.tmp

01-01 09:30:51.449 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:51.452 3592 7016 D awplayer: <get_omx_component_factory_fn:276>: ----get_omx_component_factory_fn

01-01 09:30:51.452 3592 7016 D awplayer: getCallingProcessName:263: Calling process is: com.android.camera2

01-01 09:30:51.452 3592 7016 D awplayer: <omx_venc:353>: omx_enc Create!

01-01 09:30:51.452 3592 7016 D awplayer: <component_init:433>: COMPONENT_INIT, name = OMX.allwinner.video.encoder.avc

01-01 09:30:51.452 3592 7016 E OMXNodeInstance: getParameter(48:allwinner.encoder.avc, ParamVideoProfileLevelQuerySupported(0x600000f)) ERROR: BadParameter(0x80001005)

01-01 09:30:51.452 3592 7016 W ACodec : do not know color format 0x7f000789 = 2130708361

01-01 09:30:51.452 3592 7016 D awplayer: <component_deinit:2055>: component_deinit

01-01 09:30:51.453 3592 23420 D awplayer: ComponentThread:2989: x stop command.

01-01 09:30:51.453 3592 23421 D awplayer: ComponentVencThread:3895: vencThread detect nStopFlag[1], exit!

01-01 09:30:51.454 3592 7016 D awplayer: <check_lib_unload:394>: Unloading the dynamic library for OMX.allwinner.video.encoder.avc

01-01 09:30:51.454 3592 7016 W StagefrightRecorder: Intended video encoding bit rate (8000000 bps) is too large and will be set to (3000000 bps)

01-01 09:30:51.455 3592 7016 E CameraSource: Video dimension (1280x720) is unsupported

01-01 09:30:51.456 8118 8118 E MediaRecorder: start failed: -19

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: Could not start media recorder.

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: java.lang.RuntimeException: start failed.

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at android.media.MediaRecorder.start(Native Method)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at com.android.camera.VideoModule$11.onStorageUpdateDone(VideoModule.java:1384)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at com.android.camera.CameraActivity$22.onPostExecute(CameraActivity.java:2449)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at com.android.camera.CameraActivity$22.onPostExecute(CameraActivity.java:2444)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at android.os.AsyncTask.finish(AsyncTask.java:651)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at android.os.AsyncTask.-wrap1(AsyncTask.java)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at android.os.Handler.dispatchMessage(Handler.java:102)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at android.os.Looper.loop(Looper.java:148)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at android.app.ActivityThread.main(ActivityThread.java:5417)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at java.lang.reflect.Method.invoke(Native Method)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:742)

01-01 09:30:51.456 8118 8118 E CAM_VideoModule: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: Handling Camera Access Failure:

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: java.lang.Exception

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at com.android.camera.FatalErrorHandlerImpl.onGenericCameraAccessFailure(FatalErrorHandlerImpl.java:84)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at com.android.camera.VideoModule$11.onStorageUpdateDone(VideoModule.java:1387)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at com.android.camera.CameraActivity$22.onPostExecute(CameraActivity.java:2449)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at com.android.camera.CameraActivity$22.onPostExecute(CameraActivity.java:2444)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at android.os.AsyncTask.finish(AsyncTask.java:651)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at android.os.AsyncTask.-wrap1(AsyncTask.java)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at android.os.Handler.dispatchMessage(Handler.java:102)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at android.os.Looper.loop(Looper.java:148)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at android.app.ActivityThread.main(ActivityThread.java:5417)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at java.lang.reflect.Method.invoke(Native Method)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:742)

01-01 09:30:51.457 8118 8118 E CAM_FatalErrorHandler: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)

01-01 09:30:51.457 8118 8118 E CAM_CameraUtil: Show fatal error dialog

01-01 09:30:51.479 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:51.495 8118 8118 I CAM_VideoModule: Releasing media recorder.

01-01 09:30:51.495 8118 8118 V CAM_VideoModule: Empty video file deleted: /storage/emulated/0/DCIM/Camera/VID_20100101_093051.mp4.tmp

01-01 09:30:51.512 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:51.523 1662 1711 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 460800 Bytes uncached buffer successfully, usage = 0x00000102

01-01 09:30:51.542 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:51.560 1662 6985 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 372992 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:51.567 1662 3540 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 372992 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:51.569 1662 3540 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 372992 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:51.570 1662 3540 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 372992 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:51.572 3592 23109 W CameraHardware: unknow focus status: -1

……

01-01 09:30:54.283 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:54.290 3592 4390 V audio_hw_primary: out_set_parameters: routing=2

01-01 09:30:54.291 3592 4390 V audio_hw_primary: out_set_parameters, line: 1561

01-01 09:30:54.291 3592 4390 V audio_hw_primary: >>>>>>>> adev->mode:0,adev->out_device is: 2, val is : 2

01-01 09:30:54.297 1662 6985 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 293760 Bytes cached buffer successfully, usage = 0x00000333

01-01 09:30:54.303 3592 4390 V audio_hw_primary: start_output_stream, line: 1230

01-01 09:30:54.303 3592 4390 D audio_hw_primary: >>>>>> select_device

01-01 09:30:54.304 3592 4390 V audio_hw_primary: active_output, ****LINE:1050,FUNC:select_device, adev->out_device:2

01-01 09:30:54.304 3592 4390 V audio_hw_primary: ****LINE:1056,FUNC:select_device, headset_on:0, headphone_on:0, speaker_on:2, earpiece_on:0, bt_on:0

01-01 09:30:54.304 3592 4390 V audio_hw_primary: ****LINE:1083,FUNC:select_device, output_device_id:6

01-01 09:30:54.304 3592 4390 V audio_hw_primary: NORMAL mode, ****LINE:1087,FUNC:select_device, adev->out_device:2

01-01 09:30:54.305 3592 4390 V audio_hw_primary: start_output_stream: card:0, port:0, rate:44100, period_count:3, period_size:1024

01-01 09:30:54.305 3592 4390 V audio_hw_primary: do not use out resampler

01-01 09:30:54.313 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:54.334 8118 8118 V CAM_QuickActivity: START onPause: Activity = com.android.camera.CameraActivity@849fdfb

01-01 09:30:54.334 8118 8118 V CAM_QuickActivity: onPause --> onPauseTasks()

01-01 09:30:54.334 8118 8118 V CAM_Profiler: 0.000ms][ui] GUARD: CameraActivity.onPause - START

01-01 09:30:54.334 8118 8118 V CAM_VideoModule: stopPreview

01-01 09:30:54.335 3592 7019 D V4L2CameraDevice: V4L2CameraDevice::stopDevice

01-01 09:30:54.335 3592 3845 W CameraHardware: CMD_QUEUE_STOP_FACE_DETECTE failed, mFaceDetection not opened.

01-01 09:30:54.335 3592 7019 W V4L2CameraDevice: wait until capture thread pause or exit

01-01 09:30:54.343 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:54.373 3592 23109 W CameraHardware: unknow focus status: -1

01-01 09:30:54.387 3592 3840 W V4L2CameraDevice: should stop capture now

01-01 09:30:54.388 8118 8118 I CAM_VideoModule: closeCamera

01-01 09:30:54.388 8118 8118 I CAM_VideoModule: Releasing media recorder.

01-01 09:30:54.389 8118 8118 W OrientationEventListener: Cannot detect sensors. Invalid disable

01-01 09:30:54.389 8118 8118 V CAM_LcyLocProvider: stopping location updates

01-01 09:30:54.390 8118 8118 D CAM_LcyLocProvider: stopReceivingLocationUpdates

01-01 09:30:54.390 8118 8118 V CAM_CameraActivity: onPause closing camera

01-01 09:30:54.390 8118 8118 V CAM_CameraController: Closing camera

01-01 09:30:54.391 3592 3845 W CameraHardware: CMD_QUEUE_STOP_FACE_DETECTE failed, mFaceDetection not opened.

01-01 09:30:54.391 3592 6916 W CameraHardware: wait for auto focus thread exit

01-01 09:30:54.403 3592 23109 D CameraHardware: autoFocusThread exited

01-01 09:30:54.426 3592 4390 D AudioFlinger: mixer(0xf23c0000) throttle end: throttle time(33)

01-01 09:30:54.574 3592 23110 D CallbackNotifier: savePictureThread exit, line: 1515

01-01 09:30:54.576 3592 6916 I CameraFlashlight: Destroying camera 0

01-01 09:30:54.680 3592 6916 D HALCameraFactory: There is 1 attached cameras and 0 removable cameras

01-01 09:30:54.682 3592 6916 I CameraService: disconnect: Disconnected client for camera 0 for PID 8118

01-01 09:30:54.683 8118 8118 I CAM_Profiler: [348.659ms][ui] GUARD: CameraActivity.onPause - STOP

01-01 09:30:54.683 8118 8118 V CAM_QuickActivity: END onPause: Activity = com.android.camera.CameraActivity@849fdfb

01-01 09:30:54.683 3592 6787 D NuPlayerDriver: reset(0xf2223900)

01-01 09:30:54.683 3592 6787 D NuPlayerDriver: notifyListener_l(0xf2223900), (8, 0, 0)

01-01 09:30:54.684 3592 23091 D NuPlayerDriver: notifyResetComplete(0xf2223900)

01-01 09:30:54.685 3592 6787 D NuPlayerDriver: reset(0xf22233c0)

01-01 09:30:54.685 3592 6787 D NuPlayerDriver: notifyListener_l(0xf22233c0), (8, 0, 0)

01-01 09:30:54.686 3592 23096 D NuPlayerDriver: notifyResetComplete(0xf22233c0)

01-01 09:30:54.686 1663 1674 D Sayeye : current scense is (Normal)

01-01 09:30:54.686 3592 6787 D NuPlayerDriver: reset(0xf2223420)

01-01 09:30:54.686 3592 6787 D NuPlayerDriver: notifyListener_l(0xf2223420), (8, 0, 0)

01-01 09:30:54.687 1663 1674 E Sayeye : failed to open /sys/devices/soc.0/1c2ac00.twi/i2c-0/0-0040/runtime_suspend, No such file or directory

01-01 09:30:54.687 1663 1674 D Sayeye : Scense (Normal) state set succeed

01-01 09:30:54.689 5340 5422 I DynamicPManagerService: Current Scense:normal

01-01 09:30:54.689 3592 23098 D NuPlayerDriver: notifyResetComplete(0xf2223420)

01-01 09:30:54.725 1662 1711 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 1536000 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:54.734 1662 6985 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 1536000 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:54.736 1662 6985 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 1536000 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:54.739 1662 6985 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 1536000 Bytes uncached buffer successfully, usage = 0x00000f02

01-01 09:30:54.792 8118 8118 V CAM_CameraAppUI: SurfaceTexture is destroyed

01-01 09:30:54.792 8118 8118 V CAM_VideoModule: Skip stopPreview since it’s not mPreviewing

01-01 09:30:54.792 8118 8118 D CAM_VideoUI: surfaceTexture is destroyed

01-01 09:30:54.892 5340 5431 I ActivityManager: Timeline: Activity_windows_visible id: com.android.launcher3 time:3917412

01-01 09:30:54.896 5340 5419 I ActivityManager: Killing 7908:com.android.calendar/u0a20 (adj 15): empty for 3819s

01-01 09:30:54.955 8118 8118 V CAM_QuickActivity: START onStop: Activity = com.android.camera.CameraActivity@849fdfb

01-01 09:30:54.955 8118 8118 D CAM_LcyLocProvider: disconnect

01-01 09:30:54.955 8118 8118 V CAM_QuickActivity: END onStop: Activity = com.android.camera.CameraActivity@849fdfb

01-01 09:30:54.956 8118 8118 V CAM_QuickActivity: START onDestroy: Activity = com.android.camera.CameraActivity@849fdfb

01-01 09:30:54.961 8118 8118 V CAM_QuickActivity: END onDestroy: Activity = com.android.camera.CameraActivity@849fdfb

01-01 09:30:54.968 1663 1674 D Sayeye : current scense is (Normal)

01-01 09:30:54.969 1663 1674 E Sayeye : failed to open /sys/devices/soc.0/1c2ac00.twi/i2c-0/0-0040/runtime_suspend, No such file or directory

01-01 09:30:54.969 1663 1674 D Sayeye : Scense (Normal) state set succeed

01-01 09:30:54.969 5340 5422 I DynamicPManagerService: Current Scense:normal

^C

130|shell@bpi-m64-lcd:/ $