Hi Laurent On Wed, 7 Sept 2022 at 01:42, Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> wrote: > > Hi Dave, > > On Tue, Sep 06, 2022 at 08:53:41PM +0300, Laurent Pinchart wrote: > > On Tue, Sep 06, 2022 at 05:14:30PM +0100, Dave Stevenson wrote: > > > Hi All. > > > > > > I realise that I'm in a slightly different position from many mainline > > > Linux-media developers in that I see multiple use cases for the same > > > sensor, rather than a driver predominantly being for one > > > product/platform. I'm therefore wanting to look at generic solutions > > > and fully featured drivers. Users get to decide the use cases, not the > > > hardware designers. > > > > Could you clarify here what you mean by users and hardware designers ? > > Users can be understood as > > > > - Users of the camera sensor, i.e. OEMs designing a product > > - Users of the hardware platform , i.e. software developers writing > > applications > > - Users of the software, i.e. end-users > > > > Hardware designers could then equally mean > > > > - Sensor vendors > > - SoC vendors > > - Board vendors > > - Product vendors > > > > > The issues I've raised are things that I've encountered and would > > > benefit from a discussion to get views as to the direction that is > > > perceived to be workable. I appreciate that some can not be solved > > > immediately, but want to avoid too much bikeshedding in the first > > > round of patches. > > > What's realistic, and what pitfalls/limitations immediately jump out at people. > > > > > > Slides are at https://drive.google.com/file/d/1vjYJjTNRL1P3j6G4Nx2ZpjFtTBTNdeFG/view?usp=sharing > > > > Thank you, I will review that ASAP. > > A few questions: > > - Regarding the sensor synchronization, are you considering the trigger > signal as signaling the beginning of exposure only, or also use cases > where it controls the exposure duration ? I was predominantly thinking of the modes offered by the sensor vendors for synchronisation with other identical modules. Exactly which phase of the capture is synchronised is therefore down to the sensor vendor. (AIUI typically this will be the start of exposure that is triggered. If the sensors are programmed for different exposure times, then start of readout will be at slightly different points. That would mean that trying to synchronise the two streams based on timestamps will fail, but sequence numbers should match as long as the slave is started before the master). > - For VCM ringing reduction and standardization of parameters, are there > examples you could share to explain this in more details, with the > type of parameters that need to be specified ? This was one that I hadn't fully thought through as to whether it could be standardised, but a discussion that ended with acceptance that we needed module specific DT parameters was equally valid. A couple of examples: Fitipower FP5510E offers a linear slope mode, or two step control mode http://www.jifangsz.com/FP5510E-Preliminary%200.2-JAN-2018.pdf. Dongwoon DW9714A is nearly identical to FP5510E. Dongwoon DW9807 and DW9817 are nearly identical to each other, but DW9807 drives 0-100mA, whilst DW9817 is bi-drectional and +/- 100mA. "Smart Actuator Control" is derived off an internal oscillator and takes a prescaler (x1, x2, or x4), timing (7 bit as 0.03ms steps), and a mode (target movement time against a "mechanical vibration period"). > And one comment. On slide 20/23, you wrote > > Likely to produce a load of boilerplate in all drivers. Abstract out > an image sensor pinctrl helper? > > I think we need more than that, we need a large helper for camera > sensors (in particular for raw sensors) that will bridge the large gap > between the sensor and the V4L2 subdev API. There's too much boilerplate > code already, and worse, different sensor drivers exposing the same > feature to userspace in different ways. Absolutely on too much boilerplate and then variation already. If helpers can do all the work then that's great, and I'm happy to look at doing some of that. It does need the "correct" implementation to have been defined in the first place..... Dave > > > See you on Monday. > > -- > Regards, > > Laurent Pinchart