Please note that I am no expert on this chip, just making observations from basic experimentation. You could approach Analog Devices for further support.Hi,
finally my custom board has started to operate. The image is really quite nice.
However we notice a strange phenomenon : for 3-4 tries 1 time (after power-up the system) we got an image completely out of settings we sent before start command (contrast, brightness). Then after next boot the image is as it should be. How can we prevent it ?
The driver is part of mainline Linux, and it is listed as supported rather than maintained, so you could approach them (email the linux-media mailing list at the same time).
The ADV7282 has an internal auto gain and auto contrast function. From the datasheet
Reading the hardware reference manual page 41 documents some options on gain control (luma and chroma separately). As does the the device manualThe ADV7282A features an automatic gain control (AGC)
algorithm to ensure that the optimum luma gain is selected as
the input video varies in brightness.
ACE is an algorithm that automatically varies the contrast level
applied across an image to enhance the picture detail visible.
I don't see the driver changing any of those registers, which would imply that it is adaptive mode and "AGC, peak white algorithm on (blank level to sync
tip)".
I'd suggest you look to read back the luma and chroma gains (registers 0x2d/2e for chroma and 0x2f/0x30 for luma) and see whether you are getting significantly different results between your good runs and the bad runs.
Pass to USB as a peripheral, or pass on to a USB peripheral? It makes big difference.And one more question : is there any tutorial how to finally obtain a stream (let's say mp4 - audio/video) which we could pass to USB for further actions?
Making the Pi act as a USB peripheral (USB gadget mode) is only supported via the USB2 interface on the USB-C connector of a Pi4 (or 5). There are a number of tutorials about making a V4L2 camera appear as a USB webcam. https://www.raspberrypi.com/tutorials/p ... sb-webcam/ or https://www.jeffgeerling.com/blog/2020/ ... webcam-100, although both may be out of date due to age.
Video is independent of audio for these use cases, and seeing as the Pi has no audio input you're probably better off routing it directly to a USB sound card.
If looking to save the video to an MP4 file on USB storage, or network stream, then look at how to build a GStreamer pipeline. v4l2h264enc would be the hardware H264 encoder, and you'll be looking for h264parse, qtmux, and filesink to save an MP4 file.
Statistics: Posted by 6by9 — Wed Jun 26, 2024 10:53 am