Skip to content

Commit

Permalink
Starting to fix a couple broken things on infinity6
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Jul 14, 2024
1 parent af0d555 commit 816bdf3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions src/hal/star/i6_isp.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,20 @@ typedef struct {
} i6_isp_impl;

static int i6_isp_load(i6_isp_impl *isp_lib) {
if (!(isp_lib->handleIspAlgo = dlopen("libispalgo.so", RTLD_LAZY | RTLD_GLOBAL)))
HAL_ERROR("i6_isp", "Failed to load dependency library!\nError: %s\n", dlerror());
isp_lib->handleIspAlgo = dlopen("libispalgo.so", RTLD_LAZY | RTLD_GLOBAL);

if (!(isp_lib->handleCus3a = dlopen("libcus3a.so", RTLD_LAZY | RTLD_GLOBAL)))
return EXIT_FAILURE;
isp_lib->handleCus3a = dlopen("libcus3a.so", RTLD_LAZY | RTLD_GLOBAL);

if (!(isp_lib->handle = dlopen("libmi_isp.so", RTLD_LAZY | RTLD_GLOBAL)))
return EXIT_FAILURE;
HAL_ERROR("i6_isp", "Failed to load library!\nError: %s\n", dlerror());

if (!(isp_lib->fnLoadChannelConfig = (int(*)(int channel, char *path, unsigned int key))
hal_symbol_load("i6_isp", isp_lib->handle, "MI_ISP_API_CmdLoadBinFile")))
return EXIT_FAILURE;

if (!(isp_lib->fnSetColorToGray = (int(*)(int channel, char *enable))
hal_symbol_load("i6_isp", isp_lib->handle, "MI_ISP_IQ_SetColorToGray")))
return EXIT_FAILURE;
return EXIT_FAILURE;

return EXIT_SUCCESS;
}
Expand Down
5 changes: 2 additions & 3 deletions src/hal/star/i6_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,10 @@ typedef struct {
} i6_sys_impl;

static int i6_sys_load(i6_sys_impl *sys_lib) {
if (!(sys_lib->handleCamOsWrapper = dlopen("libcam_os_wrapper.so", RTLD_LAZY | RTLD_GLOBAL)))
HAL_ERROR("i6_sys", "Failed to load dependency library!\nError: %s\n", dlerror());
sys_lib->handleCamOsWrapper = dlopen("libcam_os_wrapper.so", RTLD_LAZY | RTLD_GLOBAL);

if (!(sys_lib->handle = dlopen("libmi_sys.so", RTLD_LAZY | RTLD_GLOBAL)))
return EXIT_FAILURE;
HAL_ERROR("i6c_sys", "Failed to load library!\nError: %s\n", dlerror());

if (!(sys_lib->fnExit = (int(*)(void))
hal_symbol_load("i6_sys", sys_lib->handle, "MI_SYS_Exit")))
Expand Down
5 changes: 2 additions & 3 deletions src/hal/star/i6_venc.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,8 @@ static int i6_venc_load(i6_venc_impl *venc_lib) {
hal_symbol_load("i6_venc", venc_lib->handle, "MI_VENC_Query")))
return EXIT_FAILURE;

if (!(venc_lib->fnSetSourceConfig = (int(*)(int channel, i6_venc_src_conf *config))
hal_symbol_load("i6_venc", venc_lib->handle, "MI_VENC_SetInputSourceConfig")))
return EXIT_FAILURE;
venc_lib->fnSetSourceConfig = (int(*)(int channel, i6_venc_src_conf *config))
hal_symbol_load("i6_venc", venc_lib->handle, "MI_VENC_SetInputSourceConfig");

if (!(venc_lib->fnRequestIdr = (int(*)(int channel, char instant))
hal_symbol_load("i6_venc", venc_lib->handle, "MI_VENC_RequestIdr")))
Expand Down

0 comments on commit 816bdf3

Please sign in to comment.