[libcamera-devel] [PATCH] android: nautilus: Add camera HAL configuration

Umang Jain umang.jain at ideasonboard.com
Mon Jul 26 12:42:12 CEST 2021


Hi Kieran and Laurent,

On 7/26/21 3:50 PM, Kieran Bingham wrote:
> Hi Umang,
>
> On 24/07/2021 10:21, Umang Jain wrote:
>> Nautilus has two in-built cameras, one UVC and one attached to IPU3.
>> However, libcamera assumes all UVC cameras as 'external' [1] hence,
>> mark the location of UVC camera in HAL configuration as 'external' too.
>>
>> [1] 76809320bb1a ("libcamera: pipeline: uvcvideo: Treat all UVC cameras as external")
>>
>> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
>> ---
>>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>   create mode 100644 src/android/data/nautilus/camera_hal.yaml
>>
>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml
>> new file mode 100644
>> index 00000000..f2d31e1c
>> --- /dev/null
>> +++ b/src/android/data/nautilus/camera_hal.yaml
>> @@ -0,0 +1,8 @@
>> +cameras:
>> +  "\\_SB_.PCI0.I2C2.CAM0":
>> +    location: back
>> +    rotation: 0
>> +
>> +  "\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647":
>> +    location: external
> The purpose of this file is to allow the distribution to correctly
> specify the location, so we don't need to follow the 'default' location
> - instead in this file we should be telling the system the correct
> location (which could otherwise not be determined from a UVC camera).

Yes, I am aware of that. I still need to investigate what changes are 
required to actually mark it one of 'front/back' internal cameras. You 
might be aware that we assign ids to cameras, internal ones starting 
from '0' and external ones from '1000'.

We do have checks based on these ids, look at CameraHalManager. Hence, 
if we let HAL config file dictate that this is a internal(front or back) 
camera, still we need to take care how we will address it's id (we can't 
have a situation where HAL config file says the camera is internal, but 
it's id > 1000). One option is to probably remove these id-based checks 
and re-generate these checks whatever is in HAL config location. Hence, 
need to investigate that, as what would be the paths forwards. I'll come 
up with a few solutions to discuss as soon as I get some time.

>
> So I assume this is the 'front' camera ...
>
> --
> Kieran
>
>> +    rotation: 0
>>


More information about the libcamera-devel mailing list