Yes, there are generic V4L2 HALs in AOSP, e.g.:
- hardware/libhardware/modules/camera/3_4
- hardware/interfaces/camera/device/3.4/default
The README in the former recommends to use the latter, starting with Android P. I gave the latter a try, but it fails to open the camera on my hardware, due to buffer size:
11-02 11:27:01.482 1551 1688 E ExtCamDevSsn@3.4: configureV4l2StreamLocked: V4L2 buffer size: 921600 looks invalid. Expected maximum size: 614400
AOSP seems to expect not more than 2 bytes per pixel for the buffer, but on my device, the buffer size reported corresponds to 3 bytes.