CM-Huawei-P8-Development / device_gra_l09

Device tree
7 stars 16 forks source link

Feature: Camera #2

Closed AD2076 closed 7 years ago

AD2076 commented 7 years ago

Have a look here: https://github.com/Meticulus/android_device_huawei_hi6250/commit/abd6d8d671da9c6f042e851b3cbed9dff76f1f37

worth a try

Nexolight commented 7 years ago

Ok started to investigate. The Camerapp itself fails due to not finding any camera. I assume This HwCamCfgSrv is required to initialize the camera as it's done in the vendors init.rc files.

For completeness I will note the steps I did just in case it won't succeed at the end and someone wan't to pick up the work.

(Copied files are mentioned when not already in proprietary-files.txt)

Copying

/system/bin/HwCamCfgSvr
/system/lib/libHWCamCfgSvr.so
/system/lib64/libHWCamCfgSvr.so
/system/lib/libHWCamCfgSvr_jni.so
/system/lib64/libHWCamCfgSvr_jni.so

Executing HwCamCfgSvr hi3635 GRACE

Results in:

01-19 14:17:14.956 10585 10585 E ImagingSystem: failed to dlopen(/system/lib/hwcam/hwcam.hi3635.m.GRACE.so)!
01-19 14:17:14.956 10585 10585 F ImagingSystem: hw::CNoAddRefRelease4T<T>* hw::CIntfPtrBase<T>::operator->() const [with T = hw::IImagingSyst
em; hw::CIntfPtrBase<T>::_TPtrNoAddRefRelease = hw::CNoAddRefRelease4T<hw::IImagingSystem>*]: SHOULD NOT BE NULL!
01-19 14:17:14.957 10585 10585 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 10585 (HwCamCfgSvr)
01-19 14:17:14.957  2925  2925 I DEBUG   : property debug.db.uid not set; NOT waiting for gdb.
01-19 14:17:14.957  2925  2925 I DEBUG   : HINT: adb shell setprop debug.db.uid 100000
01-19 14:17:14.957  2925  2925 I DEBUG   : HINT: adb forward tcp:5039 tcp:5039
01-19 14:17:15.008  2925  2925 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-19 14:17:15.008  2925  2925 F DEBUG   : CM Version: '13.0-20161228-UNOFFICIAL-hwgra'
01-19 14:17:15.008  2925  2925 F DEBUG   : Build fingerprint: 'HUAWEI/cm_hwgra/hwgra:6.0.1/MOB31K/8f0c8d25f6:userdebug/test-keys'
01-19 14:17:15.008  2925  2925 F DEBUG   : Revision: '0'
01-19 14:17:15.008  2925  2925 F DEBUG   : ABI: 'arm'
01-19 14:17:15.008  2925  2925 F DEBUG   : pid: 10585, tid: 10585, name: HwCamCfgSvr  >>> HwCamCfgSvr <<<
01-19 14:17:15.009  2925  2925 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-19 14:17:15.009  3307  3463 W NativeCrashListener: Couldn't find ProcessRecord for pid 10585
01-19 14:17:15.011  2925  2925 F DEBUG   : Abort message: 'hw::CNoAddRefRelease4T<T>* hw::CIntfPtrBase<T>::operator->() const [with T = hw::IImagingSystem; hw::CIntfPtrBase<T>::_TPtrNoAddRefRelease = hw::CNoAddRefRelease4T<hw::IImagingSystem>*]: SHOULD NOT BE NULL!
01-19 14:17:15.011  2925  2925 F DEBUG   : '
01-19 14:17:15.011  2925  2925 E DEBUG   : AM write failed: Broken pipe
01-19 14:17:15.011  2925  2925 F DEBUG   :     r0 00000000  r1 00002959  r2 00000006  r3 f7264b8c
01-19 14:17:15.011  2925  2925 F DEBUG   :     r4 f7264b94  r5 f7264b44  r6 00000002  r7 0000010c
01-19 14:17:15.011  2925  2925 F DEBUG   :     r8 00000000  r9 00000000  sl 00000000  fp ffb25a7c
01-19 14:17:15.011  2925  2925 F DEBUG   :     ip 00000006  sp ffb255a0  lr f712b54d  pc f712d93c  cpsr 400f0010
01-19 14:17:15.014  2925  2925 F DEBUG   :
01-19 14:17:15.014  2925  2925 F DEBUG   : backtrace:
01-19 14:17:15.015  2925  2925 F DEBUG   :     #00 pc 0004293c  /system/lib/libc.so (tgkill+12)
01-19 14:17:15.015  2925  2925 F DEBUG   :     #01 pc 00040549  /system/lib/libc.so (pthread_kill+32)
01-19 14:17:15.015  2925  2925 F DEBUG   :     #02 pc 0001c44f  /system/lib/libc.so (raise+10)
01-19 14:17:15.015  2925  2925 F DEBUG   :     #03 pc 00019601  /system/lib/libc.so (__libc_android_abort+34)
01-19 14:17:15.015  2925  2925 F DEBUG   :     #04 pc 00017514  /system/lib/libc.so (abort+4)
01-19 14:17:15.015  2925  2925 F DEBUG   :     #05 pc 0000355b  /system/lib/liblog.so (__android_log_assert+86)
01-19 14:17:15.015  2925  2925 F DEBUG   :     #06 pc 0000ab89  /system/bin/HwCamCfgSvr
01-19 14:17:15.015  2925  2925 F DEBUG   :     #07 pc 000068f5  /system/bin/HwCamCfgSvr
01-19 14:17:15.015  2925  2925 F DEBUG   :     #08 pc 000173c1  /system/lib/libc.so (__libc_init+44)
01-19 14:17:15.015  2925  2925 F DEBUG   :     #09 pc 000069d4  /system/bin/HwCamCfgSvr
01-19 14:17:15.065  2925  2925 F DEBUG   :
01-19 14:17:15.065  2925  2925 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_08
01-19 14:17:15.067  3307  3324 I BootReceiver: Copying /data/tombstones/tombstone_08 to DropBox (SYSTEM_TOMBSTONE)
01-19 14:17:15.108  3307  3469 W BroadcastQueue: Permission Denial: receiving Intent { act=andr
/system/lib/libjpegenchw.so
/system/lib64/libjpegenchw.so
/system/lib/libjpu.so
/system/lib64/libjpu.so
/system/lib/libcamera_ae.so
/system/lib/libcamera_algo.so
/system/lib/libcamera_flash.so
/system/lib/libcamera_af.so
/system/lib/libCameraHwExtend.so
/system/lib64/libCameraHwExtend.so
/system/etc/camera **(whole folder)**
/system/lib/libjni_mrc_cg_filters_camera.so
/system/lib/libjni_front_panorama_camera.so
/system/lib/libjnidcamera_visual_effect.so
Nexolight commented 7 years ago

These are enough to get our perfhub to run - appiled in 6ddaafe631c083d1f375b34f7e08209e584501d4

/system/lib/libperfhub_client.so
/system/lib/libperfhub.so 
/system/lib/libperfhub_service.so 
/system/bin/perfhub 
/system/etc/permissions/com.hisi.perfhub.xml 
/system/lib64/libperfhub_client.so 
/system/lib64/libperfhub.so 
/system/lib64/libperfhub_service.so

The libs above require this one:

/system/lib/libhwuibp.so
/system/lib64/libhwuibp.so

There's a missing symbol located in:

/system/lib/libhwui.so
/system/lib64/libhwui.so

We need to shimlib this library with the vendor lib!

Nexolight commented 7 years ago

There's a feature-camera branch now for WIP

Nexolight commented 7 years ago

There's a line in the kernel message:

01-21 02:28:32.480 <4>[  770.909851s][2017:01:21 02:28:32][pid:8759,cpu1,ispreq][CAMERA]ERROR: open file error!

and there's only a single file in the kernel which has this line:

drivers/media/huawei/camera/isp/ovisp2.3/isp_ops.c

The function is called load_firmware and takes a pointer to a filename. So it might be that it just can't find the firmware (?)

Nexolight commented 7 years ago

Got HwCamCfgSvr to run without crashing immediately and the logs look promising!

*The branch is up to date; I go to sleep now.

AD2076 commented 7 years ago

Have a look in vendor6.0/system/fpgaice40 and import those files.

AD2076 commented 7 years ago

isp.bin is in system/isp libHW_BShutter.so, imedia_filters.so and libSmartAE.so are system/lib (not in lib64)

libmorpho_effect_library5.so looks like a Mate S lib (after a quick google search) I'd have a look here: https://github.com/papsi177 honor7 and P8 are almost the same phone

Nexolight commented 7 years ago

thx I will look at it at thursday

Nexolight commented 7 years ago

I usually look into both lib folders and copy both in case they are there. So the ones you mentioned are already in place Except libHW_BShutter.so which doesn't exist (no issue according to the logs), the files in system/fpgaice40 and the system/isp/isp.bin file. I will try it.

Nexolight commented 7 years ago

Get a segmentation fault when starting the camera:

01-30 18:54:22.750  2929  2929 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-30 18:54:22.750  2929  2929 F DEBUG   : CM Version: '13.0-20170120-UNOFFICIAL-hwgra'
01-30 18:54:22.750  2929  2929 F DEBUG   : Build fingerprint: 'HUAWEI/cm_hwgra/hwgra:6.0.1/MOB31K/3c96ef6e76:userdebug/test-keys'
01-30 18:54:22.750  2929  2929 F DEBUG   : Revision: '0'
01-30 18:54:22.750  2929  2929 F DEBUG   : ABI: 'arm'
01-30 18:54:22.750  2929  2929 F DEBUG   : pid: 4302, tid: 9286, name: Processer  >>> /system/bin/HwCamCfgSvr <<<
01-30 18:54:22.750  3348  3477 W NativeCrashListener: Couldn't find ProcessRecord for pid 4302
01-30 18:54:22.750  2929  2929 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x441abd59
01-30 18:54:22.763  2929  2929 F DEBUG   :     r0 441abd59  r1 441abd59  r2 00000000  r3 00000007
01-30 18:54:22.763  2929  2929 E DEBUG   : AM write failed: Broken pipe
01-30 18:54:22.763  2929  2929 F DEBUG   :     r4 ffffffff  r5 f6e9b698  r6 ebc7a338  r7 ede3e68b
01-30 18:54:22.763  2929  2929 F DEBUG   :     r8 ebc7a334  r9 0000000c  sl eea1e478  fp ebc77d4d
01-30 18:54:22.763  2929  2929 F DEBUG   :     ip 80000000  sp eea1e358  lr f708d9b5  pc f705f916  cpsr a00f0030
01-30 18:54:22.769  2929  2929 F DEBUG   :
01-30 18:54:22.769  2929  2929 F DEBUG   : backtrace:
01-30 18:54:22.769  2929  2929 F DEBUG   :     #00 pc 00018916  /system/lib/libc.so (strlen+21)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #01 pc 000469b1  /system/lib/libc.so (__strlen_chk+4)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #02 pc 0054ee08  /system/vendor/lib/libGLES_mali.so
01-30 18:54:22.769  2929  2929 F DEBUG   :     #03 pc 0054bb9c  /system/vendor/lib/libGLES_mali.so
01-30 18:54:22.769  2929  2929 F DEBUG   :     #04 pc 0054b0a4  /system/vendor/lib/libGLES_mali.so
01-30 18:54:22.769  2929  2929 F DEBUG   :     #05 pc 00545f18  /system/vendor/lib/libGLES_mali.so
01-30 18:54:22.769  2929  2929 F DEBUG   :     #06 pc 00539b14  /system/vendor/lib/libGLES_mali.so
01-30 18:54:22.769  2929  2929 F DEBUG   :     #07 pc 0052af04  /system/vendor/lib/libGLES_mali.so (clCreateProgramWithBinary+276)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #08 pc 000977c0  /system/lib/libmrc_cg_postprocess_cl.so (_Z12BuildProgramPKci+1280)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #09 pc 000979a0  /system/lib/libmrc_cg_postprocess_cl.so (setupOpencl+32)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #10 pc 000b2821  /system/lib/libcamera_algo.so (_ZN7android18DavinciCLLibLoader11getInstanceEPNS_18HwaDev
iceInterfaceE+380)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #11 pc 0007b6fd  /system/lib/libcamera_algo.so (_ZN7android9PPPrepare5startEv+56)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #12 pc 000747b7  /system/lib/libcamera_algo.so (_ZN7android12MsgProcesser10threadLoopEv+32)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #13 pc 00010139  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #14 pc 0003fe4b  /system/lib/libc.so (_ZL15__pthread_startPv+30)
01-30 18:54:22.769  2929  2929 F DEBUG   :     #15 pc 00019c85  /system/lib/libc.so (__start_thread+6)
Nexolight commented 7 years ago

