|
按照Wiki上面的说明,自己写了一个小例子,但是运行报错。源代码:
- #include <rockchip/rockchip_isp.h>
- #include <rockchip/rockchip_drm.h>
- extern "C"{
- #include <rockchip/rockchip_rga.h>
- }
- #include <stdio.h>
- #include <stdlib.h>
- void* engine;
- int vidFd;
- const char ispNode[] = "/dev/video0";
- const char tuningFile[] = "/etc/cam_iq_ov9750.xml";
- int main(int argc, char** argv)
- {
- unsigned char* data;
- data = (unsigned char*)malloc(1920 * 1080 * sizeof(unsigned char));
- RockchipRga* myRga;
- if(rkisp_start(engine, vidFd, ispNode, tuningFile))
- {
- printf("Error For Init RKISP Start\n");
- return -1;
- }
- myRga = RgaCreate();
- if(myRga == NULL)
- {
- printf("Error For Create Rga\n");
- return -1;
- }
- myRga->ops->initCtx(myRga);
- myRga->ops->setSrcBufferFd(myRga, vidFd);
- myRga->ops->setDstBufferPtr(myRga, data);
- myRga->ops->setDstFormat(myRga, V4L2_PIX_FMT_ARGB32, 1920, 1080);
- myRga->ops->setSrcFormat(myRga, V4L2_PIX_FMT_SGRBG10, 1920, 1080);
- while(true)
- {
- myRga->ops->go(myRga);
- }
- }
1、报错信息
- CAMHALInfo: CAMHALVERSION is: 2.0.8.0
- CAMHALError: ERR(getSensorModeData): RK_VIDIOC_SENSOR_MODE_DATA failed, err: Inappropriate ioctl for device
- CAMHALInfo: CAMIAVERSION is: 2.0.9.0
- CAMHALInfo: init:tuningFile /etc/cam_iq_ov9750.xml
- CAMHALInfo: load tunning file success.
- AWB: AwbConfigure: AWB_VERSION_10
- AWB: AwbPrepareCalibDbAccess: resolution (0x0@2129354592) not found in database
- CAMHALError: initDynamic:awb config failure!
- CAMHALError: cam_ia10_isp_dpcc_config: resolution (0x0) not found in database
- CAMHALError: runManISP:config DPCC failed !
- CAMHALError: cam_ia10_isp_bls_config: resolution (0x0) not found in database
- CAMHALError: runManISP:config BLS failed !
- CAMHALInfo: (null): resolution (0x2129351192) not found in database
- CAMHALInfo: fail to get no FilterProfile, ret: 13
- CAMHALError: runManISP:config FLT failed !
- Segmentation fault
2、ls /dev/video*信息
3、dmesg | grep cif
4、dmesg | grep ov9750
- [ 2.153714] ov9750 1-0010: probing cam_num:0 0x10
- [ 2.155803] ov9750 1-0010: probing successful
- [ 2.167542] ov9750 1-0036: Error applying setting, reverse things back
- [ 2.170114] ov9750 1-0036: probing cam_num:1 0x36
- [ 2.172498] ov9750 1-0036: probing successful
- [ 2.185581] ov9750 2-0010: Error applying setting, reverse things back
- [ 2.188401] ov9750 2-0010: probing cam_num:2 0x10
- [ 2.191022] ov9750 2-0010: probing successful
- [ 2.205697] ov9750 2-0036: Error applying setting, reverse things back
- [ 2.208878] ov9750 2-0036: probing cam_num:3 0x36
- [ 2.211908] ov9750 2-0036: probing successful
- [ 2.626166] ov9750.pltfrm_camera_module_get_data WARN: could not get default pinstate
- [ 2.628032] ov9750.pltfrm_camera_module_get_data WARN: could not get sleep pinstate
- [ 2.665238] ov9750.ov_camera_module_write_config(180) ERR: no active sensor configuration
- [ 2.665989] ov9750.ov_camera_module_write_config(231) ERR: failed with error -14
- [ 2.675495] ov9750.ov9750_check_camera_id: successfully detected camera ID 0x9750
- [ 2.677259] cif_isp10_pltfrm_get_img_src_device: ov9750 attach to cif isp10 img_src_array[0]
- [ 2.679201] ov9750.pltfrm_camera_module_get_data WARN: could not get default pinstate
- [ 2.681002] ov9750.pltfrm_camera_module_get_data WARN: could not get sleep pinstate
- [ 2.682840] ov9750.pltfrm_camera_module_init_gpio(258) ERR: failed to request GPIO #153 ('rockchip,pd-gpio')
- [ 2.684815] ov9750.pltfrm_camera_module_init_gpio(282) ERR: failed with error -16
- [ 2.686567] ov9750.pltfrm_camera_module_init(1739) ERR: GPIO initialization failed (-16)
- [ 2.688372] ov9750.ov_camera_module_init(1337) ERR: failed with error -16
- [ 2.712984] ov9750.pltfrm_camera_module_get_data WARN: could not get default pinstate
- [ 2.714864] ov9750.pltfrm_camera_module_get_data WARN: could not get sleep pinstate
- [ 2.752155] ov9750.ov_camera_module_write_config(180) ERR: no active sensor configuration
- [ 2.752907] ov9750.ov_camera_module_write_config(231) ERR: failed with error -14
- [ 2.756488] ov9750.pltfrm_camera_module_read_reg(1040) ERR: i2c read from offset 0x0000300b failed with error -6
- [ 2.759110] ov9750.pltfrm_camera_module_read_reg(1040) ERR: i2c read from offset 0x0000300c failed with error -6
- [ 2.761273] ov9750.ov9750_check_camera_id(912) ERR: register read failed, camera module powered off?
- [ 2.763314] ov9750.ov9750_check_camera_id(930) ERR: failed with error (-6)
- [ 2.765161] ov9750.ov_camera_module_attach(254) ERR: failed with error -6
- [ 2.772795] ov9750.pltfrm_camera_module_get_data WARN: could not get default pinstate
- [ 2.774770] ov9750.pltfrm_camera_module_get_data WARN: could not get sleep pinstate
- [ 2.812192] ov9750.ov_camera_module_write_config(180) ERR: no active sensor configuration
- [ 2.812943] ov9750.ov_camera_module_write_config(231) ERR: failed with error -14
- [ 2.816955] ov9750.pltfrm_camera_module_read_reg(1040) ERR: i2c read from offset 0x0000300b failed with error -6
- [ 2.819997] ov9750.pltfrm_camera_module_read_reg(1040) ERR: i2c read from offset 0x0000300c failed with error -6
- [ 2.822228] ov9750.ov9750_check_camera_id(912) ERR: register read failed, camera module powered off?
- [ 2.824357] ov9750.ov9750_check_camera_id(930) ERR: failed with error (-6)
- [ 2.826286] ov9750.ov_camera_module_attach(254) ERR: failed with error -6
以上是一些调试信息。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|