Re: [PATCH 1/3] gspca_cpia1: Add basic v4l2 illuminator controls for the Intel Play QX3

2010-09-12 Thread Hans de Goede

Ack.

Acked-by: Hans de Goede hdego...@redhat.com

On 09/12/2010 03:51 AM, Andy Walls wrote:

gspca_cpia1: Add basic v4l2 illuminator controls for the Intel Play QX3

This patch add basic V4L2 controls for the illuminators on the Intel
Play QX3 microscope.

Signed-off-by: Andy Wallsawa...@md.metrocast.net

diff -r 6e0befab696a -r d165649ca8a0 linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c   Fri Sep 03 00:28:05 2010 -0300
+++ b/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 14:15:26 2010 -0400
@@ -373,6 +373,10 @@
  static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
  static int sd_setcomptarget(struct gspca_dev *gspca_dev, __s32 val);
  static int sd_getcomptarget(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setilluminator1(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getilluminator1(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setilluminator2(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getilluminator2(struct gspca_dev *gspca_dev, __s32 *val);

  static const struct ctrl sd_ctrls[] = {
{
@@ -434,6 +438,34 @@
},
{
{
+   .id  = V4L2_CID_ILLUMINATORS_1,
+   .type= V4L2_CTRL_TYPE_BOOLEAN,
+   .name= Illuminator 1,
+   .minimum = 0,
+   .maximum = 1,
+   .step= 1,
+#define ILLUMINATORS_1_DEF 0
+   .default_value = ILLUMINATORS_1_DEF,
+   },
+   .set = sd_setilluminator1,
+   .get = sd_getilluminator1,
+   },
+   {
+   {
+   .id  = V4L2_CID_ILLUMINATORS_2,
+   .type= V4L2_CTRL_TYPE_BOOLEAN,
+   .name= Illuminator 2,
+   .minimum = 0,
+   .maximum = 1,
+   .step= 1,
+#define ILLUMINATORS_2_DEF 0
+   .default_value = ILLUMINATORS_2_DEF,
+   },
+   .set = sd_setilluminator2,
+   .get = sd_getilluminator2,
+   },
+   {
+   {
  #define V4L2_CID_COMP_TARGET V4L2_CID_PRIVATE_BASE
.id  = V4L2_CID_COMP_TARGET,
.type= V4L2_CTRL_TYPE_MENU,
@@ -1059,7 +1091,6 @@
  0, sd-params.streamStartLine, 0, 0);
  }

-#if 0 /* Currently unused */ /* keep */
  static int command_setlights(struct gspca_dev *gspca_dev)
  {
struct sd *sd = (struct sd *) gspca_dev;
@@ -1079,7 +1110,6 @@
return do_command(gspca_dev, CPIA_COMMAND_WriteMCPort, 2, 0,
  p1 | p2 | 0xE0, 0);
  }
-#endif

  static int set_flicker(struct gspca_dev *gspca_dev, int on, int apply)
  {
@@ -1932,6 +1962,72 @@
return 0;
  }

+static int sd_setilluminator(struct gspca_dev *gspca_dev, __s32 val, int n)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+
+   if (!sd-params.qx3.qx3_detected)
+   return -EINVAL;
+
+   switch (n) {
+   case 1:
+   sd-params.qx3.bottomlight = val ? 1 : 0;
+   break;
+   case 2:
+   sd-params.qx3.toplight = val ? 1 : 0;
+   break;
+   default:
+   return -EINVAL;
+   }
+
+   ret = command_setlights(gspca_dev);
+   if (ret  ret != -EINVAL)
+   ret = -EBUSY;
+
+   return ret;
+}
+
+static int sd_setilluminator1(struct gspca_dev *gspca_dev, __s32 val)
+{
+   return sd_setilluminator(gspca_dev, val, 1);
+}
+
+static int sd_setilluminator2(struct gspca_dev *gspca_dev, __s32 val)
+{
+   return sd_setilluminator(gspca_dev, val, 2);
+}
+
+static int sd_getilluminator(struct gspca_dev *gspca_dev, __s32 *val, int n)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+
+   if (!sd-params.qx3.qx3_detected)
+   return -EINVAL;
+
+   switch (n) {
+   case 1:
+   *val = sd-params.qx3.bottomlight;
+   break;
+   case 2:
+   *val = sd-params.qx3.toplight;
+   break;
+   default:
+   return -EINVAL;
+   }
+   return 0;
+}
+
+static int sd_getilluminator1(struct gspca_dev *gspca_dev, __s32 *val)
+{
+   return sd_getilluminator(gspca_dev, val, 1);
+}
+
+static int sd_getilluminator2(struct gspca_dev *gspca_dev, __s32 *val)
+{
+   return sd_getilluminator(gspca_dev, val, 2);
+}
+
  static int sd_querymenu(struct gspca_dev *gspca_dev,
struct v4l2_querymenu *menu)
  {





--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] gspca_cpia1: Disable illuminator controls if not an Intel Play QX3

2010-09-12 Thread Hans de Goede

Hi,

On 09/12/2010 03:51 AM, Andy Walls wrote:

gspca_cpia1: Disable illuminator controls if not an Intel Play QX3

The illuminator controls should only be available to the user for the Intel
Play QX3 microscope.

Signed-off-by: Andy Wallsawa...@md.metrocast.net

diff -r d165649ca8a0 -r 32d5c323c541 linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 14:15:26 2010 -0400
+++ b/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 21:15:03 2010 -0400
@@ -1743,6 +1743,22 @@
do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0);
  }

+static void sd_disable_qx3_ctrls(struct gspca_dev *gspca_dev)
+{
+   int i, n;
+   __u32 id;
+
+   n = ARRAY_SIZE(sd_ctrls);
+   for (i = 0; i  n; i++) {
+   id = sd_ctrls[i].qctrl.id;
+
+   if (id == V4L2_CID_ILLUMINATORS_1 ||
+   id == V4L2_CID_ILLUMINATORS_2) {
+   gspca_dev-ctrl_dis |= (1  i);
+   }
+   }
+}
+
  /* this function is called at probe and resume time */
  static int sd_init(struct gspca_dev *gspca_dev)
  {


Hmm, this deviates from how all other gspca subdrivers do this, they
define indexes for ctrls together with the sd_ctrls intializer and
then use these, so instead of the above blurb there would be
a

#define ILLUMINATORS_1_IDX x
#define ILLUMINATORS_2_IDX x

Where these ctrls get defined (see for example ov519.c)

And then:


+   if (!sd-params.qx3.qx3_detected)
+   sd_disable_qx3_ctrls(gspca_dev);
+


Would become:

if (!sd-params.qx3.qx3_detected)
gspca_dev-ctrl_dis |= (1  ILLUMINATORS_1_IDX) |
   (1  ILLUMINATORS_2_IDX);

I think it would be good to use the same construction in the cpia1
driver for consistency between all the gspca subdrivers.

Regards,

Hans

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume

2010-09-12 Thread Hans de Goede

Hi,

On 09/12/2010 03:51 AM, Andy Walls wrote:

gspca_cpia1: Restore QX3 illuminators' state on resume

Turn the lights of the QX3 on (or off) as needed when resuming and at module
load.

Signed-off-by: Andy Wallsawa...@md.metrocast.net

diff -r 32d5c323c541 -r c2e7fb2d768e linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 21:15:03 2010 -0400
+++ b/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 21:32:35 2010 -0400
@@ -1772,6 +1772,10 @@
if (ret)
return ret;

+   /* Ensure the QX3 illuminators' states are restored upon resume */
+   if (sd-params.qx3.qx3_detected)
+   command_setlights(gspca_dev);
+
sd_stopN(gspca_dev);

if (!sd-params.qx3.qx3_detected)



Notice the:

if (sd-params.qx3.qx3_detected)
command_setlights(gspca_dev);

sd_stopN(gspca_dev);

if (!sd-params.qx3.qx3_detected)


Given that at least the order of execution of the second if statement
does not matter wrt to the sd_stopN(gspca_dev), can we please
make this:

if (sd-params.qx3.qx3_detected)
command_setlights(gspca_dev);
else


sd_stopN(gspca_dev);

Thanks,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] gspca_cpia1: Disable illuminator controls if not an Intel Play QX3

2010-09-12 Thread Hans Verkuil
On Sunday, September 12, 2010 09:26:24 Hans de Goede wrote:
 Hi,
 
 On 09/12/2010 03:51 AM, Andy Walls wrote:
  gspca_cpia1: Disable illuminator controls if not an Intel Play QX3
 
  The illuminator controls should only be available to the user for the Intel
  Play QX3 microscope.
 
  Signed-off-by: Andy Wallsawa...@md.metrocast.net
 
  diff -r d165649ca8a0 -r 32d5c323c541 linux/drivers/media/video/gspca/cpia1.c
  --- a/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 14:15:26 
  2010 -0400
  +++ b/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 21:15:03 
  2010 -0400
  @@ -1743,6 +1743,22 @@
  do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0);
}
 
  +static void sd_disable_qx3_ctrls(struct gspca_dev *gspca_dev)
  +{
  +   int i, n;
  +   __u32 id;
  +
  +   n = ARRAY_SIZE(sd_ctrls);
  +   for (i = 0; i  n; i++) {
  +   id = sd_ctrls[i].qctrl.id;
  +
  +   if (id == V4L2_CID_ILLUMINATORS_1 ||
  +   id == V4L2_CID_ILLUMINATORS_2) {
  +   gspca_dev-ctrl_dis |= (1  i);
  +   }
  +   }
  +}
  +
