linux/drivers/staging
Marin Mitov d42bffb899 Staging: Yet another (third) dt3155 driver PCI/video4linux compliant
Kernel module (device driver) for dt3155 frame grabber
video4linux2 compliant (finally). Works with "xawtv -f".

======================================================

This driver is written (almost) from scratch, using the
allocator developed for dt3155pci see bellow). The driver
uses videobuf-dma-contig interface modified to use the above
mentioned allocator instead of dma_alloc_coheren().

The first thing to do was to design a new allocator based
on allocating a configurable number of 4MB chunks of memory,
that latter are broken into frame buffers of 768x576 bytes
kept in different FIFOs (queues). As far as the driver autoloads
as a kernel module during kernel boot, the allocation of 4MB
chunks succeeds.

The driver keeps three FIFOs: one for 4MB chunks, one for free
buffers (available for allocations) and one for buffers already
allocated. Allocation/deallocation is done automatically though
the video4linux videobuf subsystem (some pointers to functions
are replaced by driver supplied functions).

Sure, there are problems:

1. The device tested to work with "xawtv -f" either via read()
   method (DT3155_STREAMING not selected), or via mmap() method
   (DT3155_STREAMING is selected) only. This coresponds to either
   cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
   or
   cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
   but not when
   cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
                           V4L2_CAP_STREAMING |
                           V4L2_CAP_READWRITE;
   This is because xawtv calls poll() before starting streaming,
   but videobuf_poll_stream() automatically starts reading if streaming
   is not started.
   This selection is made during kernel configuration (for now).

2. Works for CCIR, but should work for RS-170 (not tested)
   This is made also during kernel configuration.

3. Could work for multiple dt3155 frame grabbers in a PC,
   (private data is allocated during PCI probe() method), but
   is not tested due to lack of a second board.

4. Not tested on a BIG ENDIAN architecture.

5. Many others you could find .... :-)

All critics, comments, suggestions are wellcome.

Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:59 -07:00
..
adis16255 Staging: add driver for adis16255 gyroscope 2010-05-11 11:35:57 -07:00
arlan Staging: arlan: arlan.h: Fixed some style issues 2010-05-11 11:35:45 -07:00
asus_oled Staging: asus_oled: asus_oled.c: Checkpatch cleanup 2010-05-11 11:35:30 -07:00
batman-adv Staging: batman-adv: send.c: Checkpatch cleanup 2010-05-11 11:35:31 -07:00
comedi Staging: comedi: remove another vendor id 2010-05-11 11:35:59 -07:00
crystalhd Staging: crystalhd: remove unused #include <linux/version.h> 2010-05-11 11:35:40 -07:00
cx25821 Staging: cx25821: Hoist assign from if 2010-05-11 11:35:43 -07:00
cxt1e1 Staging: cxt1e1: use netdev_priv to fix build 2010-05-11 11:35:57 -07:00
dream Staging: dream: smd: smd_qmi: fix code style issues 2010-05-11 11:35:45 -07:00
dt3155 Staging: dt3155: remove "inline" usage 2010-05-11 11:35:41 -07:00
dt3155v4l Staging: Yet another (third) dt3155 driver PCI/video4linux compliant 2010-05-11 11:35:59 -07:00
echo
et131x Staging: et131x: fix most coding style issues in et131x 2010-05-11 11:35:35 -07:00
frontier staging: frontier: switch semaphores to mutexes 2010-05-11 11:35:33 -07:00
go7007 Staging: go7007: fix dangling i2c pointers 2010-05-11 11:35:45 -07:00
hv Staging: hv: declare NetVscOnChannelCallback() static 2010-05-11 11:35:38 -07:00
iio Staging: iio: Fix remaining code style issues 2010-05-11 11:35:57 -07:00
line6 Staging: line6: rewrote inline comments in control.h 2010-05-11 11:35:53 -07:00
memrar Staging: memrar: fix printk format warning 2010-05-11 11:35:57 -07:00
netwave Staging: netwave: fixed trailing whitespace style issue in netwave_cs.c 2010-05-11 11:35:34 -07:00
octeon include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
otus Staging: otus: Hoist assign from if 2010-05-11 11:35:43 -07:00
panel Staging: Cleanup useless headers 2010-03-03 16:43:05 -08:00
phison Staging: phison: fix incorrect tabs in phison.c 2010-05-11 11:35:52 -07:00
pohmelfs Staging: pohmelfs: fix spaces and TAB coding style issue in inode.c 2010-05-11 11:35:41 -07:00
quatech_usb2 Staging: quatech_usb2: fix coding style issues 2010-05-11 11:35:54 -07:00
ramzswap include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rar_register Staging: rar_register: add suspend and resume functions 2010-03-03 16:42:57 -08:00
rt2860 Staging: rt2860: Hoist assign from if 2010-05-11 11:35:44 -07:00
rt2870 Staging: rt2870: Allow building on ARM 2010-05-11 11:35:55 -07:00
rt3070 Staging: rt3070: md4.h: Checkpatch cleanup 2010-03-03 16:43:07 -08:00
rtl8187se Staging: rtl8187se: fix coding style issues in r8180_core.c 2010-05-11 11:35:54 -07:00
rtl8192e Staging: rtl8192e: Use the standard config option for PM functions 2010-05-11 11:35:56 -07:00
rtl8192su Staging: rtl8192su: changed check_reset_cnt to be static again 2010-05-11 11:35:52 -07:00
rtl8192u Staging: rtl8192u: fix space coding style issue in ieee80211_crypt.h 2010-05-11 11:35:55 -07:00
samsung-laptop backlight: Allow properties to be passed at registration 2010-03-16 19:47:54 +00:00
sep Staging: sep: remove duplicated #include 2010-05-11 11:35:36 -07:00
serqt_usb2 Staging: serqt_usb2: fix space coding style issue in serqt_usb2.c 2010-05-11 11:35:54 -07:00
slicoss Staging: merge staging patches into Linus's main branch 2010-03-04 08:39:02 -08:00
sm7xx Staging: sm7xx: Fixed coding style issue 2010-05-11 11:35:53 -07:00
strip include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ti-st Staging: Kconfig, Makefile for TI's ST ldisc 2010-05-11 11:35:56 -07:00
udlfb Staging: udlfb: minor cleanups 2010-05-11 11:35:54 -07:00
usbip staging: usbip: fix coding style issues in the usbip driver 2010-05-11 11:35:46 -07:00
vme Staging: vme: declare vme_calc_slot() as static 2010-05-11 11:35:53 -07:00
vt6655 Staging: vt6655: Rename hostap_set_hostapd, hostap_iotctl. 2010-05-11 11:35:56 -07:00
vt6656 Staging: vt6656: Removed IN definition 2010-05-11 11:35:56 -07:00
wavelan Staging: wavelan: fix initialise statics to 0 in wavelan_cs.p.h 2010-05-11 11:35:47 -07:00
winbond Staging: winbond: wbusb.c Coding style fixes. 2010-05-11 11:35:50 -07:00
wlags49_h2 Staging: wlags49_h2: fix copyright and comments style issue in dhfcfg.h 2010-05-11 11:35:51 -07:00
wlags49_h25
wlan-ng Staging: wlan-ng: refactor p80211wext.c to reduce text size. 2010-05-11 11:35:50 -07:00
Kconfig Staging: Yet another (third) dt3155 driver PCI/video4linux compliant 2010-05-11 11:35:59 -07:00
Makefile Staging: Kconfig, Makefile for TI's ST ldisc 2010-05-11 11:35:56 -07:00
staging.c