I currently have 2 modes in my device tree, uyvy(640x480) and grey(1280x480). In my mode_tbls.h file, I also have 2 formats and each one is mapped to a sensor_mode, 0 for uyvy and 1 for grey.
My problem is, when I check for the supported format with v4l2-ctl -d0 --list-formats-ext,
it gives me this.
Index : 0
Type : Video Capture
Pixel Format: 'GREY'
Name : 8-bit Greyscale
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Index : 1
Type : Video Capture
Pixel Format: 'UYVY'
Name : UYVY 4:2:2
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.017s (60.000 fps)
This is not what I would expect, I would expect something like this. I only want 1280x 480 for grey and only 640x480 for uyvy. Also, the index are inverted. 0 should be uyvy
Index : 0
Type : Video Capture
Pixel Format: 'UYVY'
Name : UYVY 4:2:2
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Index : 1
Type : Video Capture
Pixel Format: 'GREY'
Name : 8-bit Greyscale
Size: Discrete 1280x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.017s (60.000 fps)