OV2643 Camera on A20

474 views
Skip to first unread message

jons...@gmail.com

unread,
Jan 5, 2014, 12:32:07 AM1/5/14
to linux...@googlegroups.com
I have an A20 system here that has a lot of noise in the camera. Does anyone have experience with noise like this? Is this something that software can impact or is it a problem in PCB? It is OV2643 image sensor.

Looks like it is using this driver.




--
Jon Smirl
jons...@gmail.com

Michal Suchanek

unread,
Jan 5, 2014, 5:38:40 AM1/5/14
to linux-sunxi
AFAIK the camera board is connected digitally so the noise is something that is internal to the camera board.

It is normal that under low light condition the image is noisy. Did you try taking pictures in full daylight or using some photography lighting?

The noise can be removed in software and the AW chips should have some image filter which is probably unused as of now.

Thanks

Michal


--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

jons...@gmail.com

unread,
Jan 5, 2014, 10:50:03 AM1/5/14
to linux...@googlegroups.com
On Sun, Jan 5, 2014 at 5:38 AM, Michal Suchanek <hram...@gmail.com> wrote:
AFAIK the camera board is connected digitally so the noise is something that is internal to the camera board.

It is normal that under low light condition the image is noisy. Did you try taking pictures in full daylight or using some photography lighting?

I have four other USB webcams and none of them have this noise under same lighting conditions. I have two other Allwinner systems with cameras and they all have noise. I checked it out this morning under sunlight. It is better but the noise is still there. 

Maybe the camera images need some image processing that is not getting turned on under the Allwinner platform? All of the Allwinner devices appear to be running Allwinner SDK with only minor changes. They probably all copied each other.

The datasheet for the image sensor is here:

It is also possible that image processing features of the sensor chip are not properly enabled.
 

The noise can be removed in software and the AW chips should have some image filter which is probably unused as of now.

Thanks

Michal


On 5 January 2014 06:32, jons...@gmail.com <jons...@gmail.com> wrote:
I have an A20 system here that has a lot of noise in the camera. Does anyone have experience with noise like this? Is this something that software can impact or is it a problem in PCB? It is OV2643 image sensor.

Looks like it is using this driver.




--
Jon Smirl
jons...@gmail.com

--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jon Smirl
jons...@gmail.com

Michal Suchanek

unread,
Jan 5, 2014, 11:43:06 AM1/5/14
to linux-sunxi
On 5 January 2014 16:50, jons...@gmail.com <jons...@gmail.com> wrote:
 


On Sun, Jan 5, 2014 at 5:38 AM, Michal Suchanek <hram...@gmail.com> wrote:
AFAIK the camera board is connected digitally so the noise is something that is internal to the camera board.

It is normal that under low light condition the image is noisy. Did you try taking pictures in full daylight or using some photography lighting?

I have four other USB webcams and none of them have this noise under same lighting conditions. I have two other Allwinner systems with cameras and they all have noise. I checked it out this morning under sunlight. It is better but the noise is still there. 

Maybe the camera images need some image processing that is not getting turned on under the Allwinner platform? All of the Allwinner devices appear to be running Allwinner SDK with only minor changes. They probably all copied each other.

The datasheet for the image sensor is here:

It is also possible that image processing features of the sensor chip are not properly enabled.

 
According to the datasheet the camera chip has various image processing filters including noise reduction. Does the driver support tuning these filters?

Thanks

Michal

jons...@gmail.com

unread,
Jan 5, 2014, 11:48:29 AM1/5/14
to linux...@googlegroups.com
I can modify driver. But that triggers the whole problem of being able to rebuild the software for these devices. I'm trying to figure out how to extract the fex files. They are STBs and don't have normal Android buttons.

 

Thanks

Michal

--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jon Smirl
jons...@gmail.com

Michal Suchanek

unread,
Jan 5, 2014, 11:55:42 AM1/5/14
to linux-sunxi
Meaning not even a FEL button?

Do you get access to the boot partition with adb?

The other way would be to run a non-broken Linux system from SD card.
Getting at least serial or ethernet should be easy if the box has
those. Or an USB Ethernet.

Thanks

Michal

jons...@gmail.com

unread,
Jan 5, 2014, 12:01:02 PM1/5/14
to linux...@googlegroups.com
No OTG USB port. They put a hub chip on the board and only exposed host port. 

 
Do you get access to the boot partition with adb?

The other way would be to run a non-broken Linux system from SD card.
Getting at least serial or ethernet should be easy if the box has
those. Or an USB Ethernet.

It has Ethernet. I'm trying to figure it out, I haven't used Android SDK with Ethernet before.
 

Thanks

Michal

--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jon Smirl
jons...@gmail.com

jons...@gmail.com

