All of lore.kernel.org
 help / color / mirror / Atom feed
* pxa_camera + mt9m1111:  Failed to configure for format 50323234
@ 2009-10-02 19:35 Antonio Ospite
  2009-10-02 23:27 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 9+ messages in thread
From: Antonio Ospite @ 2009-10-02 19:35 UTC (permalink / raw)
  To: linux-media; +Cc: Guennadi Liakhovetski, Robert Jarzmik

[-- Attachment #1: Type: text/plain, Size: 4345 bytes --]

Hi,

after updating to 2.6.32-rc2 I can't capture anymore with the setup in the
subject.

Here's the message from userspace:
  # ./capture-example 
  Cannot open '/dev/video0': 22, Invalid argument
which is from the very first open() call.

Here's the relevant snippet from dmesg with debug enabled:
[   15.613749] i2c /dev entries driver
[   15.626308] Linux video capture interface: v2.00
[   15.640834] pxa27x-camera pxa27x-camera.0: Limiting master clock to 26000000
[   15.648696] pxa27x-camera pxa27x-camera.0: LCD clock 104000000Hz, target freq 26000000Hz, divisor 1
[   15.656494] pxa27x-camera pxa27x-camera.0: got DMA channel 1
[   15.665398] pxa27x-camera pxa27x-camera.0: got DMA channel (U) 2
[   15.673461] pxa27x-camera pxa27x-camera.0: got DMA channel (V) 3
[   15.686771] camera 0-0: Probing 0-0
[   15.707545] pxa27x-camera pxa27x-camera.0: Registered platform device at cc889380 data c03a1e98
[   15.715265] pxa27x-camera pxa27x-camera.0: pxa_camera_activate: Init gpios
[   15.723488] pxa27x-camera pxa27x-camera.0: PXA Camera driver attached to camera 0
[   15.739092] mt9m111 0-005d: read  reg.00d -> 0008
[   15.743812] mt9m111 0-005d: write reg.00d = 0008 -> 0
[   15.748702] mt9m111 0-005d: read  reg.00d -> 0008
[   15.753237] mt9m111 0-005d: write reg.00d = 0009 -> 0
[   15.757864] mt9m111 0-005d: read  reg.00d -> 0009
[   15.762386] mt9m111 0-005d: write reg.00d = 0029 -> 0
[   15.766938] mt9m111 0-005d: read  reg.00d -> 0029
[   15.771670] mt9m111 0-005d: write reg.00d = 0008 -> 0
[   15.776136] mt9m111 0-005d: write reg.0c8 = 970b -> 0
[   15.781325] mt9m111 0-005d: read  reg.106 -> 700e
[   15.785695] mt9m111 0-005d: write reg.106 = 700e -> 0
[   15.792896] mt9m111 0-005d: read  reg.000 -> 143a
[   15.796790] mt9m111 0-005d: Detected a MT9M11x chip ID 143a
[   15.805505] pxa27x-camera pxa27x-camera.0: Providing format Planar YUV422 16 bit using CbYCrY 16 bit
[   15.813285] pxa27x-camera pxa27x-camera.0: Providing format CbYCrY 16 bit packed
[   15.820729] pxa27x-camera pxa27x-camera.0: Providing format CrYCbY 16 bit packed
[   15.828221] pxa27x-camera pxa27x-camera.0: Providing format YCbYCr 16 bit packed
[   15.835484] pxa27x-camera pxa27x-camera.0: Providing format YCrYCb 16 bit packed
[   15.842888] pxa27x-camera pxa27x-camera.0: Providing format RGB 565 packed
[   15.850455] pxa27x-camera pxa27x-camera.0: Providing format RGB 555 packed
[   15.858077] pxa27x-camera pxa27x-camera.0: Providing format Bayer (sRGB) 8 bit in pass-through mode
[   15.872455] pxa27x-camera pxa27x-camera.0: PXA Camera driver detached from camera 0
...
[   70.377781] pxa27x-camera pxa27x-camera.0: Registered platform device at cc889380 data c03a1e98
[   70.377866] pxa27x-camera pxa27x-camera.0: pxa_camera_activate: Init gpios
[   70.378259] pxa27x-camera pxa27x-camera.0: PXA Camera driver attached to camera 0
[   70.378336] mt9m111 0-005d: mt9m111_s_fmt fmt=50323234 left=24, top=8, width=1280, height=1024
[   70.379630] mt9m111 0-005d: write reg.002 = 0018 -> 0
[   70.380589] mt9m111 0-005d: write reg.001 = 0008 -> 0
[   70.382382] mt9m111 0-005d: write reg.1a0 = 0500 -> 0
[   70.383347] mt9m111 0-005d: write reg.1a3 = 0400 -> 0
[   70.384312] mt9m111 0-005d: write reg.1a1 = 0500 -> 0
[   70.385267] mt9m111 0-005d: write reg.1a4 = 0400 -> 0
[   70.386227] mt9m111 0-005d: write reg.1a6 = 0500 -> 0
[   70.387188] mt9m111 0-005d: write reg.1a9 = 0400 -> 0
[   70.393180] mt9m111 0-005d: write reg.1a7 = 0500 -> 0
[   70.394155] mt9m111 0-005d: write reg.1aa = 0400 -> 0
[   70.394224] mt9m111 0-005d: Pixel format not handled : 50323234
[   70.394265] pxa27x-camera pxa27x-camera.0: Failed to configure for format 50323234
[   70.394310] pxa27x-camera pxa27x-camera.0: PXA Camera driver detached from camera 0

Format 50323234 is 422P, it looks like pxa-camera is trying to force
its native format to the sensor, but I am still investigating; I'll come
back when I find more or if I come up with a solution.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: pxa_camera + mt9m1111:  Failed to configure for format 50323234
  2009-10-02 19:35 pxa_camera + mt9m1111: Failed to configure for format 50323234 Antonio Ospite
@ 2009-10-02 23:27 ` Guennadi Liakhovetski
  2009-10-03 14:13   ` Antonio Ospite
  0 siblings, 1 reply; 9+ messages in thread
From: Guennadi Liakhovetski @ 2009-10-02 23:27 UTC (permalink / raw)
  To: Antonio Ospite; +Cc: Linux Media Mailing List, Robert Jarzmik

On Fri, 2 Oct 2009, Antonio Ospite wrote:

> Hi,
> 
> after updating to 2.6.32-rc2 I can't capture anymore with the setup in the
> subject.

Indeed:-( Please, verify, that this patch fixes your problem (completely 
untested), if it does, I'll push it for 2.6.32:

pxa_camera: fix camera pixel format configuration

A typo prevents correct picel format negotiation with client drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index 6952e96..aa831d5 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1432,7 +1432,9 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd,
 		icd->sense = &sense;
 
 	cam_f.fmt.pix.pixelformat = cam_fmt->fourcc;
-	ret = v4l2_subdev_call(sd, video, s_fmt, f);
+	ret = v4l2_subdev_call(sd, video, s_fmt, &cam_f);
+	cam_f.fmt.pix.pixelformat = pix->pixelformat;
+	*pix = cam_f.fmt.pix;
 
 	icd->sense = NULL;
 

Thanks
Guennadi


> 
> Here's the message from userspace:
>   # ./capture-example 
>   Cannot open '/dev/video0': 22, Invalid argument
> which is from the very first open() call.
> 
> Here's the relevant snippet from dmesg with debug enabled:
> [   15.613749] i2c /dev entries driver
> [   15.626308] Linux video capture interface: v2.00
> [   15.640834] pxa27x-camera pxa27x-camera.0: Limiting master clock to 26000000
> [   15.648696] pxa27x-camera pxa27x-camera.0: LCD clock 104000000Hz, target freq 26000000Hz, divisor 1
> [   15.656494] pxa27x-camera pxa27x-camera.0: got DMA channel 1
> [   15.665398] pxa27x-camera pxa27x-camera.0: got DMA channel (U) 2
> [   15.673461] pxa27x-camera pxa27x-camera.0: got DMA channel (V) 3
> [   15.686771] camera 0-0: Probing 0-0
> [   15.707545] pxa27x-camera pxa27x-camera.0: Registered platform device at cc889380 data c03a1e98
> [   15.715265] pxa27x-camera pxa27x-camera.0: pxa_camera_activate: Init gpios
> [   15.723488] pxa27x-camera pxa27x-camera.0: PXA Camera driver attached to camera 0
> [   15.739092] mt9m111 0-005d: read  reg.00d -> 0008
> [   15.743812] mt9m111 0-005d: write reg.00d = 0008 -> 0
> [   15.748702] mt9m111 0-005d: read  reg.00d -> 0008
> [   15.753237] mt9m111 0-005d: write reg.00d = 0009 -> 0
> [   15.757864] mt9m111 0-005d: read  reg.00d -> 0009
> [   15.762386] mt9m111 0-005d: write reg.00d = 0029 -> 0
> [   15.766938] mt9m111 0-005d: read  reg.00d -> 0029
> [   15.771670] mt9m111 0-005d: write reg.00d = 0008 -> 0
> [   15.776136] mt9m111 0-005d: write reg.0c8 = 970b -> 0
> [   15.781325] mt9m111 0-005d: read  reg.106 -> 700e
> [   15.785695] mt9m111 0-005d: write reg.106 = 700e -> 0
> [   15.792896] mt9m111 0-005d: read  reg.000 -> 143a
> [   15.796790] mt9m111 0-005d: Detected a MT9M11x chip ID 143a
> [   15.805505] pxa27x-camera pxa27x-camera.0: Providing format Planar YUV422 16 bit using CbYCrY 16 bit
> [   15.813285] pxa27x-camera pxa27x-camera.0: Providing format CbYCrY 16 bit packed
> [   15.820729] pxa27x-camera pxa27x-camera.0: Providing format CrYCbY 16 bit packed
> [   15.828221] pxa27x-camera pxa27x-camera.0: Providing format YCbYCr 16 bit packed
> [   15.835484] pxa27x-camera pxa27x-camera.0: Providing format YCrYCb 16 bit packed
> [   15.842888] pxa27x-camera pxa27x-camera.0: Providing format RGB 565 packed
> [   15.850455] pxa27x-camera pxa27x-camera.0: Providing format RGB 555 packed
> [   15.858077] pxa27x-camera pxa27x-camera.0: Providing format Bayer (sRGB) 8 bit in pass-through mode
> [   15.872455] pxa27x-camera pxa27x-camera.0: PXA Camera driver detached from camera 0
> ...
> [   70.377781] pxa27x-camera pxa27x-camera.0: Registered platform device at cc889380 data c03a1e98
> [   70.377866] pxa27x-camera pxa27x-camera.0: pxa_camera_activate: Init gpios
> [   70.378259] pxa27x-camera pxa27x-camera.0: PXA Camera driver attached to camera 0
> [   70.378336] mt9m111 0-005d: mt9m111_s_fmt fmt=50323234 left=24, top=8, width=1280, height=1024
> [   70.379630] mt9m111 0-005d: write reg.002 = 0018 -> 0
> [   70.380589] mt9m111 0-005d: write reg.001 = 0008 -> 0
> [   70.382382] mt9m111 0-005d: write reg.1a0 = 0500 -> 0
> [   70.383347] mt9m111 0-005d: write reg.1a3 = 0400 -> 0
> [   70.384312] mt9m111 0-005d: write reg.1a1 = 0500 -> 0
> [   70.385267] mt9m111 0-005d: write reg.1a4 = 0400 -> 0
> [   70.386227] mt9m111 0-005d: write reg.1a6 = 0500 -> 0
> [   70.387188] mt9m111 0-005d: write reg.1a9 = 0400 -> 0
> [   70.393180] mt9m111 0-005d: write reg.1a7 = 0500 -> 0
> [   70.394155] mt9m111 0-005d: write reg.1aa = 0400 -> 0
> [   70.394224] mt9m111 0-005d: Pixel format not handled : 50323234
> [   70.394265] pxa27x-camera pxa27x-camera.0: Failed to configure for format 50323234
> [   70.394310] pxa27x-camera pxa27x-camera.0: PXA Camera driver detached from camera 0
> 
> Format 50323234 is 422P, it looks like pxa-camera is trying to force
> its native format to the sensor, but I am still investigating; I'll come
> back when I find more or if I come up with a solution.
> 
> Thanks,
>    Antonio
> 
> -- 
> Antonio Ospite
> http://ao2.it
> 
> PGP public key ID: 0x4553B001
> 
> A: Because it messes up the order in which people normally read text.
>    See http://en.wikipedia.org/wiki/Posting_style
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: pxa_camera + mt9m1111:  Failed to configure for format 50323234
  2009-10-02 23:27 ` Guennadi Liakhovetski
@ 2009-10-03 14:13   ` Antonio Ospite
  2009-10-03 22:31     ` Guennadi Liakhovetski
  0 siblings, 1 reply; 9+ messages in thread
From: Antonio Ospite @ 2009-10-03 14:13 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, Robert Jarzmik

[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]

On Sat, 3 Oct 2009 01:27:04 +0200 (CEST)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:

> On Fri, 2 Oct 2009, Antonio Ospite wrote:
> 
> > Hi,
> > 
> > after updating to 2.6.32-rc2 I can't capture anymore with the setup in the
> > subject.
> 
> Indeed:-( Please, verify, that this patch fixes your problem (completely 
> untested), if it does, I'll push it for 2.6.32:
> 
> pxa_camera: fix camera pixel format configuration
> 
> A typo prevents correct picel format negotiation with client drivers.
>

typo in the log message too :) s/picel/pixel/
 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
> index 6952e96..aa831d5 100644
> --- a/drivers/media/video/pxa_camera.c
> +++ b/drivers/media/video/pxa_camera.c
> @@ -1432,7 +1432,9 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd,
>  		icd->sense = &sense;
>  
>  	cam_f.fmt.pix.pixelformat = cam_fmt->fourcc;
> -	ret = v4l2_subdev_call(sd, video, s_fmt, f);
> +	ret = v4l2_subdev_call(sd, video, s_fmt, &cam_f);
> +	cam_f.fmt.pix.pixelformat = pix->pixelformat;
> +	*pix = cam_f.fmt.pix;
>  
>  	icd->sense = NULL;

Ok, I can capture again even by only fixing the typo: s/f/&cam_f/
but I don't know if this is complete.

Anyways your patch works, but the picture is now shifted, see:
http://people.openezx.org/ao2/a780-pxa-camera-mt9m111-shifted.jpg

Is this because of the new cropping code?

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: pxa_camera + mt9m1111:  Failed to configure for format 50323234
  2009-10-03 14:13   ` Antonio Ospite
@ 2009-10-03 22:31     ` Guennadi Liakhovetski
  2009-10-04 15:19       ` Antonio Ospite
  0 siblings, 1 reply; 9+ messages in thread
From: Guennadi Liakhovetski @ 2009-10-03 22:31 UTC (permalink / raw)
  To: Antonio Ospite; +Cc: Linux Media Mailing List, Robert Jarzmik

On Sat, 3 Oct 2009, Antonio Ospite wrote:

> On Sat, 3 Oct 2009 01:27:04 +0200 (CEST)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> 
> > On Fri, 2 Oct 2009, Antonio Ospite wrote:
> > 
> > > Hi,
> > > 
> > > after updating to 2.6.32-rc2 I can't capture anymore with the setup in the
> > > subject.
> > 
> > Indeed:-( Please, verify, that this patch fixes your problem (completely 
> > untested), if it does, I'll push it for 2.6.32:
> > 
> > pxa_camera: fix camera pixel format configuration
> > 
> > A typo prevents correct picel format negotiation with client drivers.
> >
> 
> typo in the log message too :) s/picel/pixel/

Thanks:-)

> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> > diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
> > index 6952e96..aa831d5 100644
> > --- a/drivers/media/video/pxa_camera.c
> > +++ b/drivers/media/video/pxa_camera.c
> > @@ -1432,7 +1432,9 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd,
> >  		icd->sense = &sense;
> >  
> >  	cam_f.fmt.pix.pixelformat = cam_fmt->fourcc;
> > -	ret = v4l2_subdev_call(sd, video, s_fmt, f);
> > +	ret = v4l2_subdev_call(sd, video, s_fmt, &cam_f);
> > +	cam_f.fmt.pix.pixelformat = pix->pixelformat;
> > +	*pix = cam_f.fmt.pix;
> >  
> >  	icd->sense = NULL;
> 
> Ok, I can capture again even by only fixing the typo: s/f/&cam_f/
> but I don't know if this is complete.

No, that's not.

> Anyways your patch works, but the picture is now shifted, see:
> http://people.openezx.org/ao2/a780-pxa-camera-mt9m111-shifted.jpg
> 
> Is this because of the new cropping code?

Hm, it shouldn't be. Does it look always like this - reproducible? What 
program are you using? What about other geometry configurations? Have you 
ever seen this with previous kernel versions? New cropping - neither 
mplayer nor gstreamer use cropping normally. This seems more like a HSYNC 
problem to me. Double-check platform data? Is it mioa701 or some custom 
board?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: pxa_camera + mt9m1111:  Failed to configure for format 50323234
  2009-10-03 22:31     ` Guennadi Liakhovetski
@ 2009-10-04 15:19       ` Antonio Ospite
  2009-10-05  6:32         ` Stefan Herbrechtsmeier
  0 siblings, 1 reply; 9+ messages in thread
From: Antonio Ospite @ 2009-10-04 15:19 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, Robert Jarzmik

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

On Sun, 4 Oct 2009 00:31:24 +0200 (CEST)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:

> On Sat, 3 Oct 2009, Antonio Ospite wrote:
> 
[...]
> > Anyways your patch works, but the picture is now shifted, see:
> > http://people.openezx.org/ao2/a780-pxa-camera-mt9m111-shifted.jpg
> > 
> > Is this because of the new cropping code?
> 
> Hm, it shouldn't be. Does it look always like this - reproducible? What 
> program are you using? What about other geometry configurations? Have you 
> ever seen this with previous kernel versions? New cropping - neither 
> mplayer nor gstreamer use cropping normally. This seems more like a HSYNC 
> problem to me. Double-check platform data? Is it mioa701 or some custom 
> board?
>

It seemed to be reproducible yesterday, but I can't get it today, maybe
it happens in low battery conditions. I am using capture-example.c from
v4l2-apps. Never seen before. I am testing this on a Motorola A780,
the soc-camera platform code is not in mainline yet.

I'll bug you when I hit the problem again. Thanks for your patience.

> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/

Ciao ciao,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: pxa_camera + mt9m1111:  Failed to configure for format 50323234
  2009-10-04 15:19       ` Antonio Ospite
@ 2009-10-05  6:32         ` Stefan Herbrechtsmeier
  2009-11-03 13:45           ` pxa_camera + mt9m1111: image shifted (was: Failed to configure for format 50323234) Antonio Ospite
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Herbrechtsmeier @ 2009-10-05  6:32 UTC (permalink / raw)
  To: Antonio Ospite
  Cc: Guennadi Liakhovetski, Linux Media Mailing List, Robert Jarzmik

Antonio Ospite schrieb:
> On Sun, 4 Oct 2009 00:31:24 +0200 (CEST)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
>
>   
>> On Sat, 3 Oct 2009, Antonio Ospite wrote:
>>
>>     
> [...]
>   
>>> Anyways your patch works, but the picture is now shifted, see:
>>> http://people.openezx.org/ao2/a780-pxa-camera-mt9m111-shifted.jpg
>>>
>>> Is this because of the new cropping code?
>>>       
>> Hm, it shouldn't be. Does it look always like this - reproducible? What 
>> program are you using? What about other geometry configurations? Have you 
>> ever seen this with previous kernel versions? New cropping - neither 
>> mplayer nor gstreamer use cropping normally. This seems more like a HSYNC 
>> problem to me. Double-check platform data? Is it mioa701 or some custom 
>> board?
>>
>>     
>
> It seemed to be reproducible yesterday, but I can't get it today, maybe
> it happens in low battery conditions. I am using capture-example.c from
> v4l2-apps. Never seen before. I am testing this on a Motorola A780,
> the soc-camera platform code is not in mainline yet.
>   
Only for your information. Maybe it helps to reproduce the error.

I have the same problem with my own ov9655 driver on a pxa platform 
since I update to kernel 2.6.30
and add crop support. Every  first open of the camera after system reset 
the image looks like yours.
If I use the camera the next time without changing the resolution 
everything is OK. Only during the
first open the resolution of the camera is changed  and function fmt set 
in the ov9655 driver is called
twice. I use the camera with my one program and it doesn't use crop.
>> Thanks
>> Guennadi
>> ---
>> Guennadi Liakhovetski, Ph.D.
>> Freelance Open-Source Software Developer
>> http://www.open-technology.de/
>>     
>
> Ciao ciao,
>    Antoni
Regards,
    Stefan

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

* Re: pxa_camera + mt9m1111:  image shifted (was: Failed to configure for format 50323234)
  2009-10-05  6:32         ` Stefan Herbrechtsmeier
@ 2009-11-03 13:45           ` Antonio Ospite
  2009-11-04 19:15             ` Guennadi Liakhovetski
  2009-11-06 19:46             ` Guennadi Liakhovetski
  0 siblings, 2 replies; 9+ messages in thread
From: Antonio Ospite @ 2009-11-03 13:45 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier
  Cc: Guennadi Liakhovetski, Linux Media Mailing List, Robert Jarzmik

[-- Attachment #1: Type: text/plain, Size: 2323 bytes --]

On Mon, 05 Oct 2009 08:32:10 +0200
Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de> wrote:

> Antonio Ospite schrieb:
> > On Sun, 4 Oct 2009 00:31:24 +0200 (CEST)
> > Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> >
> >>> Anyways your patch works, but the picture is now shifted, see:
> >>> http://people.openezx.org/ao2/a780-pxa-camera-mt9m111-shifted.jpg
> >>>
> >>> Is this because of the new cropping code?
> >>>       
> >> Hm, it shouldn't be. Does it look always like this - reproducible? What 
> >> program are you using? What about other geometry configurations? Have you 
> >> ever seen this with previous kernel versions? New cropping - neither 
> >> mplayer nor gstreamer use cropping normally. This seems more like a HSYNC 
> >> problem to me. Double-check platform data? Is it mioa701 or some custom 
> >> board?
> >>

Platform data: if I set SOCAM_HSYNC_ACTIVE_HIGH the result is even
"wronger", with or without SOCAM_HSYNC_ACTIVE_LOW I get the same
result, now reproducible, see below.

>
> Only for your information. Maybe it helps to reproduce the error.
> 
> I have the same problem with my own ov9655 driver on a pxa platform 
> since I update to kernel 2.6.30
> and add crop support. Every  first open of the camera after system reset 
> the image looks like yours.
> If I use the camera the next time without changing the resolution 
> everything is OK. Only during the
> first open the resolution of the camera is changed  and function fmt set 
> in the ov9655 driver is called
> twice. I use the camera with my one program and it doesn't use crop.

Thanks Stefan, now I can reproduce the problem.
1. Boot the system
2. Capture an image with capture-example from v4l2-apps.

Then I have the shift as in the picture above on the *first* device
open, if I open the device again and capture a second time, without
rebooting, the picture is fine.

I'll let you know if I find more clues of what is causing this
behavior.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: pxa_camera + mt9m1111:  image shifted (was: Failed to configure for format 50323234)
  2009-11-03 13:45           ` pxa_camera + mt9m1111: image shifted (was: Failed to configure for format 50323234) Antonio Ospite
@ 2009-11-04 19:15             ` Guennadi Liakhovetski
  2009-11-06 19:46             ` Guennadi Liakhovetski
  1 sibling, 0 replies; 9+ messages in thread
From: Guennadi Liakhovetski @ 2009-11-04 19:15 UTC (permalink / raw)
  To: Antonio Ospite
  Cc: Stefan Herbrechtsmeier, Linux Media Mailing List, Robert Jarzmik

On Tue, 3 Nov 2009, Antonio Ospite wrote:

> On Mon, 05 Oct 2009 08:32:10 +0200
> Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de> wrote:
> 
> > Antonio Ospite schrieb:
> > > On Sun, 4 Oct 2009 00:31:24 +0200 (CEST)
> > > Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> > >
> > >>> Anyways your patch works, but the picture is now shifted, see:
> > >>> http://people.openezx.org/ao2/a780-pxa-camera-mt9m111-shifted.jpg
> > >>>
> > >>> Is this because of the new cropping code?
> > >>>       
> > >> Hm, it shouldn't be. Does it look always like this - reproducible? What 
> > >> program are you using? What about other geometry configurations? Have you 
> > >> ever seen this with previous kernel versions? New cropping - neither 
> > >> mplayer nor gstreamer use cropping normally. This seems more like a HSYNC 
> > >> problem to me. Double-check platform data? Is it mioa701 or some custom 
> > >> board?
> > >>
> 
> Platform data: if I set SOCAM_HSYNC_ACTIVE_HIGH the result is even
> "wronger", with or without SOCAM_HSYNC_ACTIVE_LOW I get the same
> result, now reproducible, see below.
> 
> >
> > Only for your information. Maybe it helps to reproduce the error.
> > 
> > I have the same problem with my own ov9655 driver on a pxa platform 
> > since I update to kernel 2.6.30
> > and add crop support. Every  first open of the camera after system reset 
> > the image looks like yours.
> > If I use the camera the next time without changing the resolution 
> > everything is OK. Only during the
> > first open the resolution of the camera is changed  and function fmt set 
> > in the ov9655 driver is called
> > twice. I use the camera with my one program and it doesn't use crop.
> 
> Thanks Stefan, now I can reproduce the problem.
> 1. Boot the system
> 2. Capture an image with capture-example from v4l2-apps.
> 
> Then I have the shift as in the picture above on the *first* device
> open, if I open the device again and capture a second time, without
> rebooting, the picture is fine.
> 
> I'll let you know if I find more clues of what is causing this
> behavior.

Yes, please do. I'll try to find some time to double-check this with my 
setup.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: pxa_camera + mt9m1111:  image shifted (was: Failed to configure for format 50323234)
  2009-11-03 13:45           ` pxa_camera + mt9m1111: image shifted (was: Failed to configure for format 50323234) Antonio Ospite
  2009-11-04 19:15             ` Guennadi Liakhovetski
@ 2009-11-06 19:46             ` Guennadi Liakhovetski
  1 sibling, 0 replies; 9+ messages in thread
From: Guennadi Liakhovetski @ 2009-11-06 19:46 UTC (permalink / raw)
  To: Antonio Ospite
  Cc: Stefan Herbrechtsmeier, Linux Media Mailing List, Robert Jarzmik

On Tue, 3 Nov 2009, Antonio Ospite wrote:

> On Mon, 05 Oct 2009 08:32:10 +0200
> Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de> wrote:
> 
> > Only for your information. Maybe it helps to reproduce the error.
> > 
> > I have the same problem with my own ov9655 driver on a pxa platform 
> > since I update to kernel 2.6.30
> > and add crop support. Every  first open of the camera after system reset 
> > the image looks like yours.
> > If I use the camera the next time without changing the resolution 
> > everything is OK. Only during the
> > first open the resolution of the camera is changed  and function fmt set 
> > in the ov9655 driver is called
> > twice. I use the camera with my one program and it doesn't use crop.
> 
> Thanks Stefan, now I can reproduce the problem.
> 1. Boot the system
> 2. Capture an image with capture-example from v4l2-apps.
> 
> Then I have the shift as in the picture above on the *first* device
> open, if I open the device again and capture a second time, without
> rebooting, the picture is fine.

Ok, tried gstreamer on my pxa board with a mt9v022 camera. Indeed, in the 
beginning the frame is shifted, but then it stabilises on its own. TBH, I 
never paid attention to such temporary self-healing problems. Have you 
tried capturing several frames in a row? is it only the first one that's 
shifted? Then, perhaps, the easiest would be to throw it away on PXA. 
Don't think I saw it on other platforms, at least not consistently. So, 
just have to check a couple of platforms and cameras, and if indeed it's 
only the case on PXA with all cameras, we'll have to throw one frame away.

Robert? Any idea?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

end of thread, other threads:[~2009-11-06 19:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-02 19:35 pxa_camera + mt9m1111: Failed to configure for format 50323234 Antonio Ospite
2009-10-02 23:27 ` Guennadi Liakhovetski
2009-10-03 14:13   ` Antonio Ospite
2009-10-03 22:31     ` Guennadi Liakhovetski
2009-10-04 15:19       ` Antonio Ospite
2009-10-05  6:32         ` Stefan Herbrechtsmeier
2009-11-03 13:45           ` pxa_camera + mt9m1111: image shifted (was: Failed to configure for format 50323234) Antonio Ospite
2009-11-04 19:15             ` Guennadi Liakhovetski
2009-11-06 19:46             ` Guennadi Liakhovetski

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.