VIFALC_TDSTATE and CHANSEL_NOMATCH error when streaming RGB

Hi,
I’m developing custom camera driver, and one of the RGB sensor couldn’t stream with v4l2-ctl. I’m on JetPack 5.0.2. I followed Jetson/l4t/Camera BringUp - eLinux.org to enable tracing.

    kworker/0:5-556     [000] ....   599.446618: rtcpu_vinotify_event: tstamp:19703384611 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:630499174272 data:0xcd9ce50010000000
     kworker/0:5-556     [000] ....   599.446623: rtcpu_vinotify_event: tstamp:19703384834 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:630499179808 data:0x0000000031000001
     kworker/0:5-556     [000] ....   599.446624: rtcpu_vinotify_event: tstamp:19703385049 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:630499258944 data:0xcd9ce20010000000
     kworker/0:5-556     [000] ....   599.446625: rtcpu_vinotify_event: tstamp:19703385232 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:630499265056 data:0x0000000031000002
     kworker/0:5-556     [000] ....   599.894475: rtcpu_vinotify_error: tstamp:19716204625 cch:-1 vi:0 tag:CSIMUX_STREAM channel:0x00 frame:0 vi_tstamp:630918523872 data:0x0000000000000001
     kworker/0:5-556     [000] ....   599.894479: rtcpu_vinotify_event: tstamp:19716217758 cch:-1 vi:0 tag:CSIMUX_STREAM channel:0x00 frame:0 vi_tstamp:630918523872 data:0x0000000000000001
     kworker/0:5-556     [000] ....   599.894481: rtcpu_vinotify_error: tstamp:19717209606 cch:-1 vi:0 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:630950681824 data:0x0000000000000249
     kworker/0:5-556     [000] ....   599.894482: rtcpu_vinotify_event: tstamp:19717469782 cch:-1 vi:0 tag:FS channel:0x00 frame:0 vi_tstamp:630950680128 data:0x0000000000000010
     kworker/0:5-556     [000] ....   599.894484: rtcpu_vinotify_event: tstamp:19717469994 cch:-1 vi:0 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:630950681824 data:0x0000000000000249
     kworker/0:5-556     [000] ....   599.950457: rtcpu_vinotify_error: tstamp:19718251730 cch:-1 vi:0 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:630984029600 data:0x0000000000000249
     kworker/0:5-556     [000] ....   599.950460: rtcpu_vinotify_event: tstamp:19718408694 cch:-1 vi:0 tag:FE channel:0x00 frame:0 vi_tstamp:630980223168 data:0x0000000000000020
     kworker/0:5-556     [000] ....   599.950461: rtcpu_vinotify_event: tstamp:19718408904 cch:-1 vi:0 tag:FS channel:0x00 frame:0 vi_tstamp:630984028064 data:0x0000000000000010
     kworker/0:5-556     [000] ....   599.950462: rtcpu_vinotify_event: tstamp:19718409086 cch:-1 vi:0 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:630984029600 data:0x0000000000000249
     kworker/0:5-556     [000] ....   599.950463: rtcpu_vinotify_error: tstamp:19719293850 cch:-1 vi:0 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:631017377536 data:0x0000000000000249
     kworker/0:5-556     [000] ....   599.950464: rtcpu_vinotify_event: tstamp:19719347732 cch:-1 vi:0 tag:FE channel:0x00 frame:0 vi_tstamp:631013570944 data:0x0000000000000020
     kworker/0:5-556     [000] ....   599.950499: rtcpu_vinotify_event: tstamp:19719347914 cch:-1 vi:0 tag:FS channel:0x00 frame:0 vi_tstamp:631017376032 data:0x0000000000000010

The CHANSEL_NOMATCH data 0x249 decodes to CTYPE=0x4 and DTYPE=0x12, what do these numbers mean? Also what is meant by VIFALC_TDSTATE?
Thanks

hello camdev,

it shows not defined NVCSI data types. you may look kernel sources for details.
for example,
$public_sources/r35.1/Linux_for_Tegra/source/public/kernel/nvidia/include/soc/tegra/camrtc-capture.h

 * @defgroup NvCsiDataType NVCSI datatypes
 * @{
 */
...
#define NVCSI_DATATYPE_RAW8             MK_U32(42)
#define NVCSI_DATATYPE_RAW10            MK_U32(43)
#define NVCSI_DATATYPE_RAW12            MK_U32(44)

may I know what’s the data types? we don’t support RGB888 by default.
you may see-also Topic 228839 to workaround it by using AR24 pixel formats.

The data type is supposed to be YUV 4:2:2

so, DTYPE should be 0x1e or 0x1f according to below

#define NVCSI_DATATYPE_YUV422_8         MK_U32(30)
#define NVCSI_DATATYPE_YUV422_10        MK_U32(31)

Hi, I double checked and 0x12 turns out to be embedded metadata. The error I’m seeing is similar to Camera streams fine for a bit, then CHANSEL_NOMATCH

So does this error trace mean the stream seen by the VI is actually metadata instead of actual video data?

hello camdev,

do you really output embedded metadata?
please configure embedded_metadata_height = 0; in device tree if that’s not used.