We have a custom board with an AD7280-m device with a raspberry cm4 and a custom yocto image. We have a PAL CVBS signal connected to the first input AIn1. The CVBS signal come from a a demodulated signal.
The attached video show how first decoding signal was ok (just a little bit darker) but after the signal was lost and come back again, the decoder try to lock on the signal but after a little bit of time it fall into free run mode... and come back again into lock signal, but very very darker.
I'm using the standard adv7180.c driver in mainline kernel.
Trying in fast switch mode (driver supported with v4l2-ctl -d 0 -c fast_switching=1) the results is the same, but the last "very very darker" decoding is not reached. The device still in free run mode.
The only thing "unlock" the adv7280 to this bad behavior is launching the undocumented command i2cset -y -f 1 0x21 0x0F 0x40 which set bit 6 (reserved). It seems that the decoder is restarted after this command.
The command used to stream is
gst-launch-1.0 v4l2src norm=7 ! videoscale ! videoconvert ! fbdevsink
Tried to disable autodetect (i2cset -y -f 1 0x21 0x07 0x00) and set PAL format manually (i2cset -y -f 1 0x21 0x02 0x84) without success.
Tried to use fast switch mode using adi script ADV7280M_Cust-VER.4.1.txt ##CVBS FAST Switch## Fast Switch CVBS Single Ended In Ain 1, MIPI Out:
i2cset -y -f 1 0x21 0x0F 0x00 && echo "Exit Power Down Mode"
i2cset -y -f 1 0x21 0x00 0x00 && echo "INSEL = CVBS in on Ain 1"
i2cset -y -f 1 0x21 0x0E 0x80 && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x9C 0x00 && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x9C 0xFF && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x0E 0x00 && echo "Enter User Sub Map"
i2cset -y -f 1 0x21 0x03 0x4E && echo "ADI Required Write"
i2cset -y -f 1 0x21 0x04 0x57 && echo "Power-up INTRQ pin"
i2cset -y -f 1 0x21 0x13 0x00 && echo "Enable INTRQ output driver"
i2cset -y -f 1 0x21 0x17 0x41 && echo "select SH1"
i2cset -y -f 1 0x21 0x1D 0xC0 && echo "Tri-S LLC output driver"
i2cset -y -f 1 0x21 0x52 0xCD && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0x80 0x51 && echo "0xADI Requir0xed Writes "
i2cset -y -f 1 0x21 0x81 0x51 && echo "0xADI Requir0xed Writes "
i2cset -y -f 1 0x21 0x82 0x68 && echo "0xADI Requir0xed Writes "
i2cset -y -f 1 0x21 0x0E 0x80 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0xD9 0x44 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0x0E 0x00 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x21 0x0E 0x40 && echo "Sel0xect User Sub Map 2"
i2cset -y -f 1 0x21 0xE0 0x01 && echo "Sel0xect 0xfast Switching Mo0xde"
i2cset -y -f 1 0x21 0x0E 0x00 && echo "Sel0xect User Map"
i2cset -y -f 1 0x21 0xFE 0x88 && echo "Set CSI Map 0xAddress"
i2cset -y -f 1 0x44 0xDE 0x02 && echo "Power up D-Phy"
i2cset -y -f 1 0x44 0xD2 0xF7 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0xD8 0x65 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0xE0 0x09 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0x2C 0x00 && echo "0xADI Requir0xed Writes"
i2cset -y -f 1 0x44 0x00 0x00 && echo "Power up CSI Tx"
It seems that there is some auto tools that goes into a bad state
Any suggestion? There's need more info?