summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_video.c
AgeCommit message (Collapse)Author
2008-11-01v4l: remove inode argument from video_usercopyHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The inode argument was never used. Removing it from video_usercopy brings the function pointer type of video_usercopy in line with similar v4l2 functions, thus simplifying several drivers. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-21Get rid of inode parameter at v4l_compat_translate_ioctl()Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> The inode parameter at v4l_compat_translate_ioctl() were just passed over several places just to keep compatible with fops.ioctl. However, it weren't used anywere. This patch gets hid of this unused parameter. Priority: normal CC: Laurent Pinchart <laurent.pinchart@skynet.be> CC: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-08-23v4l-dvb: fix a bunch of sparse warningsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Fixed a lot of sparse warnings: mostly warnings about shadowed variables and signed/unsigned mismatches. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-27saa7146: fix read from uninitialized memoryHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The offset field of the scatterlist entry *after* the last valid scatterlist entry was used instead of the first scatterlist entry (as was the intention of this code). This worked fine until the kzalloc of the sglist was replaced with kmalloc and sg_init_table only zeroed the exact needed length. Apparently kzalloc zeroes a bit more than is strictly necessary so the offset field was always 0 in the past. But now the offset field was suddenly random and this led to broken captures. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-26saa7146: fix VIDIOC_ENUM_FMTHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> VIDIOC_ENUM_FMT should keep the index and type fields. Instead, type was zeroed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-06-22saa7146: ->cpu_addr and friends are little-endianMauro Carvalho Chehab
From: Al Viro <viro@ftp.linux.org.uk> Annotations + stop saa7146_i2c from playing fast and loose with reuse of ->cpu_addr for host-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-30backport tuners move patch from -gitMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Due to the feedback I got, I've changed the -git patch. This needs to be reflected also at -hg tree. kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-26From: Mauro Carvalho Chehab <mchehab@infradead.org>Mauro Carvalho Chehab
Move tuners to common/tuners There were several issues in the past, caused by the hybrid tuner design, since now, the same tuner can be used by drivers/media/dvb and drivers/media/video. This patch moves those common tuners into a common dir. It also moves saa7146 driver into drivers/media/video, where other hybrid drivers are placed. Kconfig items were rearranged, to split V4L/DVB core from their drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-25From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>Mauro Carvalho Chehab
Subject: Convert videobuf-dma-sg to generic DMA API Date: Tue, 19 Feb 2008 13:40:54 +0100 (CET) videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-31videobuf lock is already initialized at videobuf-core.cMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Removes the duplicated mutex_init code. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-10Removed a bad whitespaceMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-19V4L: Fix VIDIOCGMBUF locking in saa7146Brandon Philips
Fallout from videobuf_mmap_setup() locking fixes. Signed-off-by: Brandon Philips <bphilips@suse.de>
2007-11-13V4L: videobuf-core locking fixes and commentsBrandon Philips
- Add comments to functions that require that caller hold q->lock - Add __videobuf_mmap_free that doesn't hold q->lock for use within videobuf - Add locking to videobuf_mmap_free - Fix linux/drivers/media/common/saa7146_video.c which was holding lock around videobuf_read_stop - Add locking to functions that operate on a queue - Add videobuf_stop to take care of stopping in both the read and stream case TODO: bttv still has an unsafe call to videobuf_queue_is_busy Signed-off-by: Brandon Philips <bphilips@suse.de>
2007-11-06V4L: videobuf: don't chew up namespace STATE_.*, convert to VIDEOBUF_Brandon Philips
s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g s/STATE_PREPARED/VIDEOBUF_PREPARED/g s/STATE_QUEUED/VIDEOBUF_QUEUED/g s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g s/STATE_DONE/VIDEOBUF_DONE/g s/STATE_ERROR/VIDEOBUF_ERROR/g s/STATE_IDLE/VIDEOBUF_IDLE/g Signed-off-by: Brandon Philips <bphilips@suse.de>
2007-10-05 V4L: videobuf-core.c avoid NULL dereferences in videobuf-coreMauro Carvalho Chehab
From: Brandon Philips <bphilips@suse.de> The return value of videobuf_alloc() is unchecked but this function will return NULL on an error. Check for NULL and make videobuf_reqbufs() return the number of successfully allocated buffers. Also, fix saa7146_video.c and bttv-driver.c to use this returned buffer count. Tested against the vivi driver. Not tested against saa7146 or bt8xx devices. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-23Adapt drivers to use the newer videobuf modulesMauro Carvalho Chehab
PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo. Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct. So, to access it, a subroutine call is needed. This patch renames all occurences of those function calls to be consistent with the video-buf split. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-07-13saa7146/dvb-ttpci: Fix signedness warnings (gcc 4.1.1, kernel 2.6.22)Oliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Fix signedness warnings (gcc 4.1.1, kernel 2.6.22). Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-04-22saa7146: Release capture buffers on device closeOliver Endriss
From: Hartmut Birr <e9hack@gmail.com> If the video device (saa7146 on a FF card) was open for capturing, the close call didn't release the capture buffers. Signed-off-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-02-19compat: Add -include linux/version.h to cflagsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add -include linux/version.h to the cflags. Now code can have backward compatibility test without including compat.h first. Linux headers included from compat.h are removed, so that code will get the same headers when compiling in v4l-dvb as it does in the kernel. Many drivers have compat.h moved to the end of their include list, as this lets compat.h do things it can't do at the beginning. Such as test of something is defined to include compat code, or to put a wrapper around a function without changing the function's name. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-08-09[saa7146] Fixed image grabbing (VIDIOCGMBUF ioctl)Oliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Fixed regression reported by Peter Holik: Image grabbing failed because of invalid config option VIDEO_V4L1_COMPAT. Should be CONFIG_VIDEO_V4L1_COMPAT. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-08-02V4L2 Conversion: saa5246a, saa5249, vino, hexium_orion, hexium_geminiMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Just a few adjustments were required on those drivers to be V4L2 compliant. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-11Kill drivers/media/common/saa7146_vv_ksyms.cMauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> This patch moves the EXPORT_SYMBOL's from drivers/media/common/saa7146_vv_ksyms.c to the files with the actual functions. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-10Make video_buf more genericMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Video_buf were concerned to allow PCI devices to be used as video capture devices. This patch extends video_buf features by virtualizing pci-dependent functions and allowing other type of devices to use it. It is still DMA centric, although it may be used also by devices that emulates scatter/gather behavior or a DMA device Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-02-06sem2mutex: drivers/media/, #2Mauro Carvalho Chehab
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2005-12-08syncronizes some changes between v4l and dvbMauro Carvalho Chehab
- Updated firmware names - kfree (NULL) is valid. - assert_spin_locked() is the new way - small fixes to make in sync with kernel Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-26Whitespaces cleanups.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-25saa7146 compatability fix for use with headers in v4l-kernel cvsMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-07-16Remove all #include <linux/version.h> and all referencesJohannes Stezenbach
to LINUX_VERSION_CODE and KERNEL_VERSION. Based on patch by Olaf Hering. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
2005-06-19backport of 2.6.12 changes to match other API changes (i2c, usb)Johannes Stezenbach
2005-03-02whitespace cleanup (remove ws at eol, sync with changes in mainline kernel)Johannes Stezenbach
2004-11-21- prefix IER_DISABLE and IER_ENABLE with SAA7146_Johannes Stezenbach
- add SAA7146_ISR_CLEAR - use those consistently in the ttpci driver
2004-11-16 - videobuf api changes in 2.6.10Kenneth Aafloy
2004-11-16 - MODULE_PARM -> module_paramKenneth Aafloy
2004-10-26- add back support for older kernels due to popular demandMichael Hunold
2004-10-25- follow latest changes in 2.6.10-rc1 regarding video-buf. this changeMichael Hunold
breaks compilation with older kernels for dvb-ttpci
2004-07-31merge back various cleanups from mainline kernel:Johannes Stezenbach
- sparse annotiations (viro) - NULL noise removal (viro) - #if where #ifdef should've been (saa7146) (viro) - convert private ABS() to kernel's abs() (rddunlap) - dvb_register_i2c_device() locking fix for -ENOMEM (akpm) - dvb_register_i2c_bus() locking fix for -ENOMEM (akpm)
2004-07-28- rename memory to max_memory, because it clashes with some obscure ↵Michael Hunold
definition of memory on some esoteric platform
2004-06-18- apply cpu_to_le32() to all write operations concerning page tables, ↵Michael Hunold
necessary to support big-endian machines (thanks to Wolfram Joost)
2004-04-28- fix some ppc be endianess issues, overlay works fine, grabbing does not ↵Michael Hunold
work reliably yet, though
2004-03-19- copy & paste error: don't check for streaming capture twice, check for ↵Michael Hunold
overlay video in one case
2004-03-16- fix two debug messages (mixed up streaming capture and overlay)Michael Hunold
- restrict S_FBUF ioctl to CAP_SYS_ADMIN or CAP_SYS_RAWIO - don't refuse setting S_FBUF when overlay is active (changes become visible with the next update)
2004-03-15- code review of what's actually needed to be protected by a spinlock and by ↵Michael Hunold
the device lock - this fixes the "in_atomic():1, irqs_disabled():1" warnings in the syslog
2004-03-12With the addition of the ressource management, an overlay couldn't beMichael Hunold
interrupted by a streaming capture any more. So: - revamp video_begin()/video_end(), saa7146_start_preview()/saa7146_stop_preview - clean up a lot of mess around the usage of these functions - allow overlay to be suspended by streaming capture again, if ressources are available
2004-03-11- minor debug output cleanup in the resource handling functionsMichael Hunold
- deny activation of streaming capture if overlay is active, apps must disable overlay first - fix resource handling for overlay - don't try to stop streaming capture when it's not running
2004-02-26[PATCH] C99 initializers for drivers/media/common/saa7146_video.c by Art HaasMichael Hunold
2004-02-02- don't free resources while spinlock is held (might sleep)Michael Hunold
2004-02-02- release resources for video overlay properly, don't rely on VIDIOC_OVERLAY(0)Michael Hunold
2004-01-26- don't try to disable video overlay if it wasn't enabled beforeMichael Hunold
(bug catched by new resource management)
2004-01-26- make sure to disable clipping before capturing, otherwise capturing mayMichael Hunold
not work - make sure to disable the right video dma at capture stop
2004-01-14- bit masks are evil: disable the right video dma upon device close, otherwiseMichael Hunold
severe memory damage can occur...