public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: video4linux-list@redhat.com,
	Sakari Ailus <sakari.ailus@nokia.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH v2] soc-camera: add API documentation
Date: Sat, 30 Aug 2008 16:58:46 +0200	[thread overview]
Message-ID: <1220108326.1726.31.camel@localhost> (raw)
In-Reply-To: <20080830070310.2ec060d7@mchehab.chehab.org>

On Sat, 2008-08-30 at 07:03 -0300, Mauro Carvalho Chehab wrote:
	[snip]
> Yes, but still, this is something that it is still painful: gspca has lots of
> "magic" constants inside. Things like (from etoms.c):
> 	reg_w_val(gspca_dev, 0x80, 0x00);
	[snip]
> It is something really hard to understand why reg 3 needs value 1. OK, I know that
> most of this came from snooping URB's at another system driver, but, if there
> were bugs at the reversed-engineered driver (and there are bugs there also),
> you won't have any glue to debug.

Anyway you do it, I (we) have almost no information about the webcam
bridges and sensors. Sometimes, we find some documents and then, the
spec calls RSVD (reserved) some registers which are later differently
initialized for such and such bridge!

> It is much clearer if you look, for example, at ov7670:
> 	{ REG_CLKRC, 0x1 },	/* OV: clock scale (30 fps) */
> 	{ REG_TSLB,  0x04 },	/* OV */
	[snip]
> Ok, it is not fair to compare with ov7670, since I suspect that OLPC got the
> datasheets for that device. Yet, having a driver for each sensor makes easier
> to add more detailed info at that driver, if later the device manufacturer
> opens for us their datasheets, like several manufacturers already did.

I don't think so. First, I don't think the device manufacturers will
give information about their product: they prefer to sell opaque
drivers. Then, as, at job, I built firmware for embedded boards, I know
that a master/slave interface may be very complex and not easy to
explain. Also, once the driver works, why would you change anything?

> > If you look at the gspca code, you will see that many sensors are used
> > by different bridges. Indeed, some values are closed from each other,
> > but what to do with the differences? (the initial values of the sensor
> > registers seem to be tied to the physical wires, signal levels and
> > capabilities of the bridges)
> 
> I can see two ways:
	[snip]

Why do you want the drivers to be so complexified? I already tried to
look at such drivers, and I could not find where was the used code. With
gspca, all the webcam dependant stuff is located in one file only.

> The real gain is not the size reduction. Having a generic module for a sensor
> have some benefits:
> 
> 1) All common stuff being there means that it will be easier to maintain, since
> a bug found on one module should be replied on other modules;

I never saw that!

> 2) Newer drivers may be written faster, since they may use the existing code.

Usually, newer drivers are written because they do not fall into some
existing code.

> I'm not saying that we _need_ to do this change for gspca. I'm just saying that
> this is a _good_ improvement to the code. I know that this change
> requires lots of janitors effort with little gain to the end users.

I would go to an other way: instead of developping general functions
which have to be customized, why don't you use the generic gspca driver
as a base for all the USB video devices (including TV)?

Cheers.

-- 
Ken ar c'hentañ |             ** Breizh ha Linux atav! **
Jef             |               http://moinejf.free.fr/


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  parent reply	other threads:[~2008-08-30 15:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20  9:40 [PATCH RFC] soc-camera: add API documentation Guennadi Liakhovetski
2008-08-20 20:29 ` Robert Jarzmik
2008-08-24 11:57 ` Robert Schwebel
2008-08-28 14:49   ` [PATCH v2] " Guennadi Liakhovetski
2008-08-28 18:58     ` Hans Verkuil
2008-08-29 12:17       ` Sakari Ailus
2008-08-29 13:43         ` Hans Verkuil
     [not found]           ` <20080829183420.1fcbfc11@mchehab.chehab.org>
2008-08-30  7:22             ` Jean-Francois Moine
     [not found]               ` <20080830070310.2ec060d7@mchehab.chehab.org>
2008-08-30 14:58                 ` Jean-Francois Moine [this message]
2008-08-30 19:41                   ` Hans Verkuil
2008-09-05 16:08           ` Sakari Ailus
2008-09-06 16:40             ` Hans Verkuil
2008-09-29  8:33               ` Interfaces for composite devices (was: Re: [PATCH v2] soc-camera: add API documentation) Sakari Ailus
2008-09-29  9:04                 ` Hans Verkuil
2008-08-29 18:16       ` [PATCH v3] soc-camera: add API documentation Guennadi Liakhovetski
2008-08-29 18:16         ` Hans Verkuil
2008-08-29 18:55           ` Guennadi Liakhovetski
2008-09-27 22:38       ` [PATCH v2] " Guennadi Liakhovetski
2008-09-29  9:25         ` Hans Verkuil
2008-09-29  9:45           ` Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1220108326.1726.31.camel@localhost \
    --to=moinejf@free.fr \
    --cc=g.liakhovetski@gmx.de \
    --cc=mchehab@infradead.org \
    --cc=sakari.ailus@nokia.com \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox