@@ -258,6 +258,8 @@ int v1_pipeline_create(void)
258
258
if (ret = v1_vi .fnEnableChannel (_v1_vi_chn ))
259
259
return ret ;
260
260
261
+ if (ret = v1_snr_drv .fnInit ())
262
+ return ret ;
261
263
if (ret = v1_snr_drv .fnRegisterCallback ())
262
264
return ret ;
263
265
@@ -266,14 +268,14 @@ int v1_pipeline_create(void)
266
268
if (ret = v1_isp .fnRegisterAWB (& v1_awb_lib ))
267
269
return ret ;
268
270
271
+ if (ret = v1_isp .fnInit ())
272
+ return ret ;
269
273
if (ret = v1_isp .fnSetWDRMode (& v1_config .mode ))
270
274
return ret ;
271
275
if (ret = v1_isp .fnSetImageConfig (& v1_config .img ))
272
276
return ret ;
273
277
if (ret = v1_isp .fnSetInputTiming (& v1_config .tim ))
274
278
return ret ;
275
- if (ret = v1_isp .fnInit ())
276
- return ret ;
277
279
278
280
{
279
281
v1_vpss_grp group ;
@@ -420,11 +422,13 @@ int v1_sensor_init(char *name, char *obj)
420
422
break ;
421
423
} if (!v1_snr_drv .handle )
422
424
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" );
424
428
if (!(v1_snr_drv .fnRegisterCallback = (int (* )(void ))dlsym (v1_snr_drv .handle , "sensor_register_callback" )))
425
429
HAL_ERROR ("v1_snr" , "Failed to connect the callback register function" );
426
430
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" );
428
432
429
433
return EXIT_SUCCESS ;
430
434
}
0 commit comments