Issue with Camera HAL v3 Service and IMX6 Gralloc/HWComposer Library on Android Lolipop

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue with Camera HAL v3 Service and IMX6 Gralloc/HWComposer Library on Android Lolipop

1,214 Views
mohamedthalibha
Contributor III

We are developing Camera HAL V3 for our custom board [esom imx6], on Android Lolipop

We are facing issue in getting garalloc buffer - The (private_handle_t) buffer given by Camera Service is corrupted/invalid.

Note: We are able to use Camera using HAL v2 without any problem, we are upgrading to HAL v3 for more features in v3 HAL.

After some comparison study of the Camera Service layer of HAL version v2 and v3 we found, that the service layer implementation for HAL version v3 and v2 are using different code flow path.

In Camera HAL v2 Service, the gralloc buffer is obtained using

native_window_dequeue_buffer_and_wait(mConsumerInterface.get(), &anwBuffers[bufferIdx]);     -> (file: Camera2Device.cpp)

  But in Camera HAL v3 Service, the gralloc buffer is obtained directly from hwcomposer using

currentConsumer->dequeueBuffer(currentConsumer.get(), &anb, &fenceFd);     -> (file: Camera3OutputStream.cpp)

mConsumer is nothing but

sp<ANativeWindow> currentConsumer = mConsumer;

The implementation of ANativeWindow is buried inside /system/lib/hw/hwcomposer_fsl.imx6.so - which is closed proprietor library of freescale.

The buffer (private_handle_t) returned by deqeueBuffer in HALv3 service is junk/corrupted, trying to access/use the buffer results in segmentation, Changing anything in the camera service will break default implementation.

Can some one help/suggest what is the best solution to fix this issue without breaking the existing Service layer for Camera HAL v3 on Android Lolipop

[or]

Is there any v3 HAL implementation already available for IMX6

Labels (4)
0 Kudos
Reply
1 Reply

706 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Mohamed Thalib Haja,

    No, there is not,  the Camera HAL version we used has not been updated from V2 to V3 !

Regards,

Weidong

0 Kudos
Reply