This is a cache of https://discuss.96boards.org/t/to-implement-a-vehicle-camera-hal-on-hikey-board/8458. It is a snapshot of the page at 2024-10-31T11:38:46.988+0000.
To implement a vehicle camera HAL on HiKey board - HiKey 960 - 96Boards Forum

To implement a vehicle camera HAL on HiKey board

I want to implement Android’s vehicle camera HAL on HiKey board and want to connect a USB camera to it and get the stream so how to do that?

Have you read the documentation?
https://source.android.com/devices/automotive/camera-hal

In particular, look under the “Kernel drivers” heading, and you will see that the reference implementation includes v4l2 support, which means that as long as your USB camera is a standard UVC camera, it should work.

Note that I haven’t actually implemented it, so I can’t speak to whether or not it is actually functional. In my opinion, vehicle cameras are useful ONLY as recording devices to monitor other people’s stupidity and defend yourself in traffic court. A safe driver is one who is fully aware of their surroundings and doesn’t rely on technology.

I think what you need is to add this;

PRODUCT_PACKAGES += \
	evs_app \
	evs_app_default_resources \
	android.automotive.evs.manager@1.0 \
	android.hardware.automotive.evs@1.0-sample

BOARD_SEPOLICY_DIRS += packages/services/Car/evs/sepolicy

But also note that the EVS system is triggered by the Vehicle HAL, so you need to sent certain signals to the Vehicle HAL, such as Reverse, Left turn signal, Right turn signal in order to cause the EVS to display the related camera on the screen.

Thank you for your valuable response. I’ll try and let you know.