Skip to content

Commit 233032d

Browse files
committed
Continuing the testing on hisi-gen1
1 parent 789c0fe commit 233032d

File tree

6 files changed

+18
-26
lines changed

6 files changed

+18
-26
lines changed

src/hal/hisi/v1_config.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,11 @@ static enum ConfigError v1_parse_config_isp(
417417
err = parse_int(ini, "isp_image", "isp_w", 0, INT_MAX, &value);
418418
if (err != CONFIG_OK)
419419
return err;
420-
tim->width = value;
421-
img->width = tim->width;
420+
img->width = tim->width = value;
422421
err = parse_int(ini, "isp_image", "isp_h", 0, INT_MAX, &value);
423422
if (err != CONFIG_OK)
424423
return err;
425-
tim->height = value;
426-
img->height = tim->height;
424+
img->height = tim->height = value;
427425
err = parse_int(
428426
ini, "isp_image", "isp_framerate", 0, INT_MAX, &value);
429427
if (err != CONFIG_OK)

src/hal/hisi/v1_hal.c

+8-4
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ int v1_pipeline_create(void)
258258
if (ret = v1_vi.fnEnableChannel(_v1_vi_chn))
259259
return ret;
260260

261+
if (ret = v1_snr_drv.fnInit())
262+
return ret;
261263
if (ret = v1_snr_drv.fnRegisterCallback())
262264
return ret;
263265

@@ -266,14 +268,14 @@ int v1_pipeline_create(void)
266268
if (ret = v1_isp.fnRegisterAWB(&v1_awb_lib))
267269
return ret;
268270

271+
if (ret = v1_isp.fnInit())
272+
return ret;
269273
if (ret = v1_isp.fnSetWDRMode(&v1_config.mode))
270274
return ret;
271275
if (ret = v1_isp.fnSetImageConfig(&v1_config.img))
272276
return ret;
273277
if (ret = v1_isp.fnSetInputTiming(&v1_config.tim))
274278
return ret;
275-
if (ret = v1_isp.fnInit())
276-
return ret;
277279

278280
{
279281
v1_vpss_grp group;
@@ -420,11 +422,13 @@ int v1_sensor_init(char *name, char *obj)
420422
break;
421423
} if (!v1_snr_drv.handle)
422424
HAL_ERROR("v1_snr", "Failed to load the sensor driver");
423-
425+
426+
if (!(v1_snr_drv.fnInit = (int(*)(void))dlsym(v1_snr_drv.handle, "sensor_init")))
427+
HAL_ERROR("v1_snr", "Failed to connect the init function");
424428
if (!(v1_snr_drv.fnRegisterCallback = (int(*)(void))dlsym(v1_snr_drv.handle, "sensor_register_callback")))
425429
HAL_ERROR("v1_snr", "Failed to connect the callback register function");
426430
if (!(v1_snr_drv.fnUnRegisterCallback = (int(*)(void))dlsym(v1_snr_drv.handle, "sensor_unregister_callback")))
427-
HAL_ERROR("v1_snr", "Failed to connect the callback register function");
431+
HAL_ERROR("v1_snr", "Failed to connect the callback unregister function");
428432

429433
return EXIT_SUCCESS;
430434
}

src/hal/hisi/v1_snr.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ typedef struct {
7070
typedef struct {
7171
void *handle;
7272

73+
int (*fnInit)(void);
7374
int (*fnRegisterCallback)(void);
7475
int (*fnUnRegisterCallback)(void);
75-
} v1_snr_drv_impl;
76-
77-
static const char v1_snr_endp[] = {"/dev/hi_mipi"};
76+
} v1_snr_drv_impl;

src/hal/hisi/v1_sys.h

+4-13
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ typedef enum {
88
V1_SYS_MOD_CMPI,
99
V1_SYS_MOD_VB,
1010
V1_SYS_MOD_SYS,
11-
V1_SYS_MOD_RGN,
11+
V1_SYS_MOD_VALG,
1212
V1_SYS_MOD_CHNL,
1313
V1_SYS_MOD_VDEC,
1414
V1_SYS_MOD_GROUP,
15-
V1_SYS_MOD_VPSS,
1615
V1_SYS_MOD_VENC,
16+
V1_SYS_MOD_VPSS,
1717
V1_SYS_MOD_VDA,
1818
V1_SYS_MOD_H264E,
1919
V1_SYS_MOD_JPEGE,
@@ -23,9 +23,9 @@ typedef enum {
2323
V1_SYS_MOD_VOU,
2424
V1_SYS_MOD_VIU,
2525
V1_SYS_MOD_DSU,
26-
V1_SYS_MOD_VALG,
26+
V1_SYS_MOD_RGN,
2727
V1_SYS_MOD_RC,
28-
V1_SYS_MOD_AIO,
28+
V1_SYS_MOD_SIO,
2929
V1_SYS_MOD_AI,
3030
V1_SYS_MOD_AO,
3131
V1_SYS_MOD_AENC,
@@ -48,15 +48,6 @@ typedef enum {
4848
V1_SYS_MOD_TDE,
4949
V1_SYS_MOD_USR,
5050
V1_SYS_MOD_VEDU,
51-
V1_SYS_MOD_VGS,
52-
V1_SYS_MOD_H265E,
53-
V1_SYS_MOD_FD,
54-
V1_SYS_MOD_ODT,
55-
V1_SYS_MOD_VQA,
56-
V1_SYS_MOD_LPR,
57-
V1_SYS_MOD_FISHEYE,
58-
V1_SYS_MOD_PHOTO,
59-
V1_SYS_MOD_EXTAO,
6051
V1_SYS_MOD_END
6152
} v1_sys_mod;
6253

src/hal/hisi/v2_hal.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ int v2_sensor_init(char *name, char *obj)
453453
if (!(v2_snr_drv.fnRegisterCallback = (int(*)(void))dlsym(v2_snr_drv.handle, "sensor_register_callback")))
454454
HAL_ERROR("v2_snr", "Failed to connect the callback register function");
455455
if (!(v2_snr_drv.fnUnRegisterCallback = (int(*)(void))dlsym(v2_snr_drv.handle, "sensor_unregister_callback")))
456-
HAL_ERROR("v2_snr", "Failed to connect the callback register function");
456+
HAL_ERROR("v2_snr", "Failed to connect the callback unregister function");
457457

458458
return EXIT_SUCCESS;
459459
}

src/hal/hisi/v3_hal.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ int v3_sensor_init(char *name, char *obj)
480480
if (!(v3_snr_drv.fnRegisterCallback = (int(*)(void))dlsym(v3_snr_drv.handle, "sensor_register_callback")))
481481
HAL_ERROR("v3_snr", "Failed to connect the callback register function");
482482
if (!(v3_snr_drv.fnUnRegisterCallback = (int(*)(void))dlsym(v3_snr_drv.handle, "sensor_unregister_callback")))
483-
HAL_ERROR("v3_snr", "Failed to connect the callback register function");
483+
HAL_ERROR("v3_snr", "Failed to connect the callback unregister function");
484484

485485
return EXIT_SUCCESS;
486486
}

0 commit comments

Comments
 (0)