summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (6293): V4L: convert struct class_device to struct deviceKay Sievers2007-10-1010-340/+387
| | | | | | | | | | | | The currently used "struct class_device" will be removed from the kernel. Here is a patch that converts all users in drivers/media/video/ to struct device. Reviewed-by: Thierry Merle <thierry.merle@free.fr> Reviewed-by: Mike Isely <isely@pobox.com> Reviewed-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6292): videobuf_core init always require callback implementationMauro Carvalho Chehab2007-10-104-15/+21
| | | | | | | | | | | In the past, videobuf_queue_init were used to initialize PCI DMA videobuffers. This patch renames it, to avoid confusion with the previous kernel API, doing: s/videobuf_queue_init/void videobuf_queue_core_init/ Also, the operations is now part of the function parameter. The function will also add a test if this is defined, otherwise producing BUG. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6291): Fix: avoid oops on some SMP machinesMauro Carvalho Chehab2007-10-101-0/+8
| | | | | | | | This workaround fix a bug that happens on some SMP machines. On those machines, videobuf_iolock is called too soon, before file .mmap handler. This patch calls the scheduler before iolocking, allowing it to properly call the pending mmap. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6290): remove videobuf_set_pci_opsMauro Carvalho Chehab2007-10-103-80/+4
| | | | | | | | | | Before the videobuf redesign, a procedure for re-using videobuf without PCI scatter/gather where provided by changing the pci-dependent operations by other operations. With the newer approach, those methods are obsolete and can safelly be removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6289): Remove reference to dead CONFIG_UST and ust.h headerRobert P. J. Day2007-10-101-5/+0
| | | | | Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6287): Fix DMA Scatter/Gather constructorMauro Carvalho Chehab2007-10-101-1/+1
| | | | | | | | | cx23885 driver were converted to use the newer videobuf support. Unfortunately, the constructor weren't changed. This causes an oops, since the abstract methods (implemented as callbacks) aren't defined. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
* V4L/DVB (6286): Add support for MSI TV @nywhere A/D NBMauro Carvalho Chehab2007-10-102-2/+8
| | | | | | This is a Lifeview hybrid OEM board. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6285): Remove pointless kmalloc() return value cast in Zoran PCI ↵Jesper Juhl2007-10-101-4/+1
| | | | | | | | | | controller driver No need to cast the void pointer returned by kmalloc() in drivers/media/video/zoran_driver.c::v4l_fbuffer_alloc(). Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6284): cx23885: Update to new videobuf codeTrent Piepho2007-10-102-6/+8
| | | | | | | | | | cx23885 was still uses the old video-buf includes and code, which would only `work' if one happened to be compiling against a kernel that had the old headers. Even then, it wouldn't actually work, it would just compile without errors. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6283): videobuf: Remove references to old Kconfig option nameTrent Piepho2007-10-104-8/+6
| | | | | | | | | | | | | | | | CONFIG_VIDEO_BUF_DVB became CONFIG_VIDEOBUF_DVB. But in these cases, it makes more sense to use CONFIG_VIDEO_SAA7134_DVB or CONFIG_VIDEO_CX88_DVB_MODULE depending on the driver. The reference in cx23885.h should just be removed, as the code there needs to be included if DVB is on or off. I do not think you can even compile the cx23885 driver without DVB. It's clearly just leftover from when the file was obvious copied from the cx88 driver (which is not mentioned in the copyright BTW). Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6279): en_50221: convert to kthread APIChristoph Hellwig2007-10-101-68/+16
| | | | | | | | Here's an attempted update to the full kthread API + wake_up_process: Signed-off-by: Andrew Morton <akpm@linux-foundation.org> CC: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6278): Buf: fix typo that caused data loss when readng streams from ↵Maxim Levitsky2007-10-101-1/+1
| | | | | | | | | | | device If videobuf_read_stream reads two or more buffers it was overwriting the first one Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> 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>
* V4L/DVB (6277): vivi cleanup: remove the unused varsMauro Carvalho Chehab2007-10-101-5/+0
| | | | | | Vivi driver is now simpler. This patch removes the now unused vars. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6276): V4L: videobuf-core.c lock before streaming checkBrandon Philips2007-10-101-3/+5
| | | | | | | | | | The reading/streaming fields are used for mutual exclusion of the queue and should be protected by the queue lock. Signed-off-by: Brandon Philips <bphilips@suse.de> 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>
* V4L/DVB (6275): V4L: vivi.c remove the "resource" lockingBrandon Philips2007-10-101-44/+4
| | | | | | | | | | | | | | The "resource" locking in vivi isn't needed since streamon/streamoff/read_stream do mutual exclusion using q->reading/q->streaming. Plus it is sort of broken: a) res_locked() use in vivi_read() is racey. b) res_free() calls mutex_lock twice causing streamoff to break Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6274): V4L: vivi.c replace logic in vivi_poll with videobuf_poll_streamBrandon Philips2007-10-101-17/+2
| | | | | | | | Since vivi is using videobuf_read_stream() it can use videobuf_poll_stream() now. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6273): V4L: vivi.c vidioc_try_fmt_cap() negotiate a valid fieldBrandon Philips2007-10-101-2/+1
| | | | | | | If the client provides V4L2_FIELD_ANY vivi should return a valid field :) Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6272): V4L: properly fix support for capturing interlaced video in ↵Maxim Levitsky2007-10-103-10/+16
| | | | | | | | | | | saa7134 By "capturing interlaced video" I mean that card ensures that top field is really top and vice versa (I think it takes the filed ID from signal) Properly turn on/off that support depending on signal state Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6271): V4L: Add basic support for suspend/resume for saa7134Maxim Levitsky2007-10-105-95/+244
| | | | | | | | | This adds support for suspend/resume for core of saa7134 Should fix bug#7220 Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6270): V4L: Honor dev->ctl_invert when setting up the decoder in ↵Maxim Levitsky2007-10-101-2/+6
| | | | | | | | | | | saa7134 When user sets dev->ctl_invert, driver writes negative values to SAA7134_DEC_LUMA_CONTRAST and SAA7134_DEC_CHROMA_SATURATION, but general code that initializes decorder ignores that Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6269): V4L: Fix a "scheduling while atomic" bug in saa7134Maxim Levitsky2007-10-101-0/+4
| | | | | | | | | set_tvnorm can sleep in saa7134_i2c_xfer (it will be called through tuner code) but code calls it under spinlock. Fix that Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6268): V4L: Fix a lock inversion in generic videobuf codeMaxim Levitsky2007-10-102-5/+34
| | | | | | | | | | | | | | | | | | | videobuf_qbuf takes q->lock, and then calls q->ops->buf_prepare which by design in all drivers calls videobuf_iolock which calls videobuf_dma_init_user and this takes current->mm->mmap_sem on the other hand if user calls mumap from other thread, sys_munmap takes current->mm->mmap_sem and videobuf_vm_close takes q->lock Since this can occur only for V4L2_MEMORY_MMAP buffers, take current->mm->mmap_sem in qbuf, before q->lock, and don't take current->mm->mmap_sem videobuf_dma_init_user for those buffers Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6266): videobuf cleanup: mmap check is common to all videobuf. Make ↵Mauro Carvalho Chehab2007-10-106-52/+20
| | | | | | | | it at core 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>
* V4L/DVB (6265): Prevent for calling mmap_free without an allocated bufferMauro Carvalho Chehab2007-10-101-0/+3
| | | | | | 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>
* V4L/DVB (6264): Make the vertical lines to moveMauro Carvalho Chehab2007-10-101-6/+11
| | | | | | | While this is not the standard color bar behaviour, having some movement there allows to check if buffers are being properly handled. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6263): Fix buffer release codeMauro Carvalho Chehab2007-10-101-1/+3
| | | | | | Release code should happen before the cleaning of map variable. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6262): An allocation error message were being printed as a debug msgMauro Carvalho Chehab2007-10-101-2/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6261): Cleans mem->vmalloc after vfreeMauro Carvalho Chehab2007-10-101-0/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6260): Fix Kconfig dependencyMauro Carvalho Chehab2007-10-104-5/+5
| | | | | | Thanks to Michael Krufky for pointing this to me. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6259): Fix vivi poll() methodMauro Carvalho Chehab2007-10-101-3/+2
| | | | | | | | | | | Due to the replace of videobuf_read_one to videobuf_read_stream, poll() method implementation is wrong. This fixes poll() implementation, making read of /dev/video? to work again. With this method, an USB driver can use video-buf, without needing to request memory from the DMA-safe area. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6257): Rename video-buf-dvb to videobuf-dvb to be consistent with ↵Mauro Carvalho Chehab2007-10-105-4/+4
| | | | | | the other patches Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6256): Remove the obsolete video-buf moduleMauro Carvalho Chehab2007-10-092-1713/+0
| | | | | | 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>
* V4L/DVB (6255): Convert vivi to use videobuf-vmallocMauro Carvalho Chehab2007-10-091-29/+15
| | | | | | | | | This patch removes the usage of videobuf-dma-sg from vivi driver, using instead videobuf-vmalloc. This way, vivi will be useful for testing the newer method. Reverting this patch won't hurt vivi, since both methods work fine. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6254): Add videobuf-vmallocMauro Carvalho Chehab2007-10-095-1/+434
| | | | | | | | | | | Adds a newer videobuf-vmalloc module. This module uses the same videobuf controls, but implements memory allocation based on vmalloc methods. With this method, an USB driver can use video-buf, without needing to request memory from the DMA-safe area. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6253): Convert vivi to use the newer videobuf-dma-sg moduleMauro Carvalho Chehab2007-10-091-33/+20
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6252): Adapt drivers to use the newer videobuf modulesMauro Carvalho Chehab2007-10-0934-130/+125
| | | | | | | | | | | | | | 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>
* V4L/DVB (6251): Replace video-buf to a more generic approachMauro Carvalho Chehab2007-10-094-0/+2126
| | | | | | | | | | | | | | | | | | | | | | | | | video-buf currently does two different tasks: - Manages video buffers with a common code that allows implementing all the V4L2 different modes of buffering; - Controls memory allocations While the first task is generic, the second were written to support PCI DMA Scatter/Gather needs. The original approach can't even work for those video capture hardware that don't support scatter/gather. I did one approach to make it more generic. While the approach worked fine for vivi driver, it were not generic enough to handle USB needs. This patch creates two different modules, one containing the generic video buffer handling (videobuf-core) and another with PCI DMA S/G. After this patch, it would be simpler to write an USB video-buf and a non-SG DMA module. 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>
* V4L/DVB (6250): bw-qcam use data_reverse instead of manually poking the ↵Brett Warden2007-10-091-4/+4
| | | | | | | | | control register fix coding-style repairs Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6249): Add Typhoon Tv-Tuner PCI to bttv-cards.cSascha Sommer2007-10-093-0/+20
| | | | | | | Adds an entry for the Typhoon Tv-Tuner PCI to bttv-cards.c Signed-off-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6247): Fix bug #8689: Fixes IR stop/start during suspend/resumeMauro Carvalho Chehab2007-10-094-2/+13
| | | | | | | | | | | | | | | | IR workqueue should be disabled during suspend. This avoids some troubles, like the one reported on bug #8689: "The Hauppauge HVR 1100 ir-remote control does not work after resume from suspend to ram or disk." This patch disables IR before suspending, re-enabling it after resume. Thanks to Peter Poklop <Peter.Poklop@gmx.at> for reporting it and helping with the fix. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Reviewed-by: Peter Poklop <Peter.Poklop@gmx.at>
* V4L/DVB (6246): GemTek Radio card - Control WordTrent Piepho2007-10-091-80/+44
| | | | | | | | | | Redoes the way the control word is stored and set. The existing code was a lot more complicated than it needed to be. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Reviewed-by: Pekka Seppänen <pexu@kapsi.fi>
* V4L/DVB (6245): GemTek Radio card - frequency calculationTrent Piepho2007-10-091-9/+12
| | | | | | | | | | | Frequency calculation to use better math. It's still the same IF offset and step size (which are not the same as the datasheet says) as the code was before. It's just more efficient and accurate. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Reviewed-by: Pekka Seppänen <pexu@kapsi.fi> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6244): [PATCH 1/2] GemTek Radio cardPekka Seppanen2007-10-091-189/+462
| | | | | | | | | | | | Code cleanup for GemTek Radio card driver. Removed unnecessary / invalid I/O commands and rewrote code for tuning on-board BU2614FS chip. Adds several new module params for power users. Includes automatic device probing. Signed-off-by: Pekka Seppanen <pexu@kapsi.fi> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Reviewed-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6243): [PATCH 2/2] GemTek Radio cardPekka Seppanen2007-10-091-4/+20
| | | | | | | | | | | Details now match with radio-gemtek.c, eg. no more different ports. Included a short note about cards that should be compatible with radio-gemtek module. Signed-off-by: Pekka Seppanen <pexu@kapsi.fi> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Reviewed-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6241): fix typo in DVB_PLL Kconfig help textMichael Krufky2007-10-091-1/+1
| | | | | | | s/driver/drives/1 Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6238): bw-qcam: use data_reverse instead of manually poking the ↵Brett Warden2007-10-091-2/+16
| | | | | | | | | | | | | | | | | | | | | | | control register Fixes use of parport_write_control() to match the newer interface that requires explicit parport_data_reverse() and parport_data_forward() calls. This eliminates the following error message and restores the original intended behavior: parport0 (bw-qcam): use data_reverse for this! Also increases threshold in qc_detect() from 300 to 400, as my camera often results in a count of approx 330. Added a kernel error message to indicate detection failure. Thanks Ray and Randy for your comments, and for pointing out that I needed to reset the port to forward mode! Signed-off-by: Brett T. Warden <brett.warden@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6237): Oops in pwc v4l driverOliver Neukum2007-10-091-24/+72
| | | | | | | | | The pwc driver is defficient in locking, which can trigger an oops when disconnecting. Signed-off-by: Oliver Neukum <oneukum@suse.de> CC: Luc Saillard <luc@saillard.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6235): cafe_ccic: default to allocating DMA buffers at probe timeAndres Salomon2007-10-091-9/+9
| | | | | | | | | | | | | | | | | | | | | By default, we allocate DMA buffers when actually reading from the video capture device. On a system with 128MB or 256MB of ram, it's very easy for that memory to quickly become fragmented. We've had users report having 30+MB of memory free, but the cafe_ccic driver is still unable to allocate DMA buffers. Our workaround has been to make use of the 'alloc_bufs_at_load' parameter to allocate DMA buffers during device probing. This patch makes DMA buffer allocation happen during device probe by default, and changes the parameter to 'alloc_bufs_at_read'. The camera hardware is there, if the cafe_ccic driver is enabled/loaded it should do its best to ensure that the camera is actually usable; delaying DMA buffer allocation saves an insignicant amount of memory, and causes the driver to be much less useful. Signed-off-by: Andres Salomon <dilinger@debian.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6232): dvb-pll: report whether input rf will be autoselected or set ↵Michael Krufky2007-10-091-1/+14
| | | | | | | via insmod option Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6231): dvb-pll: always show pll name if forced via insmod optionMichael Krufky2007-10-091-1/+1
| | | | | | | | The name of the pll will be shown if forced via insmod option, or if debug is enabled. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>