All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: Hans de Goede <hdegoede@redhat.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] gspca_cpia1: Add lamp control for Intel Play QX3 microscope
Date: Sun, 05 Sep 2010 14:30:41 -0400	[thread overview]
Message-ID: <1283711441.2057.65.camel@morgan.silverblock.net> (raw)
In-Reply-To: <4C8353D3.3050708@redhat.com>

On Sun, 2010-09-05 at 10:24 +0200, Hans de Goede wrote:
> Hi,
> 
> p.s. (forgot to mention this in my previous mail)
> 
> On 09/03/2010 03:09 AM, Andy Walls wrote:
> 
> <snip>
> 
> > @@ -447,6 +449,20 @@
> >   		.set = sd_setcomptarget,
> >   		.get = sd_getcomptarget,
> >   	},
> > +	{
> > +		{
> > +#define V4L2_CID_LAMPS (V4L2_CID_PRIVATE_BASE+1)
> > +			.id	 = V4L2_CID_LAMPS,
> > +			.type    = V4L2_CTRL_TYPE_MENU,
> > +			.name    = "Lamps",
> > +			.minimum = 0,
> > +			.maximum = 3,
> > +			.step    = 1,
> > +			.default_value = 0,
> > +		},
> > +		.set = sd_setlamps,
> > +		.get = sd_getlamps,
> > +	},
> >   };
> >
> >   static const struct v4l2_pix_format mode[] = {
> 
> We only want this control to be available on the qx3 and not on
> all cpia1 devices,

Yes, I though about that, but couldn't think up a clean way of doing it
in the short amount of time I had available.  I did know that the
control was essentially a NoOp, so I wasn't too concerned at the time. 


>  so you need to add something like the following to
> sd_config:
> 
> 	if (!(id->idVendor == 0x0813 && id->idProduct == 0x0001))
> 		gspca_dev->ctrl_dis = 1 << LAMPS_IDX;
> 
> Where LAMPS_IDX is a define giving the index of V4L2_CID_LAMPS in the
> sd_ctrls array, see the ov519 gspca driver for example.

Thanks for the pointer, I'll have a look.

Regards,
Andy

> Regards,
> 
> Hans



      reply	other threads:[~2010-09-05 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03  1:09 [PATCH] gspca_cpia1: Add lamp control for Intel Play QX3 microscope Andy Walls
2010-09-03  8:38 ` Jean-Francois Moine
2010-09-03 15:35   ` Andy Walls
2010-09-05  8:03 ` Hans de Goede
2010-09-05 18:02   ` Andy Walls
2010-09-05  8:24 ` Hans de Goede
2010-09-05 18:30   ` Andy Walls [this message]

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=1283711441.2057.65.camel@morgan.silverblock.net \
    --to=awalls@md.metrocast.net \
    --cc=hdegoede@redhat.com \
    --cc=linux-media@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.