unread,
Jan 5, 2014, 12:19:05 PM1/5/14
to linux...@googlegroups.com
The unit has a Chinese Android build on it which is slowing me down. 

I haven't figure out how to start adb Ethernet daemon on target device.
--
Jon Smirl
jons...@gmail.com

Joseph Nguya

unread,
Sep 22, 2014, 9:16:48 AM9/22/14
to linux...@googlegroups.com
Hi Jon,

The A20 does not support SCCB protocol. Did you manage to get a working sccb driver for the ov2643 working over i2c for the A20? What did you do to get it working.

Thanks.

jons...@gmail.com

unread,
Sep 22, 2014, 9:30:23 AM9/22/14
to linux-sunxi, George Ioakimedes
George has i2c working.

For more options, visit https://groups.google.com/d/optout.



--
Jon Smirl
jons...@gmail.com

Joseph Nguya

unread,
Sep 22, 2014, 9:48:24 AM9/22/14
to linux...@googlegroups.com, georg...@gmail.com
Are you able to share your ov2643.c driver; for what kernel was it built

jons...@gmail.com

unread,
Sep 22, 2014, 9:50:18 AM9/22/14
to linux-sunxi, George Ioakimedes
On Mon, Sep 22, 2014 at 9:48 AM, Joseph Nguya <gnu.ha...@gmail.com> wrote:
Are you able to share your ov2643.c driver; for what kernel was it built

George is using OV5642.



--
Jon Smirl
jons...@gmail.com

Joseph Nguya

unread,
Sep 22, 2014, 9:58:09 AM9/22/14
to linux...@googlegroups.com, georg...@gmail.com
Thanks, we'll try.

George Ioakimedes

unread,
Sep 22, 2014, 10:09:10 AM9/22/14
to linux...@googlegroups.com, georg...@gmail.com
Yes, basic SCCB/I2C communication is working but the actual drivers do not work. From what I can tell all of the OmniVision cameras use the same SCCB/I2C communication and the only difference are the register definitions and settings.

Unfortunately I have not been successful in getting the drivers to work, they either crash the kernel or reply with an error. For some reason the drivers are written differently than what I seen from TI and Freescale and internet searching shows both of those platforms have working solutions.

I want to get this working but I am not a driver developer so my work is slow and wastes a lot time. I'm hoping to find someone to help with this project!

Joseph Nguya

unread,
Sep 23, 2014, 10:26:56 AM9/23/14
to linux...@googlegroups.com, georg...@gmail.com
Please see attached working ov2643.c driver from Stefan.

--
You received this message because you are subscribed to a topic in the Google Groups "linux-sunxi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/linux-sunxi/ZLA9o31cKZ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to linux-sunxi...@googlegroups.com.
ov2643.c

Simon Kenyon

unread,
Sep 23, 2014, 10:45:42 AM9/23/14
to linux...@googlegroups.com
On 09/23/14 15:26, Joseph Nguya wrote:
> Please see attached working ov2643.c driver from Stefan.
is that was passes for "working" in this day and age?

George Ioakimedes

unread,
Sep 23, 2014, 11:05:04 AM9/23/14
to linux...@googlegroups.com
I'll take a look at this today but unless this is somewhat recent it may not still work. I'm planning on trying to trace the kernel panics in hopes of finding the cause.

George Ioakimedes

unread,
Sep 23, 2014, 11:14:15 AM9/23/14
to linux...@googlegroups.com
Just out of curiosity because I've seen this with the other OmniVision drivers, how could a set parameter function work if all the code is commented out?

Enter code here...static int sensor_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
{
	struct v4l2_captureparm *cp = &parms->parm.capture;
	//struct sensor_info *info = to_state(sd);

	if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
		return -EINVAL;

	memset(cp, 0, sizeof(struct v4l2_captureparm));
	cp->capability = V4L2_CAP_TIMEPERFRAME;
	cp->timeperframe.numerator = 1;
	cp->timeperframe.denominator = SENSOR_FRAME_RATE;
	
	return 0;
}

static int sensor_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
{
//	struct v4l2_captureparm *cp = &parms->parm.capture;
	//struct v4l2_fract *tpf = &cp->timeperframe;
	//struct sensor_info *info = to_state(sd);
	//int div;

//	if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
//		return -EINVAL;
//	if (cp->extendedmode != 0)
//		return -EINVAL;

//	if (tpf->numerator == 0 || tpf->denominator == 0)
//		div = 1;  /* Reset to full rate */
//	else
//		div = (tpf->numerator*SENSOR_FRAME_RATE)/tpf->denominator;
//		
//	if (div == 0)
//		div = 1;
//	else if (div > CLK_SCALE)
//		div = CLK_SCALE;
//	info->clkrc = (info->clkrc & 0x80) | div;
//	tpf->numerator = 1;
//	tpf->denominator = sensor_FRAME_RATE/div;
//sensor_write(sd, REG_CLKRC, info->clkrc);
	return 0;
}

