drm_gralloc invalid argument error (-22) during camera HAL3 preview

157 views
Skip to first unread message

mepi...@gmail.com

unread,
Apr 29, 2016, 8:39:53 AM4/29/16
to Android-x86
Hi,

(Sorry I have some issue on using group and keep write and delete the same post, this time I won't.)

I'm trying to enable HAL3 ref code located on /hardware/libhardware/modules/camera to see the code flow of new camera SW.
After I fixed some crashes on HAL3 code, it shows below errors from drm_gralloc.

04-25 15:22:35.943  3555  3555 E BufferQueueProducer: [unnamed-3555-1] dequeueBuffer: async=false w=640 h=480 format=0x22, usage=0x60033
04-25 15:22:35.943  3555  3555 E BufferQueueProducer: [unnamed-3555-1] width=640, height=480, format=34, usage=393267
04-25 15:22:35.943  1410  1479 W GraphicBufferAllocator: alloc(640, 480, 34, 00060033, ...) failed -22 (Invalid argument)
04-25 15:22:35.943  1410  1479 E         : GraphicBufferAlloc::createGraphicBuffer(w=640, h=480) failed (Invalid argument), handle=0x0
04-25 15:22:35.943  3555  3555 E BufferQueueProducer: [unnamed-3555-1] dequeueBuffer: createGraphicBuffer failed
04-25 15:22:35.943  3555  3555 E Camera3-OutputStream: getBufferLocked: Stream 2: Can't dequeue next output buffer: Invalid argument (-22)
04-25 15:22:35.943  3555  3555 E Camera3-Stream: registerBuffersLocked: Unable to get buffer 0 for registration with HAL
04-25 15:22:35.943  3555  3555 E Camera3-Stream: finishConfiguration: Unable to register stream buffers with HAL: Invalid argument (-22)
04-25 15:22:35.943  3555  3555 E Camera3-Device: Camera 0: configureStreamsLocked: Can't finish configuring input stream 2: Invalid argument (-22)
04-25 15:22:35.943  3555  3555 E Camera2ClientBase: Error condition 1 reported by HAL, requestId -1

Looks like drm_gralloc is complaining about the format 0x22 for the dequeue request from camera3-outputstream.
Does drm_gralloc support below format ?

- CAMERA2_HAL_PIXEL_FORMAT_OPAQUE (0x22, identical to HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED)

Thanks,
Chris Kwon

Chih-Wei Huang

unread,
Apr 29, 2016, 9:00:07 AM4/29/16
to Android-x86
I guess not. Patches are welcome.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org
Reply all
Reply to author
Forward
0 new messages