Skip to contentSkip to conversation

mt9p031 shows purple coloured capture

DISCUSSION Andrei Andreyanau 2 participants 4 messages May 16, 2013 – May 17, 2013 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi, Laurent,
I have an issue with the mt9p031 camera. The kernel version I use uses soc camera framework as well as camera does. And I have the following thing which appears randomly while capturing the image using gstreamer. When I start the capture for the first time, it shows the correct image (live stream). When I stop and start it again it may show the image in purple (it can appear on the third or fourth time). Or it can show the correct image every time I start the capture. Do you have any idea why it appears so?

Thanks in advance,
Andrei Andreyanau

#1 lore raw
Quoted 9 lines · Andrei Andreyanau

Hi, Laurent,
I have an issue with the mt9p031 camera. The kernel version I use uses soc camera framework as well as camera does. And I have the following thing which appears randomly while capturing the image using gstreamer. When I start the capture for the first time, it shows the correct image (live stream). When I stop and start it again it may show the image in purple (it can appear on the third or fourth time). Or it can show the correct image every time I start the capture. Do you have any idea why it appears so?

Wrong clock or *sync polarity selection? Which leads to random start-of-frame misplacement?

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

#2 lore raw

Hi, Guennadi,

Quoted 11 lines · Guennadi Liakhovetski
Quoted 9 lines · Andrei Andreyanau

Hi, Laurent,
I have an issue with the mt9p031 camera. The kernel version I use uses soc camera framework as well as camera does. And I have the following thing which appears randomly while capturing the image using gstreamer. When I start the capture for the first time, it shows the correct image (live stream). When I stop and start it again it may show the image in purple (it can appear on the third or fourth time). Or it can show the correct image every time I start the capture. Do you have any idea why it appears so?

Quoted 3 lines

Wrong clock or *sync polarity selection? Which leads to random start-of-frame misplacement?

Do you mean pixel clock polarity? If so, I checked it - with it being inverted -
the image capture goes well (purple color also appears from time to time), but in the case it is not inverted I see a noise on the screen.

Anyway, I found one solution that lead me to this:
I have a correct image on the LCD display, connected via HDMI, I have a correct
video stream that was captured into the file, but I get the purple-coloured live stream on the display, connected via LVDS port on the board (for now - every time I capture the stream from the camera sensor).
So I used the register 0x0B (Restart), bit 0 (abandon the current frame and restart from the first row) set to 1 each time the function s_stream is called.
What do you think?

By the way, this register is not used in the latest kernel.

Regards,
Andrei

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hi, Chris,

No, I didn't try this, but I'll try. Also I was thinking that this issue appears because
the bus width is not 12 bits as needed by the datasheet, but 10 bits (as it is limited
by the hardware) so I was thinking that it may cause this issue to appear.

Regards,
Andrei

Quoted 24 lines · Chris MacGregor

Hi. IIRC, I had this problem as well. I think I "solved" it by noticing that other users were simply skipping the first 3 frames. That seems to consistently avoid the issue for me. Have you tried that?

Chris

Quoted 16 lines · Andrei Andreyanau

Hi, Laurent,
I have an issue with the mt9p031 camera. The kernel version I use uses soc camera framework as well as camera does. And I have the following thing which appears randomly while capturing the image using gstreamer. When I start the capture for the first time, it shows the correct image (live stream). When I stop and start it again it may show the image in purple (it can appear on the third or fourth time). Or it can show the correct image every time I start the capture. Do you have any idea why it appears so?

Thanks in advance,
Andrei Andreyanau
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html