Error on enabling Embedded Data Rows in Custom Image sensor Driver


I am writing my own image sensor driver. I have written all driver files and it works. My resolution is 1920x1080 in RAW12 format. I want to enable embedded data. It will be total 14 lines.

I update the embtop field in IMG_PROPERTY_ENTRY as 14 and also I change my configuration drive-px2-a.conf file, the values look like

resolution = ‘1920x1080’
embedded_lines_top = 14

there are other entries also. When I run img_cap application, I get the following error

NvViErrorDecode Stream 0.0 failed: ts 2834889471520 frame 1 error 4 data 0x04460040
nvmedia: ERROR: _CaptureThreadFunc: NvMediaICPGetFrameEx failed
NvViErrorDecode CaptureError: ChanselFault (4)
NvViErrorDecode See for more information and links to documents.
ChanselFault : 0x04460040
At least one more line of pixels has been received than that expected. See FRAME_Y_HEIGHT register field for expected line height.
Current line in frame [31:16]: 1094

Tegra is complaining that it is receiving 1094 lines which is ok because my resolution is 1920x1080 and embedded lines are 14 so total number of lines should be 1080+14 = 1094. Not sure why there is an error? I am missing something, I mean to enable the embedded data do you need to update any other field apart from IMG_PROPERTY_ENTRY in your ref_maxXXX_maxXXX_ar0XXX.c file and also your configuration in drive-px2-a.conf.

Please note that if I disbale embedded rows then my driver works well without any issues. Please help me out.


Dear ashutosh.gupta,

Under ‘samples/nvmedia/ext_dev_prgm/drv’ we do provide you several samples which you can extend to your needs. Those sources itself provide you a good start as they also describe the necessary register length, data length, buffer length, etc. to bring up your camera.
So could you please help check it for your topic? Thanks.