/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{
 
 Hmm, this deviates from how all other gspca subdrivers do this, they
 define indexes for ctrls together with the sd_ctrls intializer and
 then use these, so instead of the above blurb there would be
 a
 
 #define ILLUMINATORS_1_IDX x
 #define ILLUMINATORS_2_IDX x
 
 Where these ctrls get defined (see for example ov519.c)
 
 And then:
 
  +   if (!sd-params.qx3.qx3_detected)
  +   sd_disable_qx3_ctrls(gspca_dev);
  +
 
 Would become:
 
   if (!sd-params.qx3.qx3_detected)
   gspca_dev-ctrl_dis |= (1  ILLUMINATORS_1_IDX) |
  (1  ILLUMINATORS_2_IDX);
 
 I think it would be good to use the same construction in the cpia1
 driver for consistency between all the gspca subdrivers.

Slightly off-topic: it would be nice if someone would look into converting
gspca to the new control framework. I strongly suspect that that would
simplify control handling in gspca.

Regards,

Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] DiSEqC bug fixed for stv0288 based interfaces

2010-09-12 Thread Josef Pavlik
seems that the patch was corrupted by the kmail used for the post (missing 
space before the last close bracket resulting corrupted patch)
the corrected patch follows (and I'm sending it with another mail program)

Signed-off-by: Josef Pavlik jo...@pavlik.it

-
diff --git a/drivers/media/dvb/frontends/stv0288.c 
b/drivers/media/dvb/frontends/stv0288.c
index 2930a5d..6cd442e 100644
--- a/drivers/media/dvb/frontends/stv0288.c
+++ b/drivers/media/dvb/frontends/stv0288.c
@@ -6,6 +6,8 @@
Copyright (C) 2008 Igor M. Liplianin liplia...@me.by
Removed stb6000 specific tuner code and revised some
procedures.
+2010-09-01 Josef Pavlik jo...@pavlik.it
+Fixed diseqc_msg, diseqc_burst and set_tone problems
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -156,14 +158,13 @@ static int stv0288_send_diseqc_msg(struct dvb_frontend 
*fe,
 
stv0288_writeregI(state, 0x09, 0);
msleep(30);
-   stv0288_writeregI(state, 0x05, 0x16);
+   stv0288_writeregI(state, 0x05, 0x12); /* modulated mode, single shot */
 
for (i = 0; i  m-msg_len; i++) {
if (stv0288_writeregI(state, 0x06, m-msg[i]))
return -EREMOTEIO;
-   msleep(12);
}
-
+msleep(m-msg_len*12); 
return 0;
 }
 
@@ -174,13 +175,14 @@ static int stv0288_send_diseqc_burst(struct dvb_frontend 
*fe,
 
dprintk(%s\n, __func__);
 
-   if (stv0288_writeregI(state, 0x05, 0x16))/* burst mode */
-   return -EREMOTEIO;
-
-   if (stv0288_writeregI(state, 0x06, burst == SEC_MINI_A ? 0x00 : 0xff))
+if (stv0288_writeregI(state, 0x05, 0x03)) /* simple tone burst mode, 
single shot */
+return -EREMOTEIO;
+   
+if (stv0288_writeregI(state, 0x06, burst == SEC_MINI_A ? 0x00 : 0xff))
return -EREMOTEIO;
 
-   if (stv0288_writeregI(state, 0x06, 0x12))
+msleep(15);
+   if (stv0288_writeregI(state, 0x05, 0x12))
return -EREMOTEIO;
 
return 0;
@@ -192,18 +194,19 @@ static int stv0288_set_tone(struct dvb_frontend *fe, 
fe_sec_tone_mode_t tone)
 
switch (tone) {
case SEC_TONE_ON:
-   if (stv0288_writeregI(state, 0x05, 0x10))/* burst mode */
+   if (stv0288_writeregI(state, 0x05, 0x10))/* burst mode, 
continuous carrier */
return -EREMOTEIO;
-   return stv0288_writeregI(state, 0x06, 0xff);
+break;
 
case SEC_TONE_OFF:
-   if (stv0288_writeregI(state, 0x05, 0x13))/* burst mode */
+   if (stv0288_writeregI(state, 0x05, 0x12))/* burst mode off*/
return -EREMOTEIO;
-   return stv0288_writeregI(state, 0x06, 0x00);
+break;
 
default:
return -EINVAL;
}
+return 0;
 }
 
 static u8 stv0288_inittab[] = {
-



On Sep 8, 2010, at 21:16 , Mauro Carvalho Chehab wrote:

 Em 01-09-2010 09:35, Josef Pavlik escreveu:
 Fixed problem with DiSEqC communication. The message was wrongly modulated, 
 so the DiSEqC switch was not work.
 
 This patch fixes DiSEqC messages, simple tone burst and tone on/off. 
 I verified it with osciloscope against the DiSEqC documentation.
 
 Interface: PCI DVB-S TV tuner TeVii S420
 Kernel: 2.6.32-24-generic (UBUNTU 10.4)
 
 Signed-off-by: Josef Pavlik jo...@pavlik.it
 
 Patch doesn't apply against the latest version, at my -git tree. 
 Not sure if the bugs you're pointing were already fixed.
 
 Cheers,
 Mauro.
 
 
 
 
 diff --git a/drivers/media/dvb/frontends/stv0288.c 
 b/drivers/media/dvb/frontends/stv0288.c
 index 2930a5d..6a32535 100644
 --- a/drivers/media/dvb/frontends/stv0288.c
 +++ b/drivers/media/dvb/frontends/stv0288.c
 @@ -6,6 +6,8 @@
Copyright (C) 2008 Igor M. Liplianin liplia...@me.by
Removed stb6000 specific tuner code and revised some
procedures.
 +   2010-09-01 Josef Pavlik jo...@pavlik.it
 +   Fixed diseqc_msg, diseqc_burst and set_tone problems
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
 @@ -156,14 +158,13 @@ static int stv0288_send_diseqc_msg(struct dvb_frontend 
 *fe,
 
stv0288_writeregI(state, 0x09, 0);
msleep(30);
 -   stv0288_writeregI(state, 0x05, 0x16);
 +   stv0288_writeregI(state, 0x05, 0x12); /* modulated mode, single shot 
 */
 
for (i = 0; i  m-msg_len; i++) {
if (stv0288_writeregI(state, 0x06, m-msg[i]))
return -EREMOTEIO;
 -   msleep(12);
}
 -
 +   msleep(m-msg_len*12);
return 0;
 }
 
 @@ -174,13 +175,14 @@ static int stv0288_send_diseqc_burst(struct 
 

Re: [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume

2010-09-12 Thread Andy Walls
Will do.

Regards,
Andy



Hans de Goede hdego...@redhat.com wrote:

Hi,

On 09/12/2010 03:51 AM, Andy Walls wrote:
 gspca_cpia1: Restore QX3 illuminators' state on resume

 Turn the lights of the QX3 on (or off) as needed when resuming and at module
 load.

 Signed-off-by: Andy Wallsawa...@md.metrocast.net

 diff -r 32d5c323c541 -r c2e7fb2d768e linux/drivers/media/video/gspca/cpia1.c
 --- a/linux/drivers/media/video/gspca/cpia1.cSat Sep 11 21:15:03 
 2010 -0400
 +++ b/linux/drivers/media/video/gspca/cpia1.cSat Sep 11 21:32:35 
 2010 -0400
 @@ -1772,6 +1772,10 @@
  if (ret)
  return ret;

 +/* Ensure the QX3 illuminators' states are restored upon resume */
 +if (sd-params.qx3.qx3_detected)
 +command_setlights(gspca_dev);
 +
  sd_stopN(gspca_dev);

  if (!sd-params.qx3.qx3_detected)


Notice the:

   if (sd-params.qx3.qx3_detected)
   command_setlights(gspca_dev);

   sd_stopN(gspca_dev);

   if (!sd-params.qx3.qx3_detected)
   

Given that at least the order of execution of the second if statement
does not matter wrt to the sd_stopN(gspca_dev), can we please
make this:

   if (sd-params.qx3.qx3_detected)
   command_setlights(gspca_dev);
   else
   

   sd_stopN(gspca_dev);

Thanks,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
N�r��yb�X��ǧv�^�)޺{.n�+{���bj)w*jg����ݢj/���z�ޖ��2�ޙ�)ߡ�a�����G���h��j:+v���w��٥

Re: [PATCH 2/3] gspca_cpia1: Disable illuminator controls if not an Intel Play QX3

2010-09-12 Thread Andy Walls
Well, I was going for lower touch labor in the future, but sure I can change 
it.

Do you want indices defined for all the controls, or just the illuminators?

Regards,
Andy

Hans de Goede hdego...@redhat.com wrote:

Hi,

On 09/12/2010 03:51 AM, Andy Walls wrote:
 gspca_cpia1: Disable illuminator controls if not an Intel Play QX3

 The illuminator controls should only be available to the user for the Intel
 Play QX3 microscope.

 Signed-off-by: Andy Wallsawa...@md.metrocast.net

 diff -r d165649ca8a0 -r 32d5c323c541 linux/drivers/media/video/gspca/cpia1.c
 --- a/linux/drivers/media/video/gspca/cpia1.cSat Sep 11 14:15:26 
 2010 -0400
 +++ b/linux/drivers/media/video/gspca/cpia1.cSat Sep 11 21:15:03 
 2010 -0400
 @@ -1743,6 +1743,22 @@
  do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0);
   }

 +static void sd_disable_qx3_ctrls(struct gspca_dev *gspca_dev)
 +{
 +int i, n;
 +__u32 id;
 +
 +n = ARRAY_SIZE(sd_ctrls);
 +for (i = 0; i  n; i++) {
 +id = sd_ctrls[i].qctrl.id;
 +
 +if (id == V4L2_CID_ILLUMINATORS_1 ||
 +id == V4L2_CID_ILLUMINATORS_2) {
 +gspca_dev-ctrl_dis |= (1  i);
 +}
 +}
 +}
 +
   /* this function is called at probe and resume time */
   static int sd_init(struct gspca_dev *gspca_dev)
   {

Hmm, this deviates from how all other gspca subdrivers do this, they
define indexes for ctrls together with the sd_ctrls intializer and
then use these, so instead of the above blurb there would be
a

#define ILLUMINATORS_1_IDX x
#define ILLUMINATORS_2_IDX x

Where these ctrls get defined (see for example ov519.c)

And then:

 +if (!sd-params.qx3.qx3_detected)
 +sd_disable_qx3_ctrls(gspca_dev);
 +

Would become:

   if (!sd-params.qx3.qx3_detected)
   gspca_dev-ctrl_dis |= (1  ILLUMINATORS_1_IDX) |
  (1  ILLUMINATORS_2_IDX);

I think it would be good to use the same construction in the cpia1
driver for consistency between all the gspca subdrivers.

Regards,

Hans

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] DiSEqC bug fixed for stv0288 based interfaces

2010-09-12 Thread Josef Pavlik
sorry, but something eats the leading spaces (but no the tabs) in the inlined 
patch making it unusable, so please use the attached one.


-
on  Sep 12, 2010, at 13:30, I wrote:
seems that the patch was corrupted by the kmail used for the post (missing 
space before the last close bracket resulting corrupted patch)
the corrected patch follows (and I'm sending it with another mail program)

Signed-off-by: Josef Pavlik jo...@pavlik.it

-
diff --git a/drivers/media/dvb/frontends/stv0288.c 
b/drivers/media/dvb/frontends/stv0288.c
index 2930a5d..6cd442e 100644
--- a/drivers/media/dvb/frontends/stv0288.c
+++ b/drivers/media/dvb/frontends/stv0288.c
@@ -6,6 +6,8 @@
Copyright (C) 2008 Igor M. Liplianin liplia...@me.by
Removed stb6000 specific tuner code and revised some
procedures.
+2010-09-01 Josef Pavlik jo...@pavlik.it
+Fixed diseqc_msg, diseqc_burst and set_tone problems

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -156,14 +158,13 @@ static int stv0288_send_diseqc_msg(struct dvb_frontend 
*fe,

stv0288_writeregI(state, 0x09, 0);
msleep(30);
-   stv0288_writeregI(state, 0x05, 0x16);
+   stv0288_writeregI(state, 0x05, 0x12); /* modulated mode, single shot */

for (i = 0; i  m-msg_len; i++) {
if (stv0288_writeregI(state, 0x06, m-msg[i]))
return -EREMOTEIO;
-   msleep(12);
}
-
+msleep(m-msg_len*12); 
return 0;
}

@@ -174,13 +175,14 @@ static int stv0288_send_diseqc_burst(struct dvb_frontend 
*fe,

dprintk(%s\n, __func__);

-   if (stv0288_writeregI(state, 0x05, 0x16))/* burst mode */
-   return -EREMOTEIO;
-
-   if (stv0288_writeregI(state, 0x06, burst == SEC_MINI_A ? 0x00 : 0xff))
+if (stv0288_writeregI(state, 0x05, 0x03)) /* simple tone burst mode, 
single shot */
+return -EREMOTEIO;
+   
+if (stv0288_writeregI(state, 0x06, burst == SEC_MINI_A ? 0x00 : 0xff))
return -EREMOTEIO;

-   if (stv0288_writeregI(state, 0x06, 0x12))
+msleep(15);
+   if (stv0288_writeregI(state, 0x05, 0x12))
return -EREMOTEIO;

return 0;
@@ -192,18 +194,19 @@ static int stv0288_set_tone(struct dvb_frontend *fe, 
fe_sec_tone_mode_t tone)

switch (tone) {
case SEC_TONE_ON:
-   if (stv0288_writeregI(state, 0x05, 0x10))/* burst mode */
+   if (stv0288_writeregI(state, 0x05, 0x10))/* burst mode, 
continuous carrier */
return -EREMOTEIO;
-   return stv0288_writeregI(state, 0x06, 0xff);
+break;

case SEC_TONE_OFF:
-   if (stv0288_writeregI(state, 0x05, 0x13))/* burst mode */
+   if (stv0288_writeregI(state, 0x05, 0x12))/* burst mode off*/
return -EREMOTEIO;
-   return stv0288_writeregI(state, 0x06, 0x00);
+break;

default:
return -EINVAL;
}
+return 0;
}

static u8 stv0288_inittab[] = {
-



On Sep 8, 2010, at 21:16 , Mauro Carvalho Chehab wrote:

 Em 01-09-2010 09:35, Josef Pavlik escreveu:
 Fixed problem with DiSEqC communication. The message was wrongly modulated, 
 so the DiSEqC switch was not work.
 
 This patch fixes DiSEqC messages, simple tone burst and tone on/off. 
 I verified it with osciloscope against the DiSEqC documentation.
 
 Interface: PCI DVB-S TV tuner TeVii S420
 Kernel: 2.6.32-24-generic (UBUNTU 10.4)
 
 Signed-off-by: Josef Pavlik jo...@pavlik.it
 
 Patch doesn't apply against the latest version, at my -git tree. 
 Not sure if the bugs you're pointing were already fixed.
 
 Cheers,
 Mauro.
 
 
 
 
 diff --git a/drivers/media/dvb/frontends/stv0288.c 
 b/drivers/media/dvb/frontends/stv0288.c
 index 2930a5d..6a32535 100644
 --- a/drivers/media/dvb/frontends/stv0288.c
 +++ b/drivers/media/dvb/frontends/stv0288.c
 @@ -6,6 +6,8 @@
   Copyright (C) 2008 Igor M. Liplianin liplia...@me.by
   Removed stb6000 specific tuner code and revised some
   procedures.
 +   2010-09-01 Josef Pavlik jo...@pavlik.it
 +   Fixed diseqc_msg, diseqc_burst and set_tone problems
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 @@ -156,14 +158,13 @@ static int stv0288_send_diseqc_msg(struct dvb_frontend 
 *fe,
 
   stv0288_writeregI(state, 0x09, 0);
   msleep(30);
 -   stv0288_writeregI(state, 0x05, 0x16);
 +   stv0288_writeregI(state, 0x05, 0x12); /* modulated mode, single shot 
 */
 
   for (i = 0; i  m-msg_len; i++) {
   if (stv0288_writeregI(state, 0x06, m-msg[i]))
   return 

[PATCH v2 0/3] gpsca_cpia1: Intel Play QX3 microscope illuminator controls

2010-09-12 Thread Andy Walls
The following 3 patches implement v4l2 illuminator controls for the
Intel Play QX3 microscope.  These patches depend on Jean-Francois
Moine's patch that adds V4L2_CID_ILLUMINATORS_[12] to the standard v4l2
controls.

These patches do not attempt to turn off the illuminators at module
unload or at suspend time as I could not easily test suspend at the
moment.  These patches will restore the state of the illumination at
resume time and will ensure the illuminators are off at module load.

Thanks go to Hans de Goede for pointing out problems with the 
patch and suggested solutions.

Thanks go to Jean-Francois Moine for working to get Illuminator controls
in place as standard V4L2 controls.


Maybe soon we'll be able to answer the question:

How many LMML posts does it take to turn on a light bulb?

;)

Regards,
Andy 

http://groups.google.com/group/rec.humor.funny/browse_thread/thread/3658cbec599fd7e4/19496cbc3270f3a9?hl=enq=rec.humor.funny+light+bulb+subscribers#19496cbc3270f3a9


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/3] gspca_cpia1: Add basic v4l2 illuminator controls for the Intel Play QX3

2010-09-12 Thread Andy Walls
gspca_cpia1: Add basic v4l2 illuminator controls for the Intel Play QX3

This patch add basic V4L2 controls for the illuminators on the Intel
Play QX3 microscope.

Signed-off-by: Andy Walls awa...@md.metrocast.net
Acked-by: Hans de Goede hdego...@redhat.com

diff -r 6e0befab696a -r d165649ca8a0 linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c   Fri Sep 03 00:28:05 2010 -0300
+++ b/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 14:15:26 2010 -0400
@@ -373,6 +373,10 @@
 static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setcomptarget(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getcomptarget(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setilluminator1(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getilluminator1(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setilluminator2(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getilluminator2(struct gspca_dev *gspca_dev, __s32 *val);
 
 static const struct ctrl sd_ctrls[] = {
{
@@ -434,6 +438,34 @@
},
{
{
+   .id  = V4L2_CID_ILLUMINATORS_1,
+   .type= V4L2_CTRL_TYPE_BOOLEAN,
+   .name= Illuminator 1,
+   .minimum = 0,
+   .maximum = 1,
+   .step= 1,
+#define ILLUMINATORS_1_DEF 0
+   .default_value = ILLUMINATORS_1_DEF,
+   },
+   .set = sd_setilluminator1,
+   .get = sd_getilluminator1,
+   },
+   {
+   {
+   .id  = V4L2_CID_ILLUMINATORS_2,
+   .type= V4L2_CTRL_TYPE_BOOLEAN,
+   .name= Illuminator 2,
+   .minimum = 0,
+   .maximum = 1,
+   .step= 1,
+#define ILLUMINATORS_2_DEF 0
+   .default_value = ILLUMINATORS_2_DEF,
+   },
+   .set = sd_setilluminator2,
+   .get = sd_getilluminator2,
+   },
+   {
+   {
 #define V4L2_CID_COMP_TARGET V4L2_CID_PRIVATE_BASE
.id  = V4L2_CID_COMP_TARGET,
.type= V4L2_CTRL_TYPE_MENU,
@@ -1059,7 +1091,6 @@
  0, sd-params.streamStartLine, 0, 0);
 }
 
-#if 0 /* Currently unused */ /* keep */
 static int command_setlights(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
@@ -1079,7 +1110,6 @@
return do_command(gspca_dev, CPIA_COMMAND_WriteMCPort, 2, 0,
  p1 | p2 | 0xE0, 0);
 }
-#endif
 
 static int set_flicker(struct gspca_dev *gspca_dev, int on, int apply)
 {
@@ -1932,6 +1962,72 @@
return 0;
 }
 
+static int sd_setilluminator(struct gspca_dev *gspca_dev, __s32 val, int n)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+
+   if (!sd-params.qx3.qx3_detected)
+   return -EINVAL;
+
+   switch (n) {
+   case 1:
+   sd-params.qx3.bottomlight = val ? 1 : 0;
+   break;
+   case 2:
+   sd-params.qx3.toplight = val ? 1 : 0;
+   break;
+   default:
+   return -EINVAL;
+   }
+
+   ret = command_setlights(gspca_dev);
+   if (ret  ret != -EINVAL)
+   ret = -EBUSY;
+
+   return ret;
+}
+
+static int sd_setilluminator1(struct gspca_dev *gspca_dev, __s32 val)
+{
+   return sd_setilluminator(gspca_dev, val, 1);
+}
+
+static int sd_setilluminator2(struct gspca_dev *gspca_dev, __s32 val)
+{
+   return sd_setilluminator(gspca_dev, val, 2);
+}
+
+static int sd_getilluminator(struct gspca_dev *gspca_dev, __s32 *val, int n)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+
+   if (!sd-params.qx3.qx3_detected)
+   return -EINVAL;
+
+   switch (n) {
+   case 1:
+   *val = sd-params.qx3.bottomlight;
+   break;
+   case 2:
+   *val = sd-params.qx3.toplight;
+   break;
+   default:
+   return -EINVAL;
+   }
+   return 0;
+}
+
+static int sd_getilluminator1(struct gspca_dev *gspca_dev, __s32 *val)
+{
+   return sd_getilluminator(gspca_dev, val, 1);
+}
+
+static int sd_getilluminator2(struct gspca_dev *gspca_dev, __s32 *val)
+{
+   return sd_getilluminator(gspca_dev, val, 2);
+}
+
 static int sd_querymenu(struct gspca_dev *gspca_dev,
struct v4l2_querymenu *menu)
 {






--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/3] gspca_cpia1: Restore QX3 illuminators' state on resume

2010-09-12 Thread Andy Walls
Turn the lights of the QX3 on (or off) as needed when resuming and at module
load.

Signed-off-by: Andy Walls awa...@md.metrocast.net

diff -r f09faf8dd85d -r 5e576066eeaf linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c   Sun Sep 12 12:43:45 2010 -0400
+++ b/linux/drivers/media/video/gspca/cpia1.c   Sun Sep 12 12:47:00 2010 -0400
@@ -1756,6 +1756,10 @@
if (ret)
return ret;
 
+   /* Ensure the QX3 illuminators' states are restored upon resume */
+   if (sd-params.qx3.qx3_detected)
+   command_setlights(gspca_dev);
+
sd_stopN(gspca_dev);
 
PDEBUG(D_PROBE, CPIA Version: %d.%02d (%d.%d),







--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 3/3] gspca_cpia1: Disable illuminator controls if not an Intel Play QX3

2010-09-12 Thread Andy Walls
The illuminator controls should only be available to the user for the Intel
Play QX3 microscope.  The implementation to inhibit the controls is intended to
be consistent with the other gspca driver implementations.

Signed-off-by: Andy Walls awa...@md.metrocast.net

diff -r 5e576066eeaf -r 8a9732bd1548 linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c   Sun Sep 12 12:47:00 2010 -0400
+++ b/linux/drivers/media/video/gspca/cpia1.c   Sun Sep 12 13:13:33 2010 -0400
@@ -380,6 +380,7 @@
 
 static const struct ctrl sd_ctrls[] = {
{
+#define BRIGHTNESS_IDX 0
{
.id  = V4L2_CID_BRIGHTNESS,
.type= V4L2_CTRL_TYPE_INTEGER,
@@ -394,6 +395,7 @@
.set = sd_setbrightness,
.get = sd_getbrightness,
},
+#define CONTRAST_IDX 1
{
{
.id  = V4L2_CID_CONTRAST,
@@ -408,6 +410,7 @@
.set = sd_setcontrast,
.get = sd_getcontrast,
},
+#define SATURATION_IDX 2
{
{
.id  = V4L2_CID_SATURATION,
@@ -422,6 +425,7 @@
.set = sd_setsaturation,
.get = sd_getsaturation,
},
+#define POWER_LINE_FREQUENCY_IDX 3
{
{
.id  = V4L2_CID_POWER_LINE_FREQUENCY,
@@ -436,6 +440,7 @@
.set = sd_setfreq,
.get = sd_getfreq,
},
+#define ILLUMINATORS_1_IDX 4
{
{
.id  = V4L2_CID_ILLUMINATORS_1,
@@ -450,6 +455,7 @@
.set = sd_setilluminator1,
.get = sd_getilluminator1,
},
+#define ILLUMINATORS_2_IDX 5
{
{
.id  = V4L2_CID_ILLUMINATORS_2,
@@ -464,6 +470,7 @@
.set = sd_setilluminator2,
.get = sd_getilluminator2,
},
+#define COMP_TARGET_IDX 6
{
{
 #define V4L2_CID_COMP_TARGET V4L2_CID_PRIVATE_BASE
@@ -1756,9 +1763,13 @@
if (ret)
return ret;
 
-   /* Ensure the QX3 illuminators' states are restored upon resume */
+   /* Ensure the QX3 illuminators' states are restored upon resume,
+  or disable the illuminator controls, if this isn't a QX3 */
if (sd-params.qx3.qx3_detected)
command_setlights(gspca_dev);
+   else
+   gspca_dev-ctrl_dis |=
+   ((1  ILLUMINATORS_1_IDX) | (1  ILLUMINATORS_2_IDX));
 
sd_stopN(gspca_dev);
 








--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] firedtv driver: support for PSK8 for S2 devices. To watch HD.

2010-09-12 Thread Tommy Jonsson
This is the first i have ever developed for linux, cant really wrap my
head around how to submit this..
Hope im sending this correctly, diff made with 'hg diff' from latest
hg clone http://linuxtv.org/hg/v4l-dvb;

It adds support for tuning with PSK8 modulation, pilot and rolloff
with the S2 versions of firedtv.

Signed-off-by: Tommy Jonsson quazz...@gmail.com



diff -r 6e0befab696a linux/drivers/media/dvb/firewire/firedtv-avc.c
--- a/linux/drivers/media/dvb/firewire/firedtv-avc.cFri Sep 03
00:28:05 2010 -0300
+++ b/linux/drivers/media/dvb/firewire/firedtv-avc.cSun Sep 12
06:52:02 2010 +0200
@@ -4,6 +4,7 @@
  * Copyright (C) 2004 Andreas Monitzer a...@monitzer.com
  * Copyright (C) 2008 Ben Backx b...@bbackx.com
  * Copyright (C) 2008 Henrik Kurelid hen...@kurelid.se
+ * Copyright (C) 2010 Tommy Jonsson quazz...@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -318,7 +319,7 @@
  * tuning command for setting the relative LNB frequency
  * (not supported by the AVC standard)
  */
-static int avc_tuner_tuneqpsk(struct firedtv *fdtv,
+static int avc_tuner_tuneqpsk(struct dvb_frontend *fe, struct firedtv *fdtv,
  struct dvb_frontend_parameters *params)
 {
struct avc_command_frame *c = (void *)fdtv-avc_data;
@@ -368,10 +369,30 @@
c-operand[12] = 0;

if (fdtv-type == FIREDTV_DVB_S2) {
-   c-operand[13] = 0x1;
-   c-operand[14] = 0xff;
-   c-operand[15] = 0xff;
-
+   if (fe-dtv_property_cache.delivery_system == SYS_DVBS2) {
+   switch (fe-dtv_property_cache.modulation) {
+   case QAM_16:c-operand[13] = 0x1; break;
+   case QPSK:  c-operand[13] = 0x2; break;
+   case PSK_8: c-operand[13] = 0x3; break;
+   default:c-operand[13] = 0x2; break;
+   }
+   switch (fe-dtv_property_cache.rolloff) {
+   case ROLLOFF_AUTO:  c-operand[14] = 0x2; break;
+   case ROLLOFF_35:c-operand[14] = 0x2; break;
+   case ROLLOFF_20:c-operand[14] = 0x0; break;
+   case ROLLOFF_25:c-operand[14] = 0x1; break;
+   /* case ROLLOFF_NONE:   c-operand[14] = 0xff; break; */
+   }
+   switch (fe-dtv_property_cache.pilot) {
+   case PILOT_AUTO:c-operand[15] = 0x0; break;
+   case PILOT_OFF: c-operand[15] = 0x0; break;
+   case PILOT_ON:  c-operand[15] = 0x1; break;
+   }
+   } else {
+   c-operand[13] = 0x1;  /* auto modulation */
+   c-operand[14] = 0xff; /* disable rolloff */
+   c-operand[15] = 0xff; /* disable pilot */
+   }
return 16;
} else {
return 13;
@@ -548,7 +569,7 @@
return 17 + add_pid_filter(fdtv, c-operand[17]);
 }

-int avc_tuner_dsd(struct firedtv *fdtv,
+int avc_tuner_dsd(struct dvb_frontend *fe, struct firedtv *fdtv,
  struct dvb_frontend_parameters *params)
 {
struct avc_command_frame *c = (void *)fdtv-avc_data;
@@ -561,7 +582,7 @@

switch (fdtv-type) {
case FIREDTV_DVB_S:
-   case FIREDTV_DVB_S2: pos = avc_tuner_tuneqpsk(fdtv, params); break;
+   case FIREDTV_DVB_S2: pos = avc_tuner_tuneqpsk(fe, fdtv, params); break;
case FIREDTV_DVB_C: pos = avc_tuner_dsd_dvb_c(fdtv, params); break;
case FIREDTV_DVB_T: pos = avc_tuner_dsd_dvb_t(fdtv, params); break;
default:
diff -r 6e0befab696a linux/drivers/media/dvb/firewire/firedtv-fe.c
--- a/linux/drivers/media/dvb/firewire/firedtv-fe.c Fri Sep 03
00:28:05 2010 -0300
+++ b/linux/drivers/media/dvb/firewire/firedtv-fe.c Sun Sep 12
06:52:02 2010 +0200
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 2004 Andreas Monitzer a...@monitzer.com
  * Copyright (C) 2008 Henrik Kurelid hen...@kurelid.se
+ * Copyright (C) 2010 Tommy Jonsson quazz...@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -146,7 +147,7 @@
 {
struct firedtv *fdtv = fe-sec_priv;

-   return avc_tuner_dsd(fdtv, params);
+   return avc_tuner_dsd(fe, fdtv, params);
 }

 static int fdtv_get_frontend(struct dvb_frontend *fe,
@@ -155,6 +156,17 @@
return -EOPNOTSUPP;
 }

+static int fdtv_get_property(struct dvb_frontend *fe,
+ struct dtv_property *tvp)
+{
+   return 0;
+}
+static int fdtv_set_property(struct dvb_frontend *fe,
+ struct dtv_property *tvp)
+{
+   return 

[cron job] v4l-dvb daily build 2.6.26 and up: ERRORS

2010-09-12 Thread Hans Verkuil
This message is generated daily by a cron job that builds v4l-dvb for
the kernels and architectures in the list below.

Results of the daily build of v4l-dvb:

date:Sun Sep 12 19:00:14 CEST 2010
path:http://www.linuxtv.org/hg/v4l-dvb
changeset:   15147:8a6219311e8b
git master:   3e6dce76d99b328716b43929b9195adfee1de00c
git media-master: 991403c594f666a2ed46297c592c60c3b9f4e1e2
gcc version:  i686-linux-gcc (GCC) 4.4.3
host hardware:x86_64
host os:  2.6.32.5

linux-2.6.32.6-armv5: WARNINGS
linux-2.6.33-armv5: OK
linux-2.6.34-armv5: WARNINGS
linux-2.6.35.3-armv5: WARNINGS
linux-2.6.36-rc2-armv5: ERRORS
linux-2.6.32.6-armv5-davinci: WARNINGS
linux-2.6.33-armv5-davinci: WARNINGS
linux-2.6.34-armv5-davinci: WARNINGS
linux-2.6.35.3-armv5-davinci: WARNINGS
linux-2.6.36-rc2-armv5-davinci: ERRORS
linux-2.6.32.6-armv5-ixp: WARNINGS
linux-2.6.33-armv5-ixp: WARNINGS
linux-2.6.34-armv5-ixp: WARNINGS
linux-2.6.35.3-armv5-ixp: WARNINGS
linux-2.6.36-rc2-armv5-ixp: ERRORS
linux-2.6.32.6-armv5-omap2: WARNINGS
linux-2.6.33-armv5-omap2: WARNINGS
linux-2.6.34-armv5-omap2: WARNINGS
linux-2.6.35.3-armv5-omap2: WARNINGS
linux-2.6.36-rc2-armv5-omap2: ERRORS
linux-2.6.26.8-i686: WARNINGS
linux-2.6.27.44-i686: WARNINGS
linux-2.6.28.10-i686: WARNINGS
linux-2.6.29.1-i686: WARNINGS
linux-2.6.30.10-i686: WARNINGS
linux-2.6.31.12-i686: WARNINGS
linux-2.6.32.6-i686: WARNINGS
linux-2.6.33-i686: WARNINGS
linux-2.6.34-i686: WARNINGS
linux-2.6.35.3-i686: WARNINGS
linux-2.6.36-rc2-i686: ERRORS
linux-2.6.32.6-m32r: WARNINGS
linux-2.6.33-m32r: OK
linux-2.6.34-m32r: WARNINGS
linux-2.6.35.3-m32r: WARNINGS
linux-2.6.36-rc2-m32r: ERRORS
linux-2.6.32.6-mips: WARNINGS
linux-2.6.33-mips: WARNINGS
linux-2.6.34-mips: WARNINGS
linux-2.6.35.3-mips: WARNINGS
linux-2.6.36-rc2-mips: ERRORS
linux-2.6.32.6-powerpc64: WARNINGS
linux-2.6.33-powerpc64: WARNINGS
linux-2.6.34-powerpc64: WARNINGS
linux-2.6.35.3-powerpc64: WARNINGS
linux-2.6.36-rc2-powerpc64: ERRORS
linux-2.6.26.8-x86_64: WARNINGS
linux-2.6.27.44-x86_64: WARNINGS
linux-2.6.28.10-x86_64: WARNINGS
linux-2.6.29.1-x86_64: WARNINGS
linux-2.6.30.10-x86_64: WARNINGS
linux-2.6.31.12-x86_64: WARNINGS
linux-2.6.32.6-x86_64: WARNINGS
linux-2.6.33-x86_64: WARNINGS
linux-2.6.34-x86_64: WARNINGS
linux-2.6.35.3-x86_64: WARNINGS
linux-2.6.36-rc2-x86_64: ERRORS
linux-git-Module.symvers: ERRORS
linux-git-armv5: ERRORS
linux-git-armv5-davinci: ERRORS
linux-git-armv5-ixp: ERRORS
linux-git-armv5-omap2: ERRORS
linux-git-i686: ERRORS
linux-git-m32r: ERRORS
linux-git-mips: ERRORS
linux-git-powerpc64: ERRORS
linux-git-x86_64: ERRORS
spec: ERRORS
spec-git: ERRORS
sparse: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.tar.bz2

The V4L-DVB specification failed to build, but the last compiled spec is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Need info to understand TeVii S470 cx23885 MSI problem

2010-09-12 Thread Andy Walls
Igor,

To help understand the problem with the TeVii S470 CX23885 MSI not
working after module unload and reload, could you provide the output of

# lspci -d 14f1: - -

as root before the cx23885 module loads, after the module loads, and
after the module is removed and reloaded?

please also provide the MSI IRQ number listed in dmesg
(or /var/log/messages) assigned to the card.  Also the IRQ number of the
unhandled IRQ when the module is reloaded.

The linux kernel should be writing the MSI IRQ vector into the PCI
configuration space of the CX23885.  It looks like when you unload and
reload the cx23885 module, it is not changing the vector.

Regards,
Andy



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GIT PATCHES FOR 2.6.37] Remove V4L1 support from the pwc driver

2010-09-12 Thread Hans Verkuil
Thanks to Hans de Goede for supplying me with a Philips webcam to test this
driver with!

And other news on the V4L1 front:

I have since learned that the stradis driver has only ever worked for kernel 
2.2.
I did contact the company and unless they want to work on it this driver can be
removed soon.

I'm waiting for test results on the cpia2 driver. If it works, then the V4L1
support can be removed from that driver as well.

Regards,

Hans

The following changes since commit 57fef3eb74a04716a8dd18af0ac510ec4f71bc05:
  Richard Zidlicky (1):
V4L/DVB: dvb: fix smscore_getbuffer() logic

are available in the git repository at:

  ssh://linuxtv.org/git/hverkuil/v4l-dvb.git pwc

Hans Verkuil (1):
  pwc: fully convert driver to V4L2

 drivers/media/video/pwc/Kconfig  |2 +-
 drivers/media/video/pwc/pwc-ctrl.c   |   20 +-
 drivers/media/video/pwc/pwc-if.c |   23 +-
 drivers/media/video/pwc/pwc-misc.c   |4 +-
 drivers/media/video/pwc/pwc-uncompress.c |2 +-
 drivers/media/video/pwc/pwc-v4l.c|  322 +-
 drivers/media/video/pwc/pwc.h|6 +-
 7 files changed, 40 insertions(+), 339 deletions(-)

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GIT PATCHES FOR 2.6.37] Remove V4L1 support from the pwc driver

2010-09-12 Thread Andy Walls
On Sun, 2010-09-12 at 22:26 +0200, Hans Verkuil wrote:

 And other news on the V4L1 front:

 I'm waiting for test results on the cpia2 driver. If it works, then the V4L1
 support can be removed from that driver as well.

FYI, that will break this 2005 vintage piece of V4L1 software people may
still be using for the QX5 microscope:

http://www.cryptoforge.net/qx5/qx5view/
http://www.cryptoforge.net/qx5/qx5view/qx5view-0.5.tar.gz

The wiki page happens to mention qx5view:
http://linuxtv.org/wiki/index.php/QX5_USB_microscope


Slightly OT: The private V4L2 control for the Lights in cpia2_v4l.c
could be changed to Illuminator [12] for the QX5 microscope.

Regards,
Andy


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GIT PATCHES FOR 2.6.37] Remove V4L1 support from the pwc driver

2010-09-12 Thread Andy Walls
On Sun, 2010-09-12 at 17:12 -0400, Andy Walls wrote:
 On Sun, 2010-09-12 at 22:26 +0200, Hans Verkuil wrote:
 
  And other news on the V4L1 front:
 
  I'm waiting for test results on the cpia2 driver. If it works, then the V4L1
  support can be removed from that driver as well.
 
 FYI, that will break this 2005 vintage piece of V4L1 software people may
 still be using for the QX5 microscope:

Sorry, that is of course, if there is no V4L1 compat layer still in
place.

BTW, qx5view uses a private ioctl() to change the lights on a QX5 and
not the V4L2 control.

In qx5view:

void setlight() {
#define CPIA2_IOC_SET_GPIO _IOR('v', BASE_VIDIOCPRIVATE + 17, __u32)
ioctl(dev, CPIA2_IOC_SET_GPIO, light_setting);
}


In the cpia2 driver:

   /* CPIA2 extension to Video4Linux API */
case CPIA2_IOC_SET_GPIO:
retval = ioctl_set_gpio(arg, cam);
break;

Yuck.

Regards,
Andy

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GIT PATCHES FOR 2.6.37] Remove V4L1 support from the pwc driver

2010-09-12 Thread Andy Walls
On Sun, 2010-09-12 at 17:28 -0400, Andy Walls wrote:
 On Sun, 2010-09-12 at 17:12 -0400, Andy Walls wrote:
  On Sun, 2010-09-12 at 22:26 +0200, Hans Verkuil wrote:
  
   And other news on the V4L1 front:
  
   I'm waiting for test results on the cpia2 driver. If it works, then the 
   V4L1
   support can be removed from that driver as well.
  


 In the cpia2 driver:
 
/* CPIA2 extension to Video4Linux API */
 case CPIA2_IOC_SET_GPIO:
 retval = ioctl_set_gpio(arg, cam);
 break;
 
 Yuck.

And another gem in the cpia2 driver, this V4L2 control:


{
.id= CPIA2_CID_GPIO,
.type  = V4L2_CTRL_TYPE_INTEGER,
.name  = GPIO,
.minimum   = 0,
.maximum   = 255,
.step  = 1,
.default_value = 0,
},

Give me a GUI with a slider for that control, and I'm sure I can fry a
camera.

That should be removed.

Regards,
Andy


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] V4L/DVB: gspca - sonixj: Add webcam 0c45:612b

2010-09-12 Thread Alexander Goncharov
Hi!
Add support webcam speedlink reflect2.
Patch attached

Signed-off-by: Alexander Goncharov alexzander...@gmail.com
--- a/Documentation/video4linux/gspca.txt   2010-09-13 07:07:37.0 +0800
+++ b/Documentation/video4linux/gspca.txt   2010-09-13 10:25:23.017875028 +0800
@@ -308,6 +308,7 @@ sonixj  0c45:610c   PC Camera (SN9C128)
 sonixj 0c45:610e   PC Camera (SN9C128)
 sonixj 0c45:6128   Microdia/Sonix SNP325
 sonixj 0c45:612a   Avant Camera
+sonixj 0c45:612b   Speed-Link REFLECT2
 sonixj 0c45:612c   Typhoon Rasy Cam 1.3MPix
 sonixj 0c45:6130   Sonix Pccam
 sonixj 0c45:6138   Sn9c120 Mo4000
--- a/drivers/media/video/gspca/sonixj.c2010-09-13 07:07:37.0 +0800
+++ b/drivers/media/video/gspca/sonixj.c2010-09-13 10:24:29.381879935 +0800
@@ -3031,6 +3031,7 @@ static const __devinitdata struct usb_de
{USB_DEVICE(0x0c45, 0x6128), BS(SN9C120, OM6802)},  /*sn9c325?*/
 /*bw600.inf:*/
{USB_DEVICE(0x0c45, 0x612a), BS(SN9C120, OV7648)},  /*sn9c325?*/
+   {USB_DEVICE(0x0c45, 0x612b), BS(SN9C110, ADCM1700)},
{USB_DEVICE(0x0c45, 0x612c), BS(SN9C110, MO4000)},
{USB_DEVICE(0x0c45, 0x612e), BS(SN9C110, OV7630)},
 /* {USB_DEVICE(0x0c45, 0x612f), BS(SN9C110, ICM105C)}, */

[PATCH] V4L/DVB: gspca - sonixj: Add webcam 0c45:612b

2010-09-12 Thread Alexander Goncharov
Hi!
Add support webcam speedlink reflect2.

--- a/Documentation/video4linux/gspca.txt   2010-09-13
07:07:37.0 +0800
+++ b/Documentation/video4linux/gspca.txt   2010-09-13
10:25:23.017875028 +0800
@@ -308,6 +308,7 @@ sonixj  0c45:610c   PC Camera (SN9C128)
 sonixj 0c45:610e   PC Camera (SN9C128)
 sonixj 0c45:6128   Microdia/Sonix SNP325
 sonixj 0c45:612a   Avant Camera
+sonixj 0c45:612b   Speed-Link REFLECT2
 sonixj 0c45:612c   Typhoon Rasy Cam 1.3MPix
 sonixj 0c45:6130   Sonix Pccam
 sonixj 0c45:6138   Sn9c120 Mo4000
--- a/drivers/media/video/gspca/sonixj.c2010-09-13
07:07:37.0 +0800
+++ b/drivers/media/video/gspca/sonixj.c2010-09-13
10:24:29.381879935 +0800
@@ -3031,6 +3031,7 @@ static const __devinitdata struct usb_de
{USB_DEVICE(0x0c45, 0x6128), BS(SN9C120, OM6802)},  /*sn9c325?*/
 /*bw600.inf:*/
{USB_DEVICE(0x0c45, 0x612a), BS(SN9C120, OV7648)},  /*sn9c325?*/
+   {USB_DEVICE(0x0c45, 0x612b), BS(SN9C110, ADCM1700)},
{USB_DEVICE(0x0c45, 0x612c), BS(SN9C110, MO4000)},
{USB_DEVICE(0x0c45, 0x612e), BS(SN9C110, OV7630)},
 /* {USB_DEVICE(0x0c45, 0x612f), BS(SN9C110, ICM105C)}, */

Signed-off-by: Alexander Goncharov alexzander...@gmail.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html