Hi ,
I am using imx6Q with Android 8.0.
I have managed to work uvc camera Logitech C525 with the setup .
The issue is I get a mirrored image and to get the desired image I have to use it as front camera.
I have modified init.rc to configure the camera as front camera.
setprop back_camera_name 0
setprop front_camera_name uvc
After this change my camera doesn't work at all and I get the following error in the logcat :
292-292/? I/chatty: uid=1047(cameraserver) /system/bin/cameraserver expire 3 lines
292-292/? W//system/bin/cameraserver: Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...
10007-10007/? I/android.hardware.camera.provider@2.4-service: Camera provider Service is starting.
10007-10007/? I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib/hw/android.hardware.camera.provider@2.4-impl.so from the current namespace instead.
10007-10007/? I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib/hw/camera.imx6.so from the current namespace instead.
10007-10007/? I/FslCameraHAL: enumSensorSet
10007-10007/? I/FslCameraHAL: matchDevNodes
10007-10007/? I/FslCameraHAL: getNodeName: dev path:/dev/video1
10007-10007/? I/FslCameraHAL: getNodeName: node name:uvcvideo
10007-10007/? I/FslCameraHAL: getNodeName CHIP_IDENT dev path:/dev/video1 failed
10007-10007/? I/FslCameraHAL: getNodeNames: node name:uvcvideo,HD Webcam C525
10007-10007/? I/FslCameraHAL: getNodeName: dev path:/dev/video17
10007-10007/? W/FslCameraHAL: getNodeName dev path:/dev/video17 is not capture
10007-10007/? I/FslCameraHAL: getNodeName: dev path:/dev/video0
10007-10007/? W/FslCameraHAL: getNodeName open dev path:/dev/video0 failed:Try again
10007-10007/? I/FslCameraHAL: getNodeName: dev path:/dev/video16
10007-10007/? W/FslCameraHAL: getNodeName open dev path:/dev/video16 failed:Permission denied
10007-10007/? I/FslCameraHAL: matchPropertyName: index:0, 0
10007-10007/? I/FslCameraHAL: matchPropertyName: index:1, uvc
10007-10007/? I/FslCameraHAL: index:1, propName:uvc
10007-10007/? I/FslCameraHAL: matchNodeName
10007-10007/? I/FslCameraHAL: matchNodeName: sensor:uvcvideo,HD Webcam C525, dev:/dev/video1, node:uvc, index:1
10007-10007/? I/FslCameraHAL: Camera ID 1: name uvcvideo,HD Webcam C525, Facing 1, orientation 0, dev path /dev/video1
10007-10007/? I/FslCameraHAL: create id:1 usb camera device
10007-10007/? I/FslCameraHAL: newInstance usb sensor name:uvcvideo,HD Webcam C525
10007-10007/? I/FslCameraHAL: newInstance usb sensor:uvcvideo,HD Webcam C525 use standard UVC device
10007-10007/? I/FslCameraHAL: Camera:1: new camera device
10007-10007/? I/FslCameraHAL: camera number is 1
10007-10007/? I/CamProvider@2.4-impl: Loaded "Default Camera HAL" camera module
10007-10007/? I/FslCameraHAL: getCameraInfo: camera id 0: info=0xbefa5598
10007-10007/? E/FslCameraHAL: getCameraInfo: Invalid camera id 0
10007-10007/? E/CamProvider@2.4-impl: initialize: Camera info query failed!
10007-10007/? E/CamProvider@2.4-impl: HIDL_FETCH_ICameraProvider: camera provider init failed!
10007-10007/? E/android.hardware.camera.provider@2.4-service: Could not get passthrough implementation for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0.
Hello,
Since it is a web camera you will of course get a mirrored image. Nevertheless, you may refer to the driver V4L2 IOCT- IPU_ROTATE_HORIZ_FLIP in the i.MX6Q BSP to flip the image horizontally.
Hope it helps!
BR,
Ivan.
Hi Ivan ,
Thank You for your reply.
Previously I used Android 7.1 (Nougat) and to fix this issue I modified the camera.h file and changed the parameter CAMERA_FACING_BACK = 1; from its default value 0. So now my back camera was mirror and was similar to front camera facing showing exact image.
When I try the same with Android 8.0 it doesn't work .
Can you please tell me in detail where the orientation is set in Android 8.0
Hello,
Instead of modifying directly from the camera, you may try to flip the image horizontally as I already mentioned. The driver is available in the BSP.
Hope it helps!
BR,
Ivan.