Hi,
I'm trying to run Camera HAL3 reference code in /hardware/libhardware/module/camera to see actual function call flows of new api with logs.
While I'm testing the code, I faced below errors:
------------------------------
04-25 17:01:53.955 5642 5650 E Camera2-StreamingProcessor: updatePreviewStream (w = 640, h = 480, f = 0x22)
04-25 17:01:53.955 5642 5650 E Camera3-Device: Camera 0: Creating new stream 0: 640 x 480, format 34
04-25 17:01:53.955 5642 5650 E Camera2-JpegProcessor: updateStream (w = 640, h = 480, f = 0x21)
04-25 17:01:53.955 5642 5650 E Camera3-Device: Camera 0: Creating new stream 1: 640 x 480, format 33
...
04-25 17:01:53.955 5642 5650 E BufferQueueProducer: [unnamed-5642-1] dequeueBuffer: async=false w=640 h=480 format=0x22, usage=0x60033
04-25 17:01:53.955 1410 1481 W GraphicBufferAllocator: alloc(640, 480, 34, 00060033, ...) failed -22 (Invalid argument)
04-25 17:01:53.955 1410 1481 E : GraphicBufferAlloc::createGraphicBuffer(w=640, h=480) failed (Invalid argument), handle=0x0
04-25 17:01:53.955 5642 5650 E BufferQueueProducer: [unnamed-5642-1] dequeueBuffer: createGraphicBuffer failed
04-25 17:01:53.955 5642 5650 E Camera3-OutputStream: getBufferLocked: Stream 2: Can't dequeue next output buffer: Invalid argument (-22)
04-25 17:01:53.955 5642 5650 E Camera3-Stream: registerBuffersLocked: Unable to get buffer 0 for registration with HAL
04-25 17:01:53.955 5642 5650 E Camera3-Stream: finishConfiguration: Unable to register stream buffers with HAL: Invalid argument (-22)
04-25 17:01:53.955 5642 5650 E Camera3-Device: Camera 0: configureStreamsLocked: Can't finish configuring input stream 2: Invalid argument (-22)
04-25 17:01:53.955 5642 5650 E Camera2ClientBase: Error condition 1 reported by HAL, requestId -1
------------------------------
With some test code I could see failure comes from the image format 0x22 which is HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED (= CAMERA2_HAL_PIXEL_FORMAT_OPAQUE).
Does drm-gralloc support this format ?
If it does, is there anything I need to configure for camera HAL3 ?
Several things about my development environment:
- I don't have physical camera HW since I just want to see the code flow of new camera API.
- I have my desktop running Android-x86-Lollipop with nVidia graphics card. (NVS 310)
Below are things I've done so far:
- I changed graphics card to see if it's related, none of them works even virtual box.
- I tested nomodeset option for booting, but it's not working.
- I hard-coded the format to HAL_PIXEL_FORMAT_RGBA_8888. It passed the error during dequeuing, but another error comes on registerBuffer().
Thanks,
Chris Kwon.