This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: The video device node configuration

Part Number: TDA4VM

Tool/software:

Hi team,

I am using SDK 9.1 and kernel 6.1.46.

I have chance to get the video device node swap between /dev/media0 & /dev/media1, it affected my gsteamer pipeline output on the display.

I have 3 of 50 times get this configuration which is not what I expected as shown below :

root@rovy-4vm:/opt/edgeai-gst-apps# v4l2-ctl --list-dev
j721e-csi2rx (platform:4500000.ticsi2rx):
        /dev/video18
        /dev/video19
        /dev/video20
        /dev/video21
        /dev/video22
        /dev/video23
        /dev/video24
        /dev/video25
        /dev/video26
        /dev/video27
        /dev/video28
        /dev/video29
        /dev/video30
        /dev/video31
        /dev/video32
        /dev/video33
        /dev/media0

j721e-csi2rx (platform:4510000.ticsi2rx):
        /dev/video2
        /dev/video3
        /dev/video4
        /dev/video5
        /dev/video6
        /dev/video7
        /dev/video8
        /dev/video9
        /dev/video10
        /dev/video11
        /dev/video12
        /dev/video13
        /dev/video14
        /dev/video15
        /dev/video16
        /dev/video17
        /dev/media1

vxd-dec (platform:vxd-dec):
        /dev/video1

vxe-enc (platform:vxe-enc):
        /dev/video0

Normally I get something like this :

root@rovy-4vm:/opt/edgeai-gst-apps# v4l2-ctl --list-dev
j721e-csi2rx (platform:4500000.ticsi2rx):
        /dev/video2
        /dev/video3
        /dev/video4
        /dev/video5
        /dev/video6
        /dev/video7
        /dev/video8
        /dev/video9
        /dev/video10
        /dev/video11
        /dev/video12
        /dev/video13
        /dev/video14
        /dev/video15
        /dev/video16
        /dev/video17
        /dev/media0

j721e-csi2rx (platform:4510000.ticsi2rx):
        /dev/video18
        /dev/video19
        /dev/video20
        /dev/video21
        /dev/video22
        /dev/video23
        /dev/video24
        /dev/video25
        /dev/video26
        /dev/video27
        /dev/video28
        /dev/video29
        /dev/video30
        /dev/video31
        /dev/video32
        /dev/video33
        /dev/media1

vxd-dec (platform:vxd-dec):
        /dev/video1

vxe-enc (platform:vxe-enc):
        /dev/video0



I have checked the CSI boot up timing is similar.

I still don't understand why it happens ? 

Can video device node configuration be fixed when both CSI ports are used ?

Best regards
Dennis Tseng
  • Hi Dennis,

    I would suggest creating a new udev rule to create a new symlink for the cameras being connected. 

    You can get a list of properties using:

    • udevadm info -q all /dev/video2

    Find differences between each /dev/videoX from the output of this udevadm command. Then, under /etc/udev/rules.d, create a new .rules file that links unique property differences to a certain name under /dev.

    Those are some standard Linux tools that I would recommend looking into, since there is a lot of resources online from the community that you can use as reference. 

    Regards,

    Takuma

  • Hi Takuma,

    Thanks for your help.  I just wanted to share some feedback on this.  We found that with different SDK revisions (or even kernel compilations), that certain device nodes are remapped entirely.  CAN bus is a good example.  We've created a udev rules for CAN bus to remap them into a known configuration.  Another example is the gpiochips, which can change depending on when the GPIO driver is probed.  If you have a lot of i2c expansion, then you'll find a lot of gpio chips and the mapping will change (even for the built-in GPIOs).

    However, the issue is - we don't see this problem with any of our other processors we work with (e.g. i.MX).  On those platforms, we have not had to rename any gpiochips, can busses, etc, because they always are consistent.

    We will do as you suggest, but just wanted to provide some feedback that we are not seeing this same problem with other vendors.

    Thanks,

    John

  • Hi John,

    Thanks for the feedback.

    If you know of a better way to enumerate devices under /dev consistently, please let us know the details and I can pass it on to our development team to see if we can integrate it into our SDK. From searching online personally, it seems udev rules are the standard method that folks are taking to enumerate devices consistently.

    Regards,

    Takuma