cpia2-development Mailing List for Cpia2 webcam
Brought to you by:
smiller
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(24) |
Sep
(15) |
Oct
|
Nov
(9) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(15) |
Feb
(1) |
Mar
(2) |
Apr
(14) |
May
(15) |
Jun
(10) |
Jul
(7) |
Aug
(7) |
Sep
|
Oct
(5) |
Nov
|
Dec
(5) |
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(34) |
Jun
(29) |
Jul
|
Aug
(39) |
Sep
(11) |
Oct
(7) |
Nov
(3) |
Dec
(3) |
| 2006 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: JT O. <jt...@xn...> - 2013-01-28 06:10:40
|
Hello, I recently dusted off a QX3 camera that I have had for a while. Originally, it worked quite well with the cpia driver, that no longer seems to be part of Linux 3.2. To control the microscope camera's lights, I could do something like echo bottomlight: on >/proc/cpia/video0 echo toplight: on >/proc/cpia/video0 I noticed Linux 3.2 has cpia2, but does not seem to provide the /proc/cpia interface. Is there a way for me to turn on the lights via the /sys/ filesystem that I haven't figured out? Thanks -JT |
|
From: Philip H. <ph...@sa...> - 2007-04-06 19:14:46
|
On Fri, 2007-04-06 at 08:33 -0400, Anthony Tekatch wrote: > A check using "lsusb - v" of the built-in USB hubs on my 5yr old desktop > reveals this entry for the microscope: > MaxPower 98mA > > I'm not sure if that is the maximum allowable or the USB device-requested > value, and the microscope manual clearly states that 500mA is required. > I'm not going to force the value higher and risk damage to that port as > mentioned in the article. I'll try a powered hub. The microscope works on > a Windows Laptop just fine, but I have not tried Linux on that same > laptop to determine software issues. I've measured the current usage of the QX5 through a powered hub. Not sure how accurate it is: 200mA idle 330mA idle with both LEDs on For some reason I can't capture video when the QX5 is plugged into the hub. -Phil <ph...@sa...> |
|
From: Anthony T. <an...@un...> - 2007-04-06 17:21:11
|
On Fri, 06 Apr 2007 09:18:22 -0700, "Steven L. MILLER" <ste...@st...= > wrote: > According to the USB 2.0 spec, a device on a bus powered hub is allowed=20 > to consume 500mA after configuration, 100mA at powerup (this also=20 > includes power drawn by the hub). I don't have a USB 1.1 spec handy,=20 > but I'm pretty sure the power stuff is the same. I think the 98 mA=20 > figure comes from the cpia2 chip, and doesn't include the lights. This=20 > leaves 400mA for the lights, which would be 2 watts at 5V. I don't know=20 > if this uses bulbs or leds, but the bright white leds can consume up to=20 > about 1 watt each. I'm guessing a small bulb would be about the same.=20 > This leaves things right at the edge. =46rom my understanding the USB device requests more than 100mA if it needs that, then the USB driver supplies that current if possible. If the cpia2 chip is only asking for 98mA then possibly the kernel is only allowing 100mA, then when the LED comes on it is above the allowable 100mA. I'm not sure how to determine what the current kernel thinks it should allow since that doesn't seem to be available by lsusb. Cheers, Anthony |
|
From: Steven L. M. <ste...@st...> - 2007-04-06 16:06:58
|
Anthony Tekatch wrote: > On Fri, 06 Apr 2007 09:20:10 +0100, Philip Heron <ph...@sa...> wrote: >> Could this be a power problem? Perhaps when the lights are switched on >> the voltage drops and the camera resets, then the kernel detects the >> camera as a new device. Might be worth trying with a powered hub, or >> another computer. > > That thought crossed my mind as well, but I assumed that there would be a > message in the logs stating why the device was disconnected. > > According to this: http://lwn.net/Articles/186331/ article, kernel 2.6.16 > implemented proper power limiting on USB devices and many USB powered > devices have been prevented from working since then. > > A check using "lsusb - v" of the built-in USB hubs on my 5yr old desktop > reveals this entry for the microscope: > MaxPower 98mA > > I'm not sure if that is the maximum allowable or the USB device-requested > value, and the microscope manual clearly states that 500mA is required. > I'm not going to force the value higher and risk damage to that port as > mentioned in the article. I'll try a powered hub. The microscope works on > a Windows Laptop just fine, but I have not tried Linux on that same > laptop to determine software issues. According to the USB 2.0 spec, a device on a bus powered hub is allowed to consume 500mA after configuration, 100mA at powerup (this also includes power drawn by the hub). I don't have a USB 1.1 spec handy, but I'm pretty sure the power stuff is the same. I think the 98 mA figure comes from the cpia2 chip, and doesn't include the lights. This leaves 400mA for the lights, which would be 2 watts at 5V. I don't know if this uses bulbs or leds, but the bright white leds can consume up to about 1 watt each. I'm guessing a small bulb would be about the same. This leaves things right at the edge. Steve -- Steve Miller Staff Software Engineer STMicroelectronics North American Mobile Platforms Applications Lab phone (602) 485-2014 |
|
From: Anthony T. <an...@un...> - 2007-04-06 12:33:16
|
On Fri, 06 Apr 2007 09:20:10 +0100, Philip Heron <ph...@sa...> wrote: > Could this be a power problem? Perhaps when the lights are switched on > the voltage drops and the camera resets, then the kernel detects the > camera as a new device. Might be worth trying with a powered hub, or > another computer. That thought crossed my mind as well, but I assumed that there would be a message in the logs stating why the device was disconnected. According to this: http://lwn.net/Articles/186331/ article, kernel 2.6.16 implemented proper power limiting on USB devices and many USB powered devices have been prevented from working since then. A check using "lsusb - v" of the built-in USB hubs on my 5yr old desktop reveals this entry for the microscope: MaxPower 98mA I'm not sure if that is the maximum allowable or the USB device-requested value, and the microscope manual clearly states that 500mA is required. I'm not going to force the value higher and risk damage to that port as mentioned in the article. I'll try a powered hub. The microscope works on a Windows Laptop just fine, but I have not tried Linux on that same laptop to determine software issues. I'll report back later. Cheers, Anthony |
|
From: Bastiaan B. <Bas...@en...> - 2007-04-06 09:13:15
|
On Thu, 2007-04-05 at 16:03 -0700, Steven L. MILLER wrote: ... >=20 > Those differences are not surprising. I think the kernel version when=20 > this work was done was around 2.6.12 or so. We have not kept the cvs=20 > version up to date since it is being maintained in the kernel now. = The=20 > qx5view author seems to have disappeared. The light controls were=20 No, I haven't :-)=20 In fact, I haven been looking into this problem with Anthony before he mailed the list. But I'm not a kernel hacker (yet?), I just added the right io calls and gui stuff to mview to control the lights. Since I can't reproduce his problem om my Fedora Core 6 laptop I suggested to try the list. > reverse engineered by playing with the gpios to see what they did. The = > manufacturer (Sonic Blue? - I'm not sure I'm remembering that = correctly)=20 > refused to provide any info, so the person who added this experimented = > until he got it to work. >=20 The guys who figured out the gpios are Hakon Hallingstat and Philip Heron (see this list two years ago). I don't know whether they still read this list though. Cheers, Bastiaan > If you'd like to keep this (app and/or driver), I can add you to the=20 > developer access. For that matter, I wouldn't object if you wanted to=20 > take over maintainership, as I simply don't have the time to keep it = going. >=20 > Cheers, > Steve >=20 |
|
From: Philip H. <ph...@sa...> - 2007-04-06 08:20:27
|
Anthony Tekatch wrote: > The lights cannot be controlled. When I press a button to control the > lights I get this message in /var/log/messages: > cpia2: Control message failed, err val = -71 > > Also, the video device /dev/video0 is removed and then qx5view no longer > shows active video, then /dev/video1 gets created. Could this be a power problem? Perhaps when the lights are switched on the voltage drops and the camera resets, then the kernel detects the camera as a new device. Might be worth trying with a powered hub, or another computer. I still have a QX5 somewhere. I don't use Debian but I'll dig it out anyway and give it a test tonight. -Phil <ph...@sa...> |
|
From: Steven L. M. <ste...@st...> - 2007-04-05 22:52:49
|
Anthony Tekatch wrote:
> On Wed, 04 Apr 2007 12:27:13 -0700, "Steven L. MILLER" <ste...@st...> wrote:
>> It looks like you might be missing either (or both) of videodev.h or
>> videodev2.h. Both should be in /usr/src/linux/include/linux. Or they may
>> have changed in the 2 years since we've updated the driver. I would
>> suspect the latter, and this may be what breaks qx5view. From here you
>> should probably look at the Debian source, and you'll probably have to
>> make some minor changes to qx5 view for whatever changes in v4l2 there
>> has been. You might get away with just looking at the v4l header files -
>> there shouldn't be too many places where they're filled in.
>
> I compiled the cpia2 driver (from cvs) and installed it, qx5view (also
> from cvs) did not work in the same fashion as before where setting the
> lights causes /dev/video0 to be destroyed.
>
> Just some notes on my findings so far in the difference between the old
> cvs files and the newer files that come with updated kernels (like 2.6.18):
> - The cpia2.h (in cvs) was missing #include<media/v4l2-common.h>.
> - Also many references to an older kernel have been removed in the new kernel supplied cpia2 module code.
> - cpia2_usb.c requires .owner to be commented out on line 83 (this property does not exist in the kernel anymore).
>
>
> Does anyone know where I can find the information about how the lights
> are set, i.e. spec sheets or whatever, specifically, how did code like
> the following code get into cpia2_v4l.c:
>
> static struct control_menu_info lights_controls[] =
> {
> { 0, "Off" },
> { 64, "Top" },
> { 128, "Bottom" },
> { 192, "Both" },
>
>
> Cheers,
> Anthony
Those differences are not surprising. I think the kernel version when
this work was done was around 2.6.12 or so. We have not kept the cvs
version up to date since it is being maintained in the kernel now. The
qx5view author seems to have disappeared. The light controls were
reverse engineered by playing with the gpios to see what they did. The
manufacturer (Sonic Blue? - I'm not sure I'm remembering that correctly)
refused to provide any info, so the person who added this experimented
until he got it to work.
If you'd like to keep this (app and/or driver), I can add you to the
developer access. For that matter, I wouldn't object if you wanted to
take over maintainership, as I simply don't have the time to keep it going.
Cheers,
Steve
--
Steve Miller
Staff Software Engineer
STMicroelectronics
North American Mobile Platforms Applications Lab
phone (602) 485-2014
|
|
From: Anthony T. <an...@un...> - 2007-04-05 22:03:43
|
On Wed, 04 Apr 2007 12:27:13 -0700, "Steven L. MILLER" <ste...@st...> wrote:
> It looks like you might be missing either (or both) of videodev.h or
> videodev2.h. Both should be in /usr/src/linux/include/linux. Or they may
> have changed in the 2 years since we've updated the driver. I would
> suspect the latter, and this may be what breaks qx5view. From here you
> should probably look at the Debian source, and you'll probably have to
> make some minor changes to qx5 view for whatever changes in v4l2 there
> has been. You might get away with just looking at the v4l header files -
> there shouldn't be too many places where they're filled in.
I compiled the cpia2 driver (from cvs) and installed it, qx5view (also
from cvs) did not work in the same fashion as before where setting the
lights causes /dev/video0 to be destroyed.
Just some notes on my findings so far in the difference between the old
cvs files and the newer files that come with updated kernels (like 2.6.18):
- The cpia2.h (in cvs) was missing #include<media/v4l2-common.h>.
- Also many references to an older kernel have been removed in the new kernel supplied cpia2 module code.
- cpia2_usb.c requires .owner to be commented out on line 83 (this property does not exist in the kernel anymore).
Does anyone know where I can find the information about how the lights
are set, i.e. spec sheets or whatever, specifically, how did code like
the following code get into cpia2_v4l.c:
static struct control_menu_info lights_controls[] =
{
{ 0, "Off" },
{ 64, "Top" },
{ 128, "Bottom" },
{ 192, "Both" },
Cheers,
Anthony
|
|
From: Anthony T. <an...@un...> - 2007-04-04 18:03:33
|
Hi Steven, I'm having some difficulty compiling the cpia2 driver from source, for example: In function 'cpia2_open': cpia2_v4l.c:280: warning: implicit declaration of function 'video_devdata' It looks like something is missing. I've attached the results of make. Cheers, Anthony On Wed, 04 Apr 2007 09:22:26 -0700, "Steven L. MILLER" <ste...@st...> wrote: > Anthony Tekatch wrote: > > I'm trying to get the Digital Blue QX5 Microscope working with qx5view. > > > > The lights cannot be controlled. When I press a button to control the > > lights I get this message in /var/log/messages: > > cpia2: Control message failed, err val = -71 > > > > Also, the video device /dev/video0 is removed and then qx5view no longer > > shows active video, then /dev/video1 gets created. > > > > I am using the cpia2 module that comes with the Debian compiled kernel: > > 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux > > > > I am using the qx5view from the CVS with most files dated May 19 2005 and > > frontend.c at Oct 5 2005. > > > > Is there any testing I can do to narrow down the problem? > > > > Cheers, > > Anthony > > Unfortunately, I don't have a microscope, and don't run Debian, so I'm > not sure what the problem could be. A -71 is a protocol error, so there > may be differences in what that version of the driver expects and what > qx5view is sending. I can only think of two approaches. One is to get > the source from the Debian module and take a look at the code to figure > out what is going on (search for the message text and see what it it is > trying to do). The other is to grab the driver source from sourceforge > and try to compile and use it. As far as I know, the versions on > sourceforge worked together (qx5view was written by a different > contributor, and I've never had a microscope to test it). > > Hope this helps, > > Steve > > -- > Steve Miller > Staff Software Engineer > STMicroelectronics > North American Mobile Platforms Applications Lab > phone (602) 485-2014 > -- |
|
From: Steven L. M. <ste...@st...> - 2007-04-04 16:11:52
|
Anthony Tekatch wrote: > I'm trying to get the Digital Blue QX5 Microscope working with qx5view. > > The lights cannot be controlled. When I press a button to control the > lights I get this message in /var/log/messages: > cpia2: Control message failed, err val = -71 > > Also, the video device /dev/video0 is removed and then qx5view no longer > shows active video, then /dev/video1 gets created. > > I am using the cpia2 module that comes with the Debian compiled kernel: > 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux > > I am using the qx5view from the CVS with most files dated May 19 2005 and > frontend.c at Oct 5 2005. > > Is there any testing I can do to narrow down the problem? > > Cheers, > Anthony Unfortunately, I don't have a microscope, and don't run Debian, so I'm not sure what the problem could be. A -71 is a protocol error, so there may be differences in what that version of the driver expects and what qx5view is sending. I can only think of two approaches. One is to get the source from the Debian module and take a look at the code to figure out what is going on (search for the message text and see what it it is trying to do). The other is to grab the driver source from sourceforge and try to compile and use it. As far as I know, the versions on sourceforge worked together (qx5view was written by a different contributor, and I've never had a microscope to test it). Hope this helps, Steve -- Steve Miller Staff Software Engineer STMicroelectronics North American Mobile Platforms Applications Lab phone (602) 485-2014 |
|
From: Anthony T. <an...@un...> - 2007-04-03 22:00:46
|
I'm trying to get the Digital Blue QX5 Microscope working with qx5view. The lights cannot be controlled. When I press a button to control the lights I get this message in /var/log/messages: cpia2: Control message failed, err val = -71 Also, the video device /dev/video0 is removed and then qx5view no longer shows active video, then /dev/video1 gets created. I am using the cpia2 module that comes with the Debian compiled kernel: 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux I am using the qx5view from the CVS with most files dated May 19 2005 and frontend.c at Oct 5 2005. Is there any testing I can do to narrow down the problem? Cheers, Anthony |
|
From: Mekare M. <mek...@ho...> - 2006-09-21 14:33:36
|
Hello, Brightness is working just fine but contrast is not. I am unable to change it. I activated the debug infos : ioctl_s_ctrl(): Set control id:9963777, value:3 cpia2_set_contrast(): Setting contrast to 3 (0x3) ioctl_dqbuf(): DQBUF #1 status:2 seq:1 length:10442 ioctl_qbuf(): QBUF #1 But ioctl_s_ctrl(): Set control id:9963776, value:50 cpia2_set_brightness(): Setting brightness to 50 (0x32) cpia2_usb_complete(): workbuff full, searching BTW, CPIA2_VP_YRANGE is set to 0x26 in the file cpia2_registers.h but I found the value to be 0x36 (page 42 of the EVK). I changed that value but nothing new. Is there any doc with every registers explained ? What happens to contrast ? Thanks in advance, Anthony _________________________________________________________________ Retrouvez tout en un clin d'il avec Windows Desktop Search ! http://desktop.msn.fr/ |
|
From: Scott J. B. <sco...@ya...> - 2006-03-11 21:47:38
|
I've added the changes from Alan Cox's kernel submission to CVS. Here is a summary of the changes: Update rvmalloc and rvfree. Make cpia2_set_high_power and cpia2_get_version_info static. Scott J. Bertin sco...@ya... |
|
From: Scott J. B. <sco...@ya...> - 2006-02-25 23:39:07
|
I received this patch today, and I've added the following changes to CVS:
make cpia2_init and cpia2_exit static.
Change the instructions in the README for setting parameters when
compiled into the kernel.
I did not remove cpia2_setup because it should only be compiled for 2.4
kernels, and I believe it is necessary there.
The driver was apparently submitted to the -mm tree by Alan Cox with
some minor changes. When I have a chance, I'll look over his patch and
see if there are any changes that should go into CVS.
Scott J. Bertin
sco...@ya...
-------- Original Message --------
Subject: [-mm patch] drivers/media/video/cpia2/cpia2_v4l.c cleanups
Date: Sat, 25 Feb 2006 14:15:29 +0100
From: Adrian Bunk <bu...@st...>
To: Andrew Morton <ak...@os...>, sco...@ya..., Alan Cox
<al...@lx...>
CC: lin...@vg..., Mauro Carvalho Chehab
<mc...@in...>
References: <200...@os...>
On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +add-cpia2-camera-support.patch
>
> CPIA camera driver
This patch contains the following cleanups:
- make 2 needlessly global functions static
- remove cpia2_setup(): the driver already allows setting parameters
through module_param(), and there's no reason for having two different
ways for setting the same parameters
Signed-off-by: Adrian Bunk <bu...@st...>
---
Documentation/video4linux/README.cpia2 | 2 -
drivers/media/video/cpia2/cpia2_v4l.c | 29 +------------------------
2 files changed, 3 insertions(+), 28 deletions(-)
---
linux-2.6.16-rc4-mm2-full/Documentation/video4linux/README.cpia2.old
2006-02-25 05:00:43.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/Documentation/video4linux/README.cpia2
2006-02-25 05:01:30.000000000 +0100
@@ -70,7 +70,7 @@
If the driver is compiled into the kernel, at boot time specify them
like this:
- cpia2=num_buffers:3,buffer_size:65535
+ cpia2.num_buffers=3 cpia2.buffer_size=65535
What buffer size should I use?
------------------------------
--- linux-2.6.16-rc4-mm2-full/drivers/media/video/cpia2/cpia2_v4l.c.old
2006-02-25 05:02:17.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/drivers/media/video/cpia2/cpia2_v4l.c
2006-02-25 05:38:03.000000000 +0100
@@ -2054,7 +2054,7 @@
* cpia2_init/module_init
*
*****************************************************************************/
-int __init cpia2_init(void)
+static int __init cpia2_init(void)
{
LOG("%s v%d.%d.%d\n",
ABOUT, CPIA2_MAJ_VER, CPIA2_MIN_VER, CPIA2_PATCH_VER);
@@ -2069,37 +2069,12 @@
* cpia2_exit/module_exit
*
*****************************************************************************/
-void __exit cpia2_exit(void)
+static void __exit cpia2_exit(void)
{
cpia2_usb_cleanup();
schedule_timeout(2 * HZ);
}
-
-int __init cpia2_setup(char *str)
-{
- while(str) {
- if(!strncmp(str, "buffer_size:", 12)) {
- buffer_size = simple_strtoul(str + 13, &str, 10);
- } else if(!strncmp(str, "num_buffers:", 12)) {
- num_buffers = simple_strtoul(str + 13, &str, 10);
- } else if(!strncmp(str, "alternate:", 10)) {
- alternate = simple_strtoul(str + 11, &str, 10);
- } else if(!strncmp(str, "video_nr:", 9)) {
- video_nr = simple_strtoul(str + 10, &str, 10);
- } else if(!strncmp(str, "flicker_freq:",13)) {
- flicker_freq = simple_strtoul(str + 14, &str, 10);
- } else if(!strncmp(str, "flicker_mode:",13)) {
- flicker_mode = simple_strtoul(str + 14, &str, 10);
- } else {
- ++str;
- }
- }
- return 1;
-}
-
-__setup("cpia2=", cpia2_setup);
-
module_init(cpia2_init);
module_exit(cpia2_exit);
|
|
From: mark <mm...@ve...> - 2006-01-03 03:52:47
|
Hello, Thanks very much for your useful qx5view tool. I was amazed it worked so well right out of the box, and had a full set of features. However, my seven year old son was going to use it, so I took the liberty of customizing it for his use. The changes involved command line arguments so he could click on an icon and have it start up in a preset state. I have attached those changes in case you find them useful. Here is a list of changes: -command line options to set lighting now work for QX5 Digital Blue -command line options to set lighting use intuitive 'top,bottom,...' -command line usage is displayed if there are any input errors -there is some additional documentation below I have a tv tuner card as device 0, and the qx5 microscope as device 1. It took some research to figure out I just had to set the minor number in a new device file (/dev/video1) to allow operation of both devices. Again, thanks a lot. I am sure you have helped a lot of people with your project, including my son who got to use your software with his new Christmas present. Please excuse any mistakes, errors or omissions I have made in the code or documentation, since the work was quickly done on Christmas eve. -Mark Mitchell *********** Additional documentation I collected ************* CPU Loading ----------- When this application is running, the number of frames per second (fps) displayed is listed in the terminal window. On a slower computer, this intensive number crunching might slow down the computer to an unacceptable level - in this case the 'Freeze' button can be used to halt this application and free up the cpu. Contrast -------- The contrast control does not seem to change anything in the QX5, which is consistent with the lack of a contrast control in the equivalent Windows software. Command Line Options -------------------- 1. running this as 'qx5view' actually enables access to additional features that are not available when run as any other name (like 'mview'). This is nonstandard behavior that appears when the first argument in the command line ends in 'qx5view'. 2. '1' disables video4linux2 (only available if video4linux2 was included during installation) 3. '2' enables video4linux2 (only available if video4linux2 was included during installation) 4. '-f file' loads a device file like '/dev/video0' or '/dev/video1'. The first example, which has a minor number of 0, is for the first video device. Succeeding examples have successively higher minor numbers for each additional video device 5. '-l LIGHTING' specifies the initial lighting, where LIGHTING is: top, bottom, both, off 6. '-s N' specifies a smoothing factor which is bad for moving images but very nicely removes annoying flickering in the darker areas of stationary images. Each frame is averaged with the previous N frames, which reduces the flicker because it changes from frame to frame. A value of N=0 specifies no smoothing. A value of 3 works nicely with the QX5 for stationary subjects. 7. '-m' is some kind of memory map feature |
|
From: Scott J. B. <sco...@ya...> - 2005-12-12 15:12:33
|
I've added the following patch to CVS to prevent some cases where more
than one application could try to read from the camera at the same time.
Scott J. Bertin
sco...@ya...
Index: cpia2_v4l.c
===================================================================
RCS file: /cvsroot/cpia2/driver/cpia2_v4l.c,v
retrieving revision 1.26
diff -u -r1.26 cpia2_v4l.c
--- cpia2_v4l.c 13 Sep 2005 23:12:27 -0000 1.26
+++ cpia2_v4l.c 12 Dec 2005 14:57:04 -0000
@@ -410,14 +410,14 @@
int noblock = file->f_flags&O_NONBLOCK;
#ifdef HAVE_V4L2
+ struct cpia2_fh *fh = file->private_data;
+
if(!cam)
return -EINVAL;
/* Priority check */
- struct cpia2_fh *fh = file->private_data;
- int retval = v4l2_prio_check(&cam->prio, &fh->prio);
- if(retval) {
- return retval;
+ if(fh->prio != V4L2_PRIORITY_RECORD) {
+ return -EBUSY;
}
#endif
@@ -436,13 +436,13 @@
struct camera_data *cam = video_get_drvdata(dev);
#ifdef HAVE_V4L2
+ struct cpia2_fh *fh = filp->private_data;
+
if(!cam)
return POLLERR;
/* Priority check */
- struct cpia2_fh *fh = filp->private_data;
- int retval = v4l2_prio_check(&cam->prio, &fh->prio);
- if(retval) {
+ if(fh->prio != V4L2_PRIORITY_RECORD) {
return POLLERR;
}
#endif
@@ -1839,39 +1839,48 @@
if (!cam)
return -ENOTTY;
+ /* make this _really_ smp-safe */
+ if (down_interruptible(&cam->busy_lock))
+ return -ERESTARTSYS;
+
+ if (!cam->present) {
+ up(&cam->busy_lock);
+ return -ENODEV;
+ }
+
#ifdef HAVE_V4L2
/* Priority check */
switch (ioctl_nr) {
case VIDIOCSWIN:
- case VIDIOCGMBUF:
case VIDIOCMCAPTURE:
- case VIDIOCSYNC:
- case MJPIOC_REQBUFS:
- case MJPIOC_QBUF_CAPT:
- case MJPIOC_SYNC:
case VIDIOC_S_FMT:
{
struct cpia2_fh *fh = file->private_data;
retval = v4l2_prio_check(&cam->prio, &fh->prio);
if(retval) {
+ up(&cam->busy_lock);
return retval;
}
break;
}
+ case VIDIOCGMBUF:
+ case VIDIOCSYNC:
+ case MJPIOC_REQBUFS:
+ case MJPIOC_QBUF_CAPT:
+ case MJPIOC_SYNC:
+ {
+ struct cpia2_fh *fh = file->private_data;
+ if(fh->prio != V4L2_PRIORITY_RECORD) {
+ up(&cam->busy_lock);
+ return -EBUSY;
+ }
+ break;
+ }
default:
break;
}
#endif
- /* make this _really_ smp-safe */
- if (down_interruptible(&cam->busy_lock))
- return -ERESTARTSYS;
-
- if (!cam->present) {
- up(&cam->busy_lock);
- return -ENODEV;
- }
-
switch (ioctl_nr) {
case VIDIOCGCAP: /* query capabilites */
retval = ioctl_cap_query(arg, cam);
@@ -2150,9 +2159,8 @@
#ifdef HAVE_V4L2
/* Priority check */
struct cpia2_fh *fh = file->private_data;
- retval = v4l2_prio_check(&cam->prio, &fh->prio);
- if(retval) {
- return retval;
+ if(fh->prio != V4L2_PRIORITY_RECORD) {
+ return -EBUSY;
}
#endif
|
|
From: Bastiaan B. <bas...@li...> - 2005-12-01 10:05:14
|
On Thu, 2005-12-01 at 09:37 +0000, Philip Heron wrote: > On Tue, 2005-11-29 at 09:47 -0700, Steven L. MILLER wrote: > > Thanks. This is the best way to get something in - those with qx5s can > > now try it out and commit it. Unfortunately I don't have access to one, > > so I'll leave it to one of the qx5 maintainers to do this. > > > > Steve > > Hi Steve and Chris, > > I tested this patch last night and it seems to work well, but I'm unable > to get to the CVS servers at the moment. > > On the subject of m/qx5view - would anyone (Bastiaan?) object if I > cleaned that program up a bit? > No, please go ahead! Cheers, Bastiaan > -Phil <ph...@fi...> |
|
From: Philip H. <dra...@li...> - 2005-12-01 09:37:38
|
On Tue, 2005-11-29 at 09:47 -0700, Steven L. MILLER wrote: > Thanks. This is the best way to get something in - those with qx5s can=20 > now try it out and commit it. Unfortunately I don't have access to one,=20 > so I'll leave it to one of the qx5 maintainers to do this. >=20 > Steve Hi Steve and Chris, I tested this patch last night and it seems to work well, but I'm unable to get to the CVS servers at the moment. On the subject of m/qx5view - would anyone (Bastiaan?) object if I cleaned that program up a bit? -Phil <ph...@fi...> |
|
From: Christoph W. <wi...@it...> - 2005-11-30 03:01:49
|
On 30/11/2005, at 2:47 AM, Steven L. MILLER wrote:
> Christoph Willing wrote:
>> The current cvs version of qx5view currently does not turn on the
>> led lights at startup (althought once running, they work as
>> expected). Below is a patch which corrects the startup behaviour.
>> The -l option is now honoured, as is the default light setting
>> (top light), if no - l option is given. The patch is against a cvs
>> checkout on 28th November.
>> I'm new to the list and not sure of the mechanism to contribute
>> patches - hope sending like this is OK.
>> chris
>
> Hi Chris,
>
> Thanks. This is the best way to get something in - those with qx5s
> can now try it out and commit it. Unfortunately I don't have
> access to one, so I'll leave it to one of the qx5 maintainers to do
> this.
Actually, here's a new version of the patch. Although the previous
one set the light properly at startup, it didn't set the light
selection radio button - so although the (say) bottom light was
turned on at startup (with the -l 128 option), the selection button
was still set to "Top". This patch correctly sets the radio button as
well.
BTW, this patch _replaces_ the previous one completely, rather than
laying over the top of it.
chris
========================= snip ======================
--- frontend.h.orig 2005-11-30 11:27:51.000000000 +1000
+++ frontend.h 2005-11-30 11:28:12.000000000 +1000
@@ -44,6 +44,7 @@
void setdepth4(GtkWidget *widget, GdkEvent *event, gpointer data);
void setdepth6(GtkWidget *widget, GdkEvent *event, gpointer data);
void snap(GtkWidget *widget, GdkEvent *event, gpointer data);
+void setlight();
extern struct video_window vid_win;
extern unsigned char *compressedPic;
--- frontend.c.orig 2005-11-29 16:53:19.000000000 +1000
+++ frontend.c 2005-11-30 11:25:51.000000000 +1000
@@ -78,6 +78,7 @@
} LightSetting;
static LightSetting light_setting = LIGHT_TOP;
+static GtkWidget *lightbuttons[4];
#ifdef HAVE_V4L2
struct {
@@ -158,6 +159,7 @@
GdkRectangle update_rec;
static int lasttime = 0;
static int framecount = 0;
+ static int lightSet = 0;
static float rate;
static int size = 0;
int thetime;
@@ -312,6 +314,26 @@
vid_win.width * bytes_per_pixel);
gtk_widget_draw (drawing_area, &update_rec);
+ if( lightSet == 0 ) {
+ switch( light_setting ) {
+ case LIGHT_TOP:
+ gtk_button_clicked((GtkButton*)lightbuttons[0]);
+ break;
+ case LIGHT_BOTTOM:
+ gtk_button_clicked((GtkButton*)lightbuttons[1]);
+ break;
+ case LIGHT_BOTH:
+ gtk_button_clicked((GtkButton*)lightbuttons[2]);
+ break;
+ case LIGHT_OFF:
+ default:
+ gtk_button_clicked((GtkButton*)lightbuttons[3]);
+ break;
+ }
+ setlight();
+ lightSet = 1;
+ }
+
return (TRUE);
}
@@ -970,24 +992,28 @@
gtk_signal_connect_object (GTK_OBJECT (radiobutton), "pressed",
GTK_SIGNAL_FUNC(setlight_top), NULL);
gtk_widget_show (radiobutton);
radiogroup = gtk_radio_button_group (GTK_RADIO_BUTTON
(radiobutton));
+ lightbuttons[0] = radiobutton;
radiobutton = gtk_radio_button_new_with_label (radiogroup,
"Bottom");
gtk_box_pack_start (GTK_BOX (innerbox), radiobutton, TRUE,
TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (radiobutton), "pressed",
GTK_SIGNAL_FUNC(setlight_bottom), NULL);
gtk_widget_show (radiobutton);
radiogroup = gtk_radio_button_group (GTK_RADIO_BUTTON
(radiobutton));
+ lightbuttons[1] = radiobutton;
radiobutton = gtk_radio_button_new_with_label (radiogroup,
"Both");
gtk_box_pack_start (GTK_BOX (innerbox), radiobutton, TRUE,
TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (radiobutton), "pressed",
GTK_SIGNAL_FUNC(setlight_both), NULL);
gtk_widget_show (radiobutton);
radiogroup = gtk_radio_button_group (GTK_RADIO_BUTTON
(radiobutton));
+ lightbuttons[2] = radiobutton;
radiobutton = gtk_radio_button_new_with_label (radiogroup, "Off");
gtk_box_pack_start (GTK_BOX (innerbox), radiobutton, TRUE,
TRUE, 0);
gtk_signal_connect_object (GTK_OBJECT (radiobutton), "pressed",
GTK_SIGNAL_FUNC(setlight_off), NULL);
gtk_widget_show (radiobutton);
radiogroup = gtk_radio_button_group (GTK_RADIO_BUTTON
(radiobutton));
+ lightbuttons[3] = radiobutton;
}
/* Create a couple buttons */
========================= snip ======================
Christoph Willing +61 7 3365 8350
QPSF Access Grid Manager
University of Queensland
|
|
From: Steven L. M. <ste...@st...> - 2005-11-29 16:42:10
|
Christoph Willing wrote: > The current cvs version of qx5view currently does not turn on the led > lights at startup (althought once running, they work as expected). > Below is a patch which corrects the startup behaviour. The -l option is > now honoured, as is the default light setting (top light), if no - l > option is given. The patch is against a cvs checkout on 28th November. > > I'm new to the list and not sure of the mechanism to contribute patches > - hope sending like this is OK. > > > chris > Hi Chris, Thanks. This is the best way to get something in - those with qx5s can now try it out and commit it. Unfortunately I don't have access to one, so I'll leave it to one of the qx5 maintainers to do this. Steve -- Steve Miller Staff Software Engineer Strategic Marketing Applications North America STMicroelectronics phone (602) 485-2014 |
|
From: Christoph W. <wi...@it...> - 2005-11-29 09:22:37
|
The current cvs version of qx5view currently does not turn on the led
lights at startup (althought once running, they work as expected).
Below is a patch which corrects the startup behaviour. The -l option
is now honoured, as is the default light setting (top light), if no -
l option is given. The patch is against a cvs checkout on 28th November.
I'm new to the list and not sure of the mechanism to contribute
patches - hope sending like this is OK.
chris
===================== snip ========================
--- frontend.c.orig 2005-11-29 16:53:19.000000000 +1000
+++ frontend.c 2005-11-29 17:00:53.000000000 +1000
@@ -79,6 +79,8 @@
static LightSetting light_setting = LIGHT_TOP;
+void setlight(void);
+
#ifdef HAVE_V4L2
struct {
void *start;
@@ -158,6 +160,7 @@
GdkRectangle update_rec;
static int lasttime = 0;
static int framecount = 0;
+ static int lightSet = 0;
static float rate;
static int size = 0;
int thetime;
@@ -312,6 +315,11 @@
vid_win.width * bytes_per_pixel);
gtk_widget_draw (drawing_area, &update_rec);
+ if( lightSet == 0 ) {
+ setlight();
+ lightSet = 1;
+ }
+
return (TRUE);
}
===================== snip ========================
Christoph Willing +61 7 3365 8350
QPSF Access Grid Manager
University of Queensland
|
|
From: <ta...@na...> - 2005-10-15 17:48:36
|
Hello, Can you tell me what webcams (if any) use the stv0676/vv6501 chipset? = I'm doing a thesis on interfacing a webcam with a microcontroller, and I = think I could do it with stv0676's digiport/i2c interface. But I can't find info = on what webcams use it. --=20 Nagy Tam=E1s ta...@na... |
|
From: Philip H. <dra...@li...> - 2005-10-11 23:20:08
|
Hi Scott, On Mon, 2005-10-10 at 20:10 -0400, Scott J. Bertin wrote: > I released version 2.0 of the driver and mview tonight. Just had a test and it seems to be working nicely! The only glitch I had was when inserting the module for the first time, modprobe froze up and I had to reboot to get it working. This seems to be a quirk of the current Fedora Core 4 kernel (kernel-2.6.13-1.1526_FC4) though, as pwc had the same problem. I've updated the website with the new release. -Phil <ph...@fi...> |
|
From: Scott J. B. <sco...@ya...> - 2005-10-11 02:12:25
|
Hi all, I released version 2.0 of the driver and mview tonight. I was going to add a release of qx5view, but I couldn't create a new package. Steve, you may need to do that. I've also created the following tags in CVS to correspond to the releases. driver: cpia2-2_0 mview: mview-2_0 qx5view: qx5view-2_0 Scott J. Bertin sco...@ya... |