custom sensor driver that can get user defined byte-based data

Hi, There

We are creating some custom sensor device. We send raw bayer data in one channel and also send additional compressed mjpeg data mixed with raw data in another csi channel. In latter channel, we differenciate the data using data type in header. Raw data has range 0x28-0x2f and user defined byte-based data in 0x30-0x37 as defined in TRM section 29.11.1.1. We tested it using raspberry pi board csi and can read the user defined byte-based data out. However I cannot find information on how to read user defined data in TX1 camera framework. Could anyone give some pointer or suggestions?

thanks
Xiaoyong

If looks like you need virtual channel support,
I am sorry to tell current software implement didn’t support it yet.

Thanks a lot for the quick reply Shane. Is there an official support for sending jpeg only if I don’t mix the DT in frame? I can probably added an format and set bit BYPASS_PXL_TRANSFORM of VI_CSI_0_IMAGE_DEF_0 register but just want to double check if it is already supported.

thanks
Xiaoyong

You can check the TRM VI/CSI didn’t support JPEG format. Why do you need this? What’s your use case?

Thanks Shane.
We are doing this because our device connect to TX1 as well as other platform that doesn’t have as much csi so need to send some stream in compressed format and share csi. For now I worked around it using raw10 and does some ad hoc format in it and it works.
One quick question, I used to be able to see some counter such as parsed header, parsed packets and etc in previous version but now these debug output are removed. If I just copy the dbg output part back the counter keep showing 0s. I think I must miss some init but haven’t found them in TRM, do you know why these counters are removed and how do I enable them?

thanks
Xiaoyong

Could more specific about the counter or post the code should be good to know it.

These are the debug counter logging that are removed

  •    val = cil_read(port, TEGRA_CSI_DEBUG_COUNTER_0);
    
  •    dev_dbg(chan->csi->dev, "TEGRA_CSI_DEBUG_COUNTER_0 0x%08x\n", val);
    
  •    val = cil_read(port, TEGRA_CSI_DEBUG_COUNTER_1);
    
  •    dev_dbg(chan->csi->dev, "TEGRA_CSI_DEBUG_COUNTER_1 0x%08x\n", val);
    
  •    val = cil_read(port, TEGRA_CSI_DEBUG_COUNTER_2);
    
  •    dev_dbg(chan->csi->dev, "TEGRA_CSI_DEBUG_COUNTER_2 0x%08x\n", val);
    

@xiaoyongtijee
Could you check dump the REG CSI_DEBUG_CONTROL_0 to check if any different.
You also can try to enable the counter from this REG. You can get this REG information from TRM.

Thanks, Shane, I’ll try it out.
btw, could you take a look at the issue I have wrt nvcamera-daemon, I created a separate post for it
https://devtalk.nvidia.com/default/topic/1039034/sensor-driver-and-nvcamera-daemon-integraion-error/?offset=1#5279055

thanks