[E3-hacking] [PATCH] Camera Driver

Matt Callow mattcallow at yahoo.com
Sun Sep 17 22:38:36 BST 2006


Piotr Michniewski wrote:
> 2006/9/17, Matt Callow <mc-lists at tesco.net>:
>> Piotr Michniewski wrote:
>> > Well, I've modified your driver to compile using 2.6.17 (one liner)
>> OK. What did you have to change?
> 
> --- sensor_ov6650.c     2006-09-17 12:45:10.000000000 +0200
> +++ sensor_ov6650.c.mod 2006-09-17 12:53:35.000000000 +0200
> @@ -874,7 +874,7 @@
>        return (void *)sensor;
> }
> 
> -struct camera_sensor camera_sensor_if = {
> +struct omap_camera_sensor camera_sensor_if = {
>        .version        = 0x01,
>        .name           = "OV6650",
>        .init           = ov6650sensor_init,
> 
> -----------------------
> 
> Also the Makefile needed some tuning, but I think it's ok:
> 
> # Makefile for OMAP1/2 camera driver
> 
> obj-$(CONFIG_VIDEO_OMAP_CAMERA) += omapcamera.o
> obj-$(CONFIG_VIDEO_CAMERA_SENSOR_OV9640) += sensor_ov9640.o
> obj-$(CONFIG_VIDEO_CAMERA_SENSOR_OV6650) += sensor_ov6650.o
> 
> objs-y$(CONFIG_MACH_AMS_DELTA) += omap1510cam.o
> objs-y$(CONFIG_ARCH_OMAP16XX) += omap16xxcam.o camera_core.o
> objs-y$(CONFIG_MACH_OMAP_H3) += h3_sensor_power.o
> objs-y$(CONFIG_MACH_OMAP_H4) += h4_sensor_power.o
> 
> omapcamera-objs := $(objs-yy)
> 
> EXTRA_CFLAGS = -I$(src)/..
> 
> -----------------------
> 
>> I'm not using udev, so I created the device myself.
>> crw-r--r--    1 root     root      81,   0 Apr 17  2006 /dev/video
> 
> When I load the Virtual Video Driver, the device is created
> automatically, so that's not the problem.
> 
>> I see the following dmesg output:
>>
>> Linux video capture interface: v1.00
>> OMAP Camera driver initialzing
>> omap1510cam_init
>> cam_iobase FEFB6800
>> omap1510_cam_init
>> omap1510cam_enable
>> exit omap1510cam_enable
>> exit omap1510cam_init
>> omap1510cam_set_xclk requested=21000000 actual=24000000
>> OV6650 sensor chip
>> 6650sensor_try_format sizeimage=202752
>> omap-camera: OMAP1510 Camera Parallel interface with OV6650 sensor
>> ov6650sensor_calc_xclk
>> ov6650sensor_calc_xclk returning 24000000
>> omap1510cam_init_dma
>> omap-camera: registered device video0 [v4l2]
> 
> I don't get anything...
> 
> 
>> Are you sure you enabled the camera in the kernel config? The patch
>> doesn't do it for you?
> 
> I'm not using defconfig, but:
> 
> CONFIG_VIDEO_DEV=m
> CONFIG_VIDEO_V4L1=y
> CONFIG_VIDEO_V4L1_COMPAT=y
> CONFIG_VIDEO_V4L2=y
> 
> CONFIG_VIDEO_OMAP_CAMERA=m
> # CONFIG_VIDEO_CAMERA_SENSOR_OV9640 is not set
> CONFIG_VIDEO_CAMERA_SENSOR_OV6650=y
> 
Ah, the driver won't work as a module (without some other hacks). I have:
#
# Multimedia devices
#
CONFIG_VIDEO_DEV=y

#
# Video For Linux
#

#
# Video Adapters
#
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_CPIA is not set
# CONFIG_VIDEO_SAA5246A is not set
# CONFIG_VIDEO_SAA5249 is not set
# CONFIG_TUNER_3036 is not set
# CONFIG_VIDEO_EM28XX is not set
# CONFIG_VIDEO_OVCAMCHIP is not set
# CONFIG_VIDEO_AUDIO_DECODER is not set
# CONFIG_VIDEO_DECODER is not set
CONFIG_VIDEO_OMAP_CAMERA=y
# CONFIG_VIDEO_CAMERA_SENSOR_OV9640 is not set
CONFIG_VIDEO_CAMERA_SENSOR_OV6650=y


Matt





More information about the e3-hacking mailing list