kie...@manmakemachine.com

unread,
Jan 26, 2015, 6:35:46 AM1/26/15
to linux...@googlegroups.com
Hi George,

I am enjoying the pain of getting an OV2643 working with an A20. Did you manage to get any working solutions?

George Ioakimedes

unread,
Jan 27, 2015, 6:24:10 PM1/27/15
to linux...@googlegroups.com
Actually I did luck out. I tried almost everything to get things working but in the end it was actually people from AW-SOM that had done the work. Their repo is at https://src.aw-som.com/git/awsom/linux-sunxi/tree/awsom-3.4/drivers/media/video/sunxi_csi
And what I did was copy their work and paste it into my updated kernel. 

I have detailed notes on what did and didn't work as well as a patch I made but I don't think the group needs to be flooded with my progress. If you want to take this off line and then report back to the group I think that would be better. You can email me directly at georgeioak at gmail dot com and I can send you my notes.

On Mon, Jan 26, 2015 at 3:35 AM, <kie...@manmakemachine.com> wrote:
Hi George,

I am enjoying the pain of getting an OV2643 working with an A20. Did you manage to get any working solutions?

nska...@gmail.com

unread,
Oct 7, 2015, 8:29:23 AM10/7/15
to linux-sunxi
On Sunday, 5 January 2014 11:02:07 UTC+5:30, Jon Smirl wrote:
> I have an A20 system here that has a lot of noise in the camera. Does anyone have experience with noise like this? Is this something that software can impact or is it a problem in PCB? It is OV2643 image sensor.
>
>
>
> Looks like it is using this driver.
> http://files.virt2real.ru/docs/
>
>
>
>  P1050011_1.JPG
>
>
>
>  P1050013_1.JPG
>
>
> --
> Jon Smirl
> jons...@gmail.com

I am not able to establish SCCB communication with OV2643 (my 2MP sensor on board). I was not able to use the existing I2C controller to communicate over SCCB. Please note I2C needs an ACK from Slave -- in SCCB there is no ACK concept. Also there is one don't care or NA bit in described in SCCB that is not there in I2C.

Hence I wrote my own APB to SCCB controller and started the HW validation.

But I am still not getting the correct data from if I read a register over SCCB.

Requesting for help -- if there is any know issue etc and how they are resolved.
if someone used the I2C to communicate over SCCB, what you did for ACK and Don't care / NA bit.

Please give me some information -- I am ok to use i2c or SCCB controller whatever it works.

jons...@gmail.com

unread,
Oct 7, 2015, 8:54:54 AM10/7/15
to nska...@gmail.com, linux-sunxi
On Wed, Oct 7, 2015 at 6:19 AM, <nska...@gmail.com> wrote:
> On Sunday, 5 January 2014 11:02:07 UTC+5:30, Jon Smirl wrote:
>> I have an A20 system here that has a lot of noise in the camera. Does anyone have experience with noise like this? Is this something that software can impact or is it a problem in PCB? It is OV2643 image sensor.
>>
>>
>>
>> Looks like it is using this driver.
>> http://files.virt2real.ru/docs/
>>
>>
>>
>> P1050011_1.JPG
>>
>>
>>
>> P1050013_1.JPG
>>
>>
>> --
>> Jon Smirl
>> jons...@gmail.com
>
> I am not able to establish SCCB communication with OV2643 (my 2MP sensor on board). I was not able to use the existing I2C controller to communicate over SCCB. Please note I2C needs an ACK from Slave -- in SCCB there is no ACK concept. Also there is one don't care or NA bit in described in SCCB that is not there in I2C.

I tossed this system about a year ago since I never could get it
working correctly. The Android A20 source has the semi-working OV2643
driver in it. AFAIK it has never been ported over to mainline.

I am having much more success with external camera boards based on the
Hi3518e and then hooking them up to the main CPU via USB. You can buy
nice camera PCBA for under $10. For these chips the camera is the
main line of business and they do a much better job of making it work.
Plus it is way easy to attach multiple cameras.


>
> Hence I wrote my own APB to SCCB controller and started the HW validation.
>
> But I am still not getting the correct data from if I read a register over SCCB.
>
> Requesting for help -- if there is any know issue etc and how they are resolved.
> if someone used the I2C to communicate over SCCB, what you did for ACK and Don't care / NA bit.
>
> Please give me some information -- I am ok to use i2c or SCCB controller whatever it works.
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jon Smirl
jons...@gmail.com
Reply all
Reply to author
Forward
0 new messages