Hi,
I used
http://www.at91.com/linux4sam/bin/view/ ... xp_2_patch to add the ISI driver to the 2.6.34 kernel.
Fixed the atmel-isi.c compile erros following instructions in linux/kfifo.h
/*
* Howto porting drivers to the new generic fifo API:
*
* - Modify the declaration of the "struct kfifo *" object into a
* in-place "struct kfifo" object
* - Init the in-place object with kfifo_alloc() or kfifo_init()
* Note: The address of the in-place "struct kfifo" object must be
* passed as the first argument to this functions
* - Replace the use of __kfifo_put into kfifo_in and __kfifo_get
* into kfifo_out
* - Replace the use of kfifo_put into kfifo_in_locked and kfifo_get
* into kfifo_out_locked
* Note: the spinlock pointer formerly passed to kfifo_init/kfifo_alloc
* must be passed now to the kfifo_in_locked and kfifo_out_locked
* as the last parameter.
* - All formerly name __kfifo_* functions has been renamed into kfifo_*
*/
in my board file added the isi device:
static struct isi_platform_data __initdata isi_data = {
.image_hsize = 320,
.image_vsize = 240,
.prev_hsize = 320,
.prev_vsize = 240,
.frate = 2,
.pixfmt = ATMEL_ISI_PIXFMT_YCbYCr,
.capture_v4l2_fmt = V4L2_PIX_FMT_YUYV,
.streaming_v4l2_fmt = V4L2_PIX_FMT_RGB555X,
.cr1_flags = ISI_FULL | ISI_EMB_SYNC,
};
at91_add_device_isi(&isi_data);
Got the atmel-isi driver to compile and load:
Linux video capture interface: v2.00
atmel_isi atmel_isi: Reading configuration
atmel_isi atmel_isi: video buffer: 155648 bytes at ffced000 (phys 21940000)
atmel_isi atmel_isi: video buffer: 155648 bytes at ffd13000 (phys 21980000)
atmel_isi atmel_isi: video buffer: 155648 bytes at ffd39000 (phys 219c0000)
atmel_isi atmel_isi: video buffer: 155648 bytes at ffd5f000 (phys 21b00000)
atmel_isi atmel_isi: capture buffer: 962560 bytes at ffc02000 (phys 0x21a00000)
atmel_isi atmel_isi: Atmel ISI V4L2 device at 0xfffc0000
ls -al /dev/video*
crw-r--r-- 1 root root 81, 0 Jan 1 02:00 /dev/video0
crw-r--r-- 1 root root 81, 1 Jan 1 02:00 /dev/video1
followed the init script in ADV7180 datasheet.
adv7180 0-0020: INSEL = Composite AIN1
adv7180 0-0020: Enable SFL
adv7180 0-0020: Select SH1
adv7180 0-0020: Clear NEWAV_MODE
adv7180 0-0020: MWE enable manual window, color kill threshold to 2
adv7180 0-0020: BLM optimization
adv7180 0-0020: RGB optimization
adv7180 0-0020: Hidden Space
adv7180 0-0020: ADC configuration
adv7180 0-0020: User space
i2c-core: driver [adv7180] registered
but as soon as I use a program like ffmpeg to do a capture on /dev/video0
I get atmel_isi_capture: unknown ioctl ' error -22
I got the same error with mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/AtmelIsiDriver/capture.c as with ffmpeg.
I noticed that there are warnings on compiling the atmel-isi driver:
drivers/media/video/atmel-isi.c:1954: warning: initialization from incompatible pointer type
.ioctl = video_ioctl2,
drivers/media/video/atmel-isi.c:1966: warning: initialization from incompatible pointer type
.ioctl = video_ioctl2,
So I changed .ioctl to .unlocked_ioctl
Now I have a different error message when using ffmpeg.
[video4linux2 @ 0x2a430]ioctl(VIDIOC_QUERYCAP): Inappropriate ioctl for device
And have been stuck here for the past week...
Any help please???