Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: 9g20+atmel-isi driver with ADV7180
PostPosted: Mon Jul 02, 2012 5:23 pm 
Offline

Joined: Thu Aug 27, 2009 4:15 pm
Posts: 18
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???


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron