public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Adam Baker <linux@baker-net.org.uk>, kilgota@banach.math.auburn.edu
Cc: linux-media@vger.kernel.org,
	Driver Development <sqcam-devel@lists.sourceforge.net>,
	Gerard Klaver <gerard@gkall.hobby.nl>
Subject: Re: [PATCH] Add support for sq905 based cameras to gspca
Date: Wed, 21 Jan 2009 18:20:33 +0100	[thread overview]
Message-ID: <20090121182033.278f213d@free.fr> (raw)
In-Reply-To: <200901192322.33362.linux@baker-net.org.uk>

On Mon, 19 Jan 2009 23:22:33 +0000
Adam Baker <linux@baker-net.org.uk> wrote:

> Add initial support for cameras based on the SQ Technologies SQ-905
> chipset (USB ID 2770:9120) to V4L2 using the gspca infrastructure.
	[snip]
> ---
> Following all the comments when I posted this for review Theodore and
> I have produced 2 new versions. The most critical comment last time
> was that we were using the system work queue inappropriately so this
> version creates its own work queue. The alternative version that I
> will post shortly avoids a work queue altogether by using
> asynchronous USB commands but in order to do so has increased the
> code size.
> 
> I'll leave it to the assembled list expertise to say which option is
> preferable.
	[snip]

Hello Adam and Theodore,

I looked at your two versions, and I think the first one (work queue)
is the simplest. So, I am ready to put your driver in my repository for
inclusion in a next linux kernel.

I have just a few remarks and a request.

- There are still small CodingStyle errors.

- Why do you need the function name in the debug messages?

- In sd_init, you should better convert the 4 bytes to u32 and do a
  switch.

- On disconnection, the function sd_stopN is not called, so the
  workqueue may be still running.

- At streamon time (sd_start), you allocate the buffer and send a
  command. This may be done in the workqueue function. This function may
  also do the buffer free and send the stop command on exit.

Re-thinking the streaming part gives:
. streamon (sd_start)
	. init_completion()
	. start the workqueue
	  (dev->streaming is not useful)
. workqueue function
	. allocate the transfer buffer (pointer in the stack)
	. send 'start capture'
	. read loop - don't forget:
		- to test gspca_dev->streaming: it may be streamoff,
			close or disconnect
		- to protect to usb_control_msg by the
			gspca_dev->usb_lock mutex: this will permit
			to handle future webcam controls.
	. on streamoff or USB error
		. free the transfer buffer
		. complete()
. streamoff
	. sd_stopN: non useful
	. sd_stop0:
		. wait_for_completion
		. dev->work_thread = NULL

Now, the request: some guys asked for support of their webcams based on
sq930x chips. A SANE backend driver exists, written by Gerard Klaver
(http://gkall.hobby.nl/sq930x.html).
May you have a look and say if handling these chips may be done in your
driver?

Regards.

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

  parent reply	other threads:[~2009-01-21 17:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 23:22 [PATCH] Add support for sq905 based cameras to gspca Adam Baker
2009-01-20  3:33 ` Alexey Klimov
2009-01-21 17:20 ` Jean-Francois Moine [this message]
2009-01-21 19:10   ` kilgota
2009-01-22  4:17   ` Why not to try to combine sq905 and sq kilgota
     [not found] ` <200901272101.27451.linux@baker-net.org.uk>
     [not found]   ` <alpine.LNX.2.00.0901271543560.21122@banach.math.auburn.edu>
     [not found]     ` <200901272228.42610.linux@baker-net.org.uk>
     [not found]       ` <20090128113540.25536301@free.fr>
     [not found]         ` <alpine.LNX.2.00.0901281554500.22748@banach.math.auburn.edu>
     [not found]           ` <20090131203650.36369153@free.fr>
     [not found]             ` <alpine.LNX.2.00.0902022032230.1080@banach.math.auburn.edu>
2009-02-03  9:39               ` [PATCH] Add support for sq905 based cameras to gspca Jean-Francois Moine
2009-02-03 17:30                 ` kilgota
2009-02-03 18:21                   ` kilgota
2009-02-03 18:13                     ` Jean-Francois Moine
2009-02-03 19:15                       ` kilgota
2009-02-03 19:23                         ` Jean-Francois Moine
2009-02-03 19:54                           ` kilgota
2009-02-03 19:47                             ` Jean-Francois Moine
2009-02-03 19:59                             ` Alan Stern
2009-02-03 22:23                               ` kilgota
2009-02-04  2:02                                 ` Alan Stern
2009-02-04  3:12                                   ` kilgota
2009-02-03 22:09                           ` Adam Baker
2009-02-03 22:28                             ` kilgota
2009-02-04  1:59                             ` Alan Stern
2009-02-04  2:33                             ` Andy Walls
2009-02-04 21:38                               ` Adam Baker
2009-02-04 22:31                                 ` kilgota
2009-02-04 22:34                                   ` Adam Baker
2009-02-04 22:53                                     ` kilgota
2009-02-04 23:09                                       ` kilgota
2009-02-03 19:42                       ` kilgota
2009-02-03 19:53                       ` Alan Stern

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=20090121182033.278f213d@free.fr \
    --to=moinejf@free.fr \
    --cc=gerard@gkall.hobby.nl \
    --cc=kilgota@banach.math.auburn.edu \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@baker-net.org.uk \
    --cc=sqcam-devel@lists.sourceforge.net \
    /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