YUV sensor driver&dts support!

dear,

i modify driver &dts for support YUV sensor, but err as follow:

modify:

camera_common.c
           {
                   MEDIA_BUS_FMT_UYVY8_2X8,
                   V4L2_COLORSPACE_SRGB,
                   V4L2_PIX_FMT_UYVY,
           },

sensor_common.c

else if (strncmp(pixel_t, "yuv_yuyv8", size) == 0)
                 *format = V4L2_PIX_FMT_UYVY;

capture video cmd:
v4l2-ctl -d /dev/video0 -w --verbose --set-fmt-video=width=1920,height=1080 --stream-mmap --stream-count=1 --set-ctrl bypass_mode=0 --stream-to=/tmp/stream.raw

--stream-to=/tmp/stream.yuvtream-mmap --stream-count=1 --set-ctrl bypass_mode=0 -
Opening in BLOCKING MODE 
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
libv4l2: error setting pixformat: Invalid argument
VIDIOC_S_FMT: failed: Invalid argument
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
[  296.626888] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 134, err_data 131072
[  299.185530] tegra194-vi5 15c10000.vi: no reply from camera processor
[  299.185719] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[  299.185907] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
        Index    : 1
        Type     : Video Capture
        Flags    : mapped, error
        Field    : None
        Sequence : 1
        Length   : 4658048
        Bytesused: 4658048
        Timestamp: 0.000000s (Monotonic, End-of-Frame)

        Index    : 1
        Type     : Video Capture
        Flags    : mapped, error[  299.188072] tegra194-vi5 15c10000.vi: unexpected response from camera processor

        Field    : None
        Sequence : 0[  299.188291] tegra194-vi5 15c10000.vi: vi capture setup failed

        Length   : 4658048
        Bytesused: 4658048[  299.188435] tegra194-vi5 15c10000.vi: fatal: error recovery failed

        Timestamp: 0.000000s (Monotonic, End-of-Frame)

        Index    : 2
        Type     : Video Capture
        Flags    : mapped, error
        Field    : None
        Sequence : 2
        Length   : 4658048
        Bytesused: 4658048
        Timestamp: 0.000000s (Monotonic, End-of-Frame)

        Index    : 3
        Type     : Video Capture
        Flags    : mapped, error
        Field    : None
        Sequence : 3
        Length   : 4658048
        Bytesused: 4658048
        Timestamp: 0.000000s (Monotonic, End-of-Frame)

        Index    : 0
        Type     : Video Capture

hello JiaZW

please resolve below failure.

libv4l2: error setting pixformat: Invalid argument
VIDIOC_S_FMT: failed: Invalid argument

you may also check similar topic, Topic 1051076 for reference. thanks

@JerryChang

Is this problem caused by v4l2 or is it caused by a driver & dts modify error ?

hello JiaZW,

please refer to Camera Architecture Stack,
since you already extend YUV support formats, you’ll also need to dig into sensor driver to check which function call cause the VIDIOC_S_FMT failure.
BTW, you may also refer to Topic 1051076 as best-practice.
thanks

@JerryChang

Is there a driver & dts of YUV sensor for reference ??

At present, there is no way to debug YUV sensor

hello JiaZW,

we don’t have YUV sensor reference drivers, suggest you search for similar topics for debug tips.
thanks

thanks

Is there a YUV sensor reference driver now? on xavier

hello liu.jialu

No, we don’t provide YUV sensor drivers for reference.
you might contact with Jetson Preferred Partner for camera solutions.
thanks