UVC HD camera support for i.mx6 Android

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

UVC HD camera support for i.mx6 Android

2,530 次查看
ispark
Contributor I

Hello All,

Target: i.mx6 solid-run cubox-i

Android: 4.4.2 1.0.0-rc3

Kernel: 3.0.35

I connect UVC HD Camera and record 640*480 resolution successfully.

And I want to increase the resolution to 1280*720.

 

BTW, attached patch from NXP only affect to below value.

I/FslCameraHAL( 2298): mMaxWidth:960, mMaxHeight:544

 

please guide me where should I check.

below is log from i.mx6 android board.

 

V/CameraHolder( 3901): open camera 0

I/AwesomePlayer( 2299): setDataSource_l(URL suppressed)

I/AwesomePlayer( 2299): setDataSource_l(URL suppressed)

I/Camera2ClientBase( 2299): Camerehci_fsl_bus_resume begins, Host 1

a 0: Opened

I/FslCameraHAL( 2299): camera_device open: 0

I/FslCameraHAL( 2299): DeviceAdapter: Create uvc device

ehci_fsl_bus_resume ends, Host 1

E/FslCameraHAL( 2299): Error: format 0x47504a4d not supported!

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): SupportedPictureSizes: 640 x 480

I/FslCameraHAL( 2299): SupportedPictureSizes: 640 x 360

I/FslCameraHAL( 2299): SupportedPictureSizes: 544 x 288

I/FslCameraHAL( 2299): SupportedPictureSizes: 432 x 240

I/FslCameraHAL( 2299): SupportedPictureSizes: 352 x 288

I/FslCameraHAL( 2299): SupportedPictureSizes: 320 x 240

I/FslCameraHAL( 2299): SupportedPictureSizes: 752 x 416

I/FslCameraHAL( 2299): SupportedPictureSizes: 800 x 448

I/FslCameraHAL( 2299): SupportedPictureSizes: 864 x 480

I/FslCameraHAL( 2299): SupportedPictureSizes: 800 x 600

I/FslCameraHAL( 2299): SupportedPictureSizes: 960 x 544

I/FslCameraHAL( 2299): SupportedPictureSizes: 1024 x 576

I/FslCameraHAL( 2299): SupportedPictureSizes: 960 x 720

I/FslCameraHAL( 2299): SupportedPictureSizes: 1184 x 656

I/FslCameraHAL( 2299): SupportedPictureSizes: 1280 x 720

I/FslCameraHAL( 2299): SupportedPreviewSizes: 960 x 544

I/FslCameraHAL( 2299): SupportedPreviewSizes: 640 x 360

I/FslCameraHAL( 2299): SupportedPreviewSizes: 544 x 288

I/FslCameraHAL( 2299): SupportedPreviewSizes: 432 x 240

I/FslCameraHAL( 2299): SupportedPreviewSizes: 352 x 288

I/FslCameraHAL( 2299): SupportedPreviewSizes: 320 x 240

I/FslCameraHAL( 2299): SupportedPreviewSizes: 752 x 416

I/FslCameraHAL( 2299): SupportedPreviewSizes: 800 x 448

I/FslCameraHAL( 2299): SupportedPreviewSizes: 864 x 480

I/FslCameraHAL( 2299): SupportedPreviewSizes: 800 x 600

I/FslCameraHAL( 2299): SupportedPreviewSizes: 640 x 480

I/FslCameraHAL( 2299): FrameDuration is 33331760, 30000000000

I/FslCameraHAL( 2299): mMaxWidth:1280, mMaxHeight:720

E/FslCameraHAL( 2299): cpu num 1

W/Camera2-Parameters( 2299): buildFastInfo: Camera 0: activeArraySize is missing xmin/ymin!

I/Camera2-Parameters( 2299): Camera 0: Disabling ZSL mode

V/CAM_VideoModule( 3901): mDesiredPreviewWidth=640. mDesiredPreviewHeight=480

D/        ( 2671): AccelSensor enable 1 , handle 0 ,mEnabled 13

E/SensorService( 2671): Error activating sensor 0 (Operation not permitted)

V/CAM_VideoModule( 3901): mDesiredPreviewWidth=640. mDesiredPreviewHeight=480

V/CAM_VideoModule( 3901): startPreview

