All of lore.kernel.org
 help / color / mirror / Atom feed
* VFlip problem in gspca_pac7311
@ 2009-11-23 17:10 Gustavo Chaín Dumit
  2009-11-23 18:27 ` Németh Márton
  2009-11-24 18:02 ` Jean-Francois Moine
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo Chaín Dumit @ 2009-11-23 17:10 UTC (permalink / raw)
  To: linux-media

Hi

I'm testing a Pixart Imaging device (0x93a:0x2622)
Everything works fine, but vertical orientation. Image looks rotated.
So I wrote a little hack to prevent it.

diff --git a/drivers/media/video/gspca/pac7311.c
b/drivers/media/video/gspca/pac 7311.c
index 0527144..f7904ec 100644
--- a/drivers/media/video/gspca/pac7311.c
+++ b/drivers/media/video/gspca/pac7311.c
@@ -690,27 +690,28 @@ static int sd_start(struct gspca_dev *gspca_dev)
        }
        setgain(gspca_dev);
        setexposure(gspca_dev);
-       sethvflip(gspca_dev);
+       if (gspca_dev->dev->descriptor.idProduct != 0x2622)
+               sethvflip(gspca_dev);

Any one has the same problem ?
Thanks!

-- 
Gustavo Chaín Dumit
http://0xff.cl

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: VFlip problem in gspca_pac7311
  2009-11-23 17:10 VFlip problem in gspca_pac7311 Gustavo Chaín Dumit
@ 2009-11-23 18:27 ` Németh Márton
  2009-11-23 18:46   ` Gustavo Chaín Dumit
  2009-11-24 18:02 ` Jean-Francois Moine
  1 sibling, 1 reply; 4+ messages in thread
From: Németh Márton @ 2009-11-23 18:27 UTC (permalink / raw)
  To: Gustavo Chaín Dumit; +Cc: Hans de Goede, V4L Mailing List

Hi,
Gustavo Chaín Dumit wrote:
> Hi
> 
> I'm testing a Pixart Imaging device (0x93a:0x2622)
> Everything works fine, but vertical orientation. Image looks rotated.
> So I wrote a little hack to prevent it.
> [...]
> Any one has the same problem ?

You might want to have a look to libv4l ( http://freshmeat.net/projects/libv4l )
and the v4lcontrol_flags[] in
http://linuxtv.org/hg/v4l-dvb/file/2f87f537fb2b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c .
This user space library has a list of laptops where the webcams are installed
for example upside down.

Regards,

	Márton Németh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: VFlip problem in gspca_pac7311
  2009-11-23 18:27 ` Németh Márton
@ 2009-11-23 18:46   ` Gustavo Chaín Dumit
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo Chaín Dumit @ 2009-11-23 18:46 UTC (permalink / raw)
  To: Németh Márton; +Cc: Hans de Goede, V4L Mailing List

El Mon, 23 Nov 2009 19:27:04 +0100
Németh Márton <nm127@freemail.hu> escribió:
> Hi,
> Gustavo Chaín Dumit wrote:
> > Hi
> > 
> > I'm testing a Pixart Imaging device (0x93a:0x2622)
> > Everything works fine, but vertical orientation. Image looks
> > rotated. So I wrote a little hack to prevent it.
> > [...]
> > Any one has the same problem ?
> 
> You might want to have a look to libv4l
> ( http://freshmeat.net/projects/libv4l ) and the v4lcontrol_flags[] in
> http://linuxtv.org/hg/v4l-dvb/file/2f87f537fb2b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c .
> This user space library has a list of laptops where the webcams are
> installed for example upside down.
> 
> Regards,
> 
> 	Márton Németh
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-media" in the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

thanks you!

-- 
Gustavo Chaín Dumit
http://0xff.cl

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: VFlip problem in gspca_pac7311
  2009-11-23 17:10 VFlip problem in gspca_pac7311 Gustavo Chaín Dumit
  2009-11-23 18:27 ` Németh Márton
@ 2009-11-24 18:02 ` Jean-Francois Moine
  1 sibling, 0 replies; 4+ messages in thread
From: Jean-Francois Moine @ 2009-11-24 18:02 UTC (permalink / raw)
  To: Gustavo Chaín Dumit; +Cc: linux-media

On Mon, 23 Nov 2009 14:10:42 -0300
Gustavo Chaín Dumit <g@0xff.cl> wrote:
> I'm testing a Pixart Imaging device (0x93a:0x2622)
> Everything works fine, but vertical orientation. Image looks rotated.
> So I wrote a little hack to prevent it.
> 
> diff --git a/drivers/media/video/gspca/pac7311.c
> b/drivers/media/video/gspca/pac 7311.c
> index 0527144..f7904ec 100644
> --- a/drivers/media/video/gspca/pac7311.c
> +++ b/drivers/media/video/gspca/pac7311.c
> @@ -690,27 +690,28 @@ static int sd_start(struct gspca_dev *gspca_dev)
>         }
>         setgain(gspca_dev);
>         setexposure(gspca_dev);
> -       sethvflip(gspca_dev);
> +       if (gspca_dev->dev->descriptor.idProduct != 0x2622)
> +               sethvflip(gspca_dev);
> 
> Any one has the same problem ?

Yes, other people have the same problem with this webcam. I was
changing the driver when I found a problem.

The vertical and horizontal flips are set in the register 0x21 of the
page 3. The function sethvflip() sets 0x08 for Hflip and 0x04 for
Vflip. By default, this register is set to 0x08 and when sethvflip() is
called, it sets back the value to 0 (no H nor V flip).

As your patch prevents sethvflip to be called, the value 0x08 should be
Vflip and not Hflip. May you confirm that changing Vflip by program
(v4l2ucp, v4l2-ctl...)  does mirroring?

Regards.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-24 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-23 17:10 VFlip problem in gspca_pac7311 Gustavo Chaín Dumit
2009-11-23 18:27 ` Németh Márton
2009-11-23 18:46   ` Gustavo Chaín Dumit
2009-11-24 18:02 ` Jean-Francois Moine

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.