File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,24 @@ int ak_pipeline_create(char mirror, char flip)
7979 HAL_ERROR ("ak_vi" , "Getting the sensor resolution failed with %#x!\n%s\n" ,
8080 ret = ak_sys .fnGetErrorNum (), ak_sys .fnGetErrorStr (ret ));
8181
82+ {
83+ ak_vi_cnf config ;
84+ config .capt .width = _ak_vi_res .width ;
85+ config .capt .height = _ak_vi_res .height ;
86+ config .capt .x = 0 ;
87+ config .capt .y = 0 ;
88+ for (char i = 0 ; i < 2 ; i ++ ) {
89+ config .dest [i ].width = 640 ;
90+ config .dest [i ].height = 480 ;
91+ config .dest [i ].maxWidth = 640 ;
92+ config .dest [i ].maxHeight = 480 ;
93+ }
94+
95+ if (ak_vi .fnSetDeviceConfig (_ak_vi_dev , & config ))
96+ HAL_ERROR ("ak_vi" , "Setting the sensor resolution failed with %#x!\n%s\n" ,
97+ ret = ak_sys .fnGetErrorNum (), ak_sys .fnGetErrorStr (ret ));
98+ }
99+
82100 if (ak_vi .fnStartDevice (_ak_vi_dev ))
83101 HAL_ERROR ("ak_vi" , "Starting the acquisition failed with %#x!\n%s\n" ,
84102 ret = ak_sys .fnGetErrorNum (), ak_sys .fnGetErrorStr (ret ));
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ typedef struct {
1212typedef struct {
1313 int width ;
1414 int height ;
15+ int maxWidth ;
16+ int maxHeight ;
1517} ak_vi_res ;
1618
1719typedef struct {
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ void hal_identify(void) {
155155 return ;
156156 }
157157
158- if (!access ("/sys/devices/platform/ak39-uart.0 " , F_OK ) &&
158+ if (!access ("/sys/devices/platform/i2c-ak39 " , F_OK ) &&
159159 hal_registry (0x08000000 , & val , OP_READ )) {
160160 plat = HAL_PLATFORM_AK ;
161161 strcpy (chip , "AK3918E" );
@@ -170,6 +170,9 @@ void hal_identify(void) {
170170 chnState = (hal_chnstate * )ak_state ;
171171 //aud_thread = ak_audio_thread;
172172 vid_thread = ak_video_thread ;
173+
174+ // Needed for libplat_thread and uClibc
175+ dlopen ("libpthread.so.0" , RTLD_LAZY | RTLD_GLOBAL );
173176 return ;
174177 }
175178#endif
You can’t perform that action at this time.
0 commit comments