D/        ( 2671): AccelSensor enable 1 , handle 0 ,mEnabled 14

E/SensorService( 2671): Error activating sensor 0 (Operation not permitted)

E/BufferQueue( 2296): [com.android.camera2/com.android.camera.VideoCamera] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

V/CAM_VideoModule( 3901): startPreview

V/CAM_VideoModule( 3901): Video snapshot size is 960x720

I/FslCameraHAL( 2299): DEBUG(CreateDefaultRequest): making template (1)

I/FslCameraHAL( 2299): DEBUG(CreateDefaultRequest): making template (3)

I/FslCameraHAL( 2299): RequestManager allocateStream...

I/FslCameraHAL( 2299): allocateStream preview stream, w:640, h:480, fmt:0x22

I/FslCameraHAL( 2299): actual format 0x103

I/FslCameraHAL( 2299): RequestManager allocateStream end...

I/FslCameraHAL( 2299): RequestManager registerStreamBuffers stream id:0

I/FslCameraHAL( 2299): registerBuffers total 5 buffer

I/FslCameraHAL( 2299): RequestManager registerStreamBuffers end...

I/FslCameraHAL( 2299): RequestManager allocateStream...

I/FslCameraHAL( 2299): allocateStream jpeg stream, w:960, h:720, fmt:0x21

I/FslCameraHAL( 2299): actual format 0x103

I/FslCameraHAL( 2299): RequestManager allocateStream end...

I/FslCameraHAL( 2299): RequestManager registerStreamBuffers stream id:3

I/FslCameraHAL( 2299): RequestManager registerStreamBuffers end...

I/FslCameraHAL( 2299): notify_request_queue_not_empty running

I/FslCameraHAL( 2299): dispatchRequest running

I/FslCameraHAL( 2299): handleRequest running

I/FslCameraHAL( 2299): PreviewStream configure running

I/FslCameraHAL( 2299): pixel format: 0x56595559

I/FslCameraHAL( 2299): is Width * Height 640 x 480 format 0x56595559, fps: 30

I/ActivityManager( 2671): Displayed com.android.camera2/com.android.camera.VideoCamera: +696ms

I/FslCameraHAL( 2299): PreviewStream start running

I/FslCameraHAL( 2299): StreamAdapter start running

I/FslCameraHAL( 2299): stream thread received STREAM_START command

I/FslCameraHAL( 2299): Created device thread

标签 (1)
0 项奖励
回复
3 回复数

1,105 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Park,

     The log you sent is no problem, 720P has been supported, you know ? 640x480 resolution of preview is just defualt, if you don't want some resolutions, you can filter out them in HAL, see "CameraFrame * UvcDevice::acquireCameraFrame()" in UvcDevice.cpp file.

     You had better take some time to read code of the file.

Regards,

Weidong

0 项奖励
回复

1,105 次查看
ispark
Contributor I

Yes, you're right it support below resolution.

I/FslCameraHAL( 2293): SupportedPictureSizes: 640 x 480

...

I/FslCameraHAL( 2293): SupportedPictureSizes: 2592 x 1944

I/FslCameraHAL( 2293): SupportedPictureSizes: 640 x 480

I/FslCameraHAL( 2293): SupportedPreviewSizes: 800 x 600

I/FslCameraHAL( 2293): SupportedPreviewSizes: 320 x 240

I/FslCameraHAL( 2293): SupportedPreviewSizes: 640 x 480

I/FslCameraHAL( 2293): SupportedPreviewSizes: 640 x 480

for configure default resolution I modified below file.

./out/target/product/cuboxi/obj/ETC/media_profiles.xml_intermediates/media_profiles.xml

               width="800"
               height="600"
               frameRate="30" />

then it affect to below.

./out/target/product/cuboxi/system/etc/media_profiles.xml

but maybe another source would affect to above file.

any info for original media_profiles.xml would be appreciated.

0 项奖励
回复

1,105 次查看
ispark
Contributor I

Hi Weidong,

Thanks for your response, I studying UvcDevice.cpp hardly but slow to understand.

Also tries to filter out other resolution.

My purpose is set video recording resolution to 1280 x 720.

Android camera apk does not show this configuration.

Please let me know where should I set/modify for this.

Thanks

0 项奖励
回复