I am going to assume you are using VOXL1, since you did not specify..
We do have RAW8 and RAW10 support for OV7251. The selection of the format has to be done in several places.
First, you have to select the correct camera driver, specifically..
ls /usr/lib/libmmcamera_ov7251*.so /usr/lib/libmmcamera_ov7251.so /usr/lib/libmmcamera_ov7251_8bit.so /usr/lib/libmmcamera_ov7251_hflip_8bit.so /usr/lib/libmmcamera_ov7251_rot180_8bit.so /usr/lib/libmmcamera_ov7251_vflip_8bit.so
there are 5 options and one of them is
_8bit.so which means it will natively ouptput 8bit data (all others output 10 bit data).
the driver name, such as
ov7251_8bit has to be the sensor name
You can check
camera_config.xml for what sensor library is used for your OV7251.
When you run
voxl-configure-cameras script, it will actually copy one of the default camera_config.xml that are set up for a particular use case, and I believe it will indeed select the
8bit one - this was done to save cpu cycles needed to convert 10bit to 8bit, since majority of the time only 8bit pixels are used.
Now, you mentioned that
HAL_PIXEL_FORMAT_RAW10 is passed to the stream config and unfortunately this does not have any effect on what the driver outputs. If the low level driver (e.g. libmmcamera_ov7251_8bit.so) is set up to output RAW8, it will output RAW8 if you request either
So if you update the camera_config.xml to the 10bit driver and just keep the
HAL_PIXEL_FORMAT_RAW10 in the stream config (then
reboot), you should be getting a 10 bit RAW image from the camera. But since the camera server is currently expecting 8 bit image, if you just interpret the image as 8 bit, it will appear garbled, so you will need to handle the 10 bit image (decide what you want to do with it) in the camera server.