Meanwhile in kmsgcat over and over again when opening the camera

01-30 22:24:36.050 <4>[ 1667.105773s][2017:01:30 22:24:36][pid:3026,cpu1,ispreq][CAMERA]INFO: firmware download successfully.
01-30 22:24:36.050 <4>[ 1667.105804s][2017:01:30 22:24:36][pid:3026,cpu1,ispreq][CAMERA]NOTICE: hw_isp_poweron isp poweron success. viraddr ffffff800f400000. firmware version:
0x42f
01-30 22:24:36.050 <4>[ 1667.106628s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]INFO: misp_init enter
01-30 22:24:36.091 <4>[ 1667.138793s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]INFO: hwcam_mclk_enable index = 0, enable=1
01-30 22:24:36.110 <4>[ 1667.159057s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]NOTICE: hw_csi_enable enter:csi_index=0,csi_lane=3,csi_mipi_clk=44.
01-30 22:24:36.110 <4>[ 1667.159057s]
01-30 22:24:36.110 <4>[ 1667.159088s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]INFO: hw_csi_enable reg_offset = 0x7f400.
01-30 22:24:36.110 <4>[ 1667.159088s]
01-30 22:24:36.110 <4>[ 1667.159118s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]NOTICE: hw_csi_enable Config CSI to Sensor.
01-30 22:24:36.110 <4>[ 1667.159149s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]INFO: hw_csi_enable request csi-0 irq
01-30 22:24:36.110 <4>[ 1667.159210s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]INFO: Not all data and clock lanes of the D-PHY are in Stop State,phy_state1 : 0x200
01-30 22:24:36.111 <4>[ 1667.159210s][2017:01:30 22:24:36][pid:3015,cpu3,imx278][CAMERA]INFO: D-PHY was not receive a clock
01-30 22:24:36.111 <4>[ 1667.160491s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]NOTICE: enter altek6045_load_firmware.
01-30 22:24:36.111 <4>[ 1667.160522s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: _misp_load_fw enter
01-30 22:24:36.140 <3>[ 1667.188781s][2017:01:30 22:24:36][pid:4566,cpu1,kworker/1:2][E/sensorhub] [iom3][   1661104]ACCEL enable
01-30 22:24:36.140 <3>[ 1667.198760s][2017:01:30 22:24:36][pid:4694,cpu0,kworker/0:1][E/sensorhub] [iom3][   1661120]MAG enable
01-30 22:24:36.140 <3>[ 1667.198791s][2017:01:30 22:24:36][pid:4566,cpu1,kworker/1:2][E/sensorhub] [iom3][   1661120]ACCEL enable
01-30 22:24:36.151 <4>[ 1667.208831s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: start sending boot code... size=0x1480
01-30 22:24:36.160 <4>[ 1667.215515s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: misp_load_boot_code succeed to send 1 blocks
01-30 22:24:36.160 <4>[ 1667.215545s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: misp_load_boot_code boot version: 0.0099 user=YuicheyT
01-30 22:24:36.180 <4>[ 1667.228790s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: start sending basic code... size=0x000a28dc
01-30 22:24:36.180 <4>[ 1667.228820s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: basic code info:addr=0x00013000 chksum=0xd7c64b61
01-30 22:24:36.270 <6>[ 1667.321807s][2017:01:30 22:24:36][pid:5067,cpu2,C3Dev-0-ReqQueu]hwcam_user_create_instance(114, 5067): instance(0xffffffc07618b070)
01-30 22:24:36.270 <6>[ 1667.321838s][2017:01:30 22:24:36][pid:5067,cpu2,C3Dev-0-ReqQueu]hwcam_dev_vo_open(1095, 5067): instance(0xffffffc07618b000, /dev/video1)
01-30 22:24:36.270 <6>[ 1667.322082s][2017:01:30 22:24:36][pid:5063,cpu7,s#1@pl#1]hwcam_cfgstream_create_instance(118, 5063): instance(0xffffffc08bc3cb68)
01-30 22:24:36.270 <6>[ 1667.322906s][2017:01:30 22:24:36][pid:5063,cpu1,s#1@pl#1]compat_get_v4l2_format_data: hwcam type is 0, return ok
01-30 22:24:36.271 <6>[ 1667.323120s][2017:01:30 22:24:36][pid:5067,cpu3,C3Dev-0-ReqQueu]hwcam_user_create_instance(114, 5067): instance(0xffffffc06be90c70)
01-30 22:24:36.271 <6>[ 1667.323120s][2017:01:30 22:24:36][pid:5067,cpu3,C3Dev-0-ReqQueu]hwcam_dev_vo_open(1095, 5067): instance(0xffffffc06be90c00, /dev/video1)
01-30 22:24:36.271 <6>[ 1667.323333s][2017:01:30 22:24:36][pid:5063,cpu0,s#1@pl#1]hwcam_cfgstream_create_instance(118, 5063): instance(0xffffffc08e37f068)
01-30 22:24:36.271 <6>[ 1667.324218s][2017:01:30 22:24:36][pid:5063,cpu2,s#1@pl#1]compat_get_v4l2_format_data: hwcam type is 0, return ok
01-30 22:24:36.271 <6>[ 1667.324615s][2017:01:30 22:24:36][pid:5067,cpu3,C3Dev-0-ReqQueu]hwcam_user_create_instance(114, 5067): instance(0xffffffc06be99070)
01-30 22:24:36.271 <6>[ 1667.324645s][2017:01:30 22:24:36][pid:5067,cpu3,C3Dev-0-ReqQueu]hwcam_dev_vo_open(1095, 5067): instance(0xffffffc06be99000, /dev/video1)
01-30 22:24:36.271 <6>[ 1667.324829s][2017:01:30 22:24:36][pid:5063,cpu2,s#1@pl#1]hwcam_cfgstream_create_instance(118, 5063): instance(0xffffffc093056968)
01-30 22:24:36.271 <6>[ 1667.325744s][2017:01:30 22:24:36][pid:5063,cpu2,s#1@pl#1]compat_get_v4l2_format_data: hwcam type is 0, return ok
01-30 22:24:36.271 <6>[ 1667.326049s][2017:01:30 22:24:36][pid:5067,cpu3,C3Dev-0-ReqQueu]hwcam_user_create_instance(114, 5067): instance(0xffffffc06bea1470)
01-30 22:24:36.271 <6>[ 1667.326080s][2017:01:30 22:24:36][pid:5067,cpu3,C3Dev-0-ReqQueu]hwcam_dev_vo_open(1095, 5067): instance(0xffffffc06bea1400, /dev/video1)
01-30 22:24:36.271 <6>[ 1667.326721s][2017:01:30 22:24:36][pid:5063,cpu2,s#1@pl#1]hwcam_cfgstream_create_instance(118, 5063): instance(0xffffffc08bc51968)
01-30 22:24:36.271 <6>[ 1667.327209s][2017:01:30 22:24:36][pid:5063,cpu2,s#1@pl#1]compat_get_v4l2_format_data: hwcam type is 0, return ok
01-30 22:24:36.420 <4>[ 1667.475860s][2017:01:30 22:24:36][pid:3024,cpu3,extisp][CAMERA]INFO: misp_load_basic_code succeed to send 82 blocks
01-30 22:24:36.420 <4>[ 1667.475921s][2017:01:30 22:24:36][pid:3024,cpu3,extisp][CAMERA]INFO: misp_load_basic_code firmware version: 0.1001 user=tbbuild2
01-30 22:24:36.440 <4>[ 1667.497314s][2017:01:30 22:24:36][pid:1336,cpu0,irq/385-mini_is][CAMERA]INFO: misp irq state=0x0001
01-30 22:24:36.440 <4>[ 1667.497406s][2017:01:30 22:24:36][pid:3024,cpu3,extisp][CAMERA]INFO: _misp_load_fw sucess to load fw.
01-30 22:24:36.450 <4>[ 1667.501220s][2017:01:30 22:24:36][pid:3024,cpu3,extisp][CAMERA]INFO: altek6045_exec_cmd cmd=0xd0092104
01-30 22:24:36.510 <6>[ 1667.561920s][2017:01:30 22:24:36][pid:3316,cpu4,pl#1]hwisp_create_stream(636, 3316): instance(0xffffffc079232000) portid=0
01-30 22:24:36.521 <6>[ 1667.571502s][2017:01:30 22:24:36][pid:3316,cpu4,pl#1]hwisp_create_stream(636, 3316): instance(0xffffffc079231000) portid=2
01-30 22:24:36.521 <6>[ 1667.577972s][2017:01:30 22:24:36][pid:3316,cpu4,pl#1]hwisp_create_stream(636, 3316): instance(0xffffffc079233000) portid=1
01-30 22:24:36.550 <4>[ 1667.599517s][2017:01:30 22:24:36][pid:1336,cpu0,irq/385-mini_is][CAMERA]INFO: misp irq state=0x0001
01-30 22:24:36.550 <4>[ 1667.599548s][2017:01:30 22:24:36][pid:3024,cpu3,extisp][CAMERA]INFO: misp_recv_block - recv block addr=ffffffc0ac9d8800 len=1273
01-30 22:24:36.550 <4>[ 1667.601470s][2017:01:30 22:24:36][pid:3024,cpu3,extisp][CAMERA]INFO: altek6045_exec_cmd cmd=0x40031016
01-30 22:24:36.550 <4>[ 1667.602844s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: altek6045_exec_cmd cmd=0x40191014
01-30 22:24:36.550 <4>[ 1667.604248s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: altek6045_exec_cmd cmd=0x40031022
01-30 22:24:36.550 <4>[ 1667.605712s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: altek6045_exec_cmd cmd=0x40050106
01-30 22:24:36.550 <4>[ 1667.607116s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: altek6045_exec_cmd cmd=0x4007300a
01-30 22:24:36.550 <4>[ 1667.608459s][2017:01:30 22:24:36][pid:3024,cpu1,extisp][CAMERA]INFO: altek6045_exec_cmd cmd=0x40033010
01-30 22:24:36.621 <6>[ 1667.676330s][2017:01:30 22:24:36][pid:0,cpu0,in irq]hwisp_notify_cmd_ready(146, 0): cmd = 5 result = 1
01-30 22:24:36.621 <4>[ 1667.676422s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]enter ddr_isr++++++
01-30 22:24:36.621 <4>[ 1667.676452s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]====================dump ddr register begin========================
01-30 22:24:36.621 <4>[ 1667.676452s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_AXI_INT_STATUS is 0x4
01-30 22:24:36.621 <4>[ 1667.676483s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_QOSB_INTSTS    is 0x0
01-30 22:24:36.621 <4>[ 1667.676483s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_DDRC_INTSTS_DMC0    is 0x0
01-30 22:24:36.621 <4>[ 1667.676513s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_DDRC_INTSTS_DMC1    is 0x0
01-30 22:24:36.621 <4>[ 1667.676513s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]the error port is 0x2
01-30 22:24:36.621 <4>[ 1667.676544s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_SEC_INT_STATUS    is 0x3
01-30 22:24:36.621 <4>[ 1667.676574s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]the fail command1(error type)       is 0x120000
01-30 22:24:36.621 <4>[ 1667.676605s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]access is unprivileged
01-30 22:24:36.621 <4>[ 1667.676635s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]write operation
01-30 22:24:36.621 <4>[ 1667.676635s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]the Master is :
01-30 22:24:36.621 <4>[ 1667.676666s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]unknow Master
01-30 22:24:36.621 <4>[ 1667.676696s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]enter ddr_isr------
01-30 22:24:36.621 <4>[ 1667.676757s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]====================dump ddr register begin========================
01-30 22:24:36.621 <4>[ 1667.676788s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_QOSB_INTSTS    is 0x0
01-30 22:24:36.621 <4>[ 1667.676818s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_DDRC_INTSTS_DMC1    is 0x0
01-30 22:24:36.621 <4>[ 1667.676849s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]REG_SEC_INT_EN    is 0x1
01-30 22:24:36.621 <4>[ 1667.676849s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]the fail command0(low 32 address)  is 0x1400
01-30 22:24:36.621 <4>[ 1667.676879s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]the fail command1(error type)      parse:
01-30 22:24:36.621 <4>[ 1667.676910s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]access is non-secure
01-30 22:24:36.621 <4>[ 1667.676940s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]the fail command2(MasterID)         is 0x32000042
01-30 22:24:36.621 <4>[ 1667.676971s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]port is 0x2, mid is 0x32
01-30 22:24:36.621 <4>[ 1667.677001s][2017:01:30 22:24:36][pid:3027,cpu0,in irq]====================dump ddr register end===================
Nexolight commented 7 years ago

Somehow at least the flashlight comes up for a few seconds when activiating it via the android ui. After a second it stops again. By only using the flashlight the device doesn't crash.

I can use the flashlight frontcamera, backcamera and take pictures. Video recording doesn't work yet.

Nexolight commented 7 years ago

Error when trying to record video

01-31 13:57:17.357  3057  3670 E CameraSource: Requested frame rate (15) is not supported: 25,30
01-31 13:57:17.357  3057  3670 I Camera2Client: unlock: E. mClientPid=3057
01-31 13:57:17.357  6529  6529 E MediaRecorder: start failed: -19
01-31 13:57:17.359  2953  6853 I         : [Grace_0.0.5.0][smartAf]af_doAF: flow: 0, giNumFlagDoAF: 51, afType: 1
01-31 13:57:17.359  2953  6858 W CFilterDownscale: virtual hw::TRetCode hw::CFilterDownscale::receive(hw::IBuffer*): instance[0xf474b200], drop.
01-31 13:57:17.359  2953  6853 D AFDeviceImpl: [90af8a5_D]enter af_get_vsync_time()
01-31 13:57:17.360  3057  6845 I Camera3StreamImpl: instance[0xf1d9af80], dequeue buffer(4) succeed, count(2) still at DRV .
01-31 13:57:17.360  2953  6853 D DeviceImpl: [HWA_CAM3]getActualExposure, exp_time=0x752a
01-31 13:57:17.360  2953  6853 D DeviceImpl: [HWA_CAM3]virtual int hw::DeviceImpl::getAEStatus(android::HwaIppFrame*, int*, int*), get from ov-isp, aecStabe=0x0, currentY=0x10e8
01-31 13:57:17.360  2953  6853 I         : [Grace_0.0.5.0][smartAf]AFGetDeviceInfo: ae_gain  987,ae_stable    0, exposure_time 29994 ae_iso  482 fps   29
01-31 13:57:17.360  6529  6529 E CAM_VideoModule: Could not start media recorder.
01-31 13:57:17.360  6529  6529 E CAM_VideoModule: java.lang.RuntimeException: start failed.
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at android.media.MediaRecorder.start(Native Method)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at com.android.camera.VideoModule$11.onStorageUpdateDone(VideoModule.java:1384)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2424)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2419)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at android.os.AsyncTask.finish(AsyncTask.java:651)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at android.os.AsyncTask.-wrap1(AsyncTask.java)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at android.os.Handler.dispatchMessage(Handler.java:102)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at android.os.Looper.loop(Looper.java:148)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at android.app.ActivityThread.main(ActivityThread.java:5461)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at java.lang.reflect.Method.invoke(Native Method)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-31 13:57:17.360  6529  6529 E CAM_VideoModule:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-31 13:57:17.360  2953  6853 D AFDeviceImpl: [90af8a5_D]enter af_get_mmi_mode()
01-31 13:57:17.360  2953  6853 D AFDeviceImpl: [90af8a5_D]af_get_mmi_mode() result: 0
01-31 13:57:17.360  2953  6853 I         : [Grace_0.0.5.0][smartAf]AFGetInfo:  xyz:[29,0,-5],iso:482,expotime:29994,gain:987,ae_stable:0,fps:29,iAWBratio:256,iZoom:100,iCameraPosStatus:0,iOperatorSwitch:0
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler: Handling Camera Access Failure:
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler: java.lang.Exception
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at com.android.camera.FatalErrorHandlerImpl.onGenericCameraAccessFailure(FatalErrorHandlerImpl.java:84)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at com.android.camera.VideoModule$11.onStorageUpdateDone(VideoModule.java:1387)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2424)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at com.android.camera.CameraActivity$20.onPostExecute(CameraActivity.java:2419)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at android.os.AsyncTask.finish(AsyncTask.java:651)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at android.os.AsyncTask.-wrap1(AsyncTask.java)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at android.os.Handler.dispatchMessage(Handler.java:102)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at android.os.Looper.loop(Looper.java:148)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at android.app.ActivityThread.main(ActivityThread.java:5461)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at java.lang.reflect.Method.invoke(Native Method)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-31 13:57:17.361  6529  6529 E CAM_FatalErrorHandler:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-31 13:57:17.361  6529  6529 E CAM_CameraUtil: Show fatal error dialog

Might be just the wrong framerate request

Nexolight commented 7 years ago

Using system/etc/media_profiles.xml from stock does help a bit. Now other modes than qvga for video record are selectable and the app doesnt crash + starts "recording". However the screen is frozen at that point.

I think there are some issues with h.246 encoding. Note not a single screen recorder app does work.

Nexolight commented 7 years ago

I close this for now.