summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB: v4l: move vbi-specific video ops to a new vbi ops structHans Verkuil2010-05-191-26/+31
| | | | | | | | | Only a relatively small number of video receivers and transmitters actually support VBI. So start moving the vbi specific ops to an ops struct of their own. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: videobuf-dma-sg: remove external function videobuf_dma_sync()Mauro Carvalho Chehab2010-05-191-1/+0
| | | | | | | | While analyzing one of the videobuf patches, I noticed that videobuf_dma_sync is only used internally inside videobuf-dma-sg. So, let's remove this function, merging the code at __videobuf_dma_sync() Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Add a new ERROR flag for DQBUF after recoverable streaming errorsPawel Osciak2010-05-191-0/+2
| | | | | | | | | | | | | | | | | | This flag is intended to indicate streaming errors, which might have resulted in corrupted video data in the buffer, but the buffer can still be reused and streaming may continue. Setting this flag and returning 0 is different from returning EIO. The latter should now indicate more serious (unrecoverable) errors. This patch also solves a problem with the ioctl handling code in vl42-ioctl.c, which does not copy buffer identification data back to the userspace when EIO is returned, so there is no way for applications to discover on which buffer the operation failed in such cases. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: remove IR_TYPE_PDDavid Härdeman2010-05-192-6/+5
| | | | | | | | | | | Pulse-distance is not a protocol, it is a line coding (used by some protocols, like NEC). Looking at the uses of IR_TYPE_PD, the real protocol seems to be NEC in all cases (drivers/media/video/cx88/cx88-input.c is the only user). So, remove IR_TYPE_PD while it is still easy to do so. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l: add VSYNC and EOS events for use with ivtvHans Verkuil2010-05-191-3/+12
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L: Events: Support event handling in do_ioctlSakari Ailus2010-05-191-0/+7
| | | | | | | Add support for event handling to do_ioctl. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L: Events: Add backendSakari Ailus2010-05-192-0/+69
| | | | | | | | | | Add event handling backend to V4L2. The backend handles event subscription and delivery to file handles. Event subscriptions are based on file handle. Events may be delivered to all subscribed file handles on a device independent of where they originate from. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L: Events: Add new ioctls for eventsSakari Ailus2010-05-191-0/+26
| | | | | | | | | | This patch adds a set of new ioctls to the V4L2 API. The ioctls conform to V4L2 Events RFC version 2.3: <URL:http://www.spinics.net/lists/linux-media/msg12033.html> Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L: File handlesSakari Ailus2010-05-192-0/+68
| | | | | | | | | | | This patch adds a list of v4l2_fh structures to every video_device. It allows using file handle related information in V4L2. The event interface is one example of such use. The use of v4l2_fh is not mandatory for drivers. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: add memory-to-memory device helper framework for videobufPawel Osciak2010-05-191-0/+201
| | | | | | | | | | | | | | | | | | | | | A mem-to-mem device is a device that uses memory buffers passed by userspace applications for both their source and destination data. This is different from existing drivers, which utilize memory buffers for either input or output, but not both. In terms of V4L2 such a device would be both of OUTPUT and CAPTURE type. Examples of such devices would be: image 'resizers', 'rotators', 'colorspace converters', etc. This patch adds a separate Kconfig sub-menu for mem-to-mem devices as well. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: core: add support for more color effectsXiaolin Zhang2010-05-191-0/+7
| | | | | | | | Add support for more color effects (negative, sketch, emboss, etc) by extending the v4l2_colorfx enum items. Signed-off-by: Xiaolin Zhang <xiaolin.zhang@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L: v4l2-subdev driver for AK8813 and AK8814 TV-encoders from AKMGuennadi Liakhovetski2010-05-192-0/+29
| | | | | | | | | AK8814 only differs from AK8813 by included Macrovision Copy Protection function. This patch adds a driver for AK8813 and AK8814 I2C PAL/NTSC TV encoders. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L: SuperH Video Output Unit (VOU) driverGuennadi Liakhovetski2010-05-191-0/+34
| | | | | | | | | | A number of SuperH Mobile SoCs, including sh7724, include a Video Output Unit. This patch adds a video (V4L2) output driver for it. The driver uses v4l2-subdev and mediabus APIs to interface to TV encoders. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: add videobuf_buffer *buf as argument to mmap_mapperHans Verkuil2010-05-191-1/+2
| | | | | | | | | | | | mmap_mapper should operate on a buffer, not on a complete queue. So let the videobuf-core find the correct buffer instead of duplicating that code in each mmap_mapper implementation. The dma-sg implementation has backwards compatibility code for handling the V4L1_COMPAT layer. This code is now under the v4L1_COMPAT config option. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: move video_copy_to_user and copy_stream to coreHans Verkuil2010-05-191-10/+0
| | | | | | | | | | The video_copy_to_user and copy_stream ops are almost identical for all videobuf memtype variants. All that is needed is to use the new vaddr op and these functions can be moved into the core, ensuring we have just one single implementation instead of three. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: rename videobuf_queue_to_vmalloc to ↵Hans Verkuil2010-05-191-2/+2
| | | | | | | | | | videobuf_queue_to_vaddr Ths function returns the virtual kernel address of the buffer and has nothing to do with allocation. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: rename .vmalloc to .vaddrHans Verkuil2010-05-191-1/+1
| | | | | | | | | Rename the .vmalloc op in struct videobuf_qtype_ops to .vaddr. This op returns the virtual kernel address of a buffer. vaddr is a lot less confusing than vmalloc since this callback does do any allocations. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: use struct videobuf_buffer * instead of void * for ↵Hans Verkuil2010-05-191-2/+2
| | | | | | | | | | videobuf_alloc videobuf_alloc() returned a void *. Change to struct videobuf_buffer * to get better type checking. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: remove unused is_mmapped fieldHans Verkuil2010-05-191-1/+0
| | | | | | | Thanks to Pawel Osciak for noticing this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: remove mmap_free callbackHans Verkuil2010-05-191-1/+0
| | | | | | | | | | | Remove the mmap_free callback from struct videobuf_qtype_ops. All implementations of this callback do the same trivial check: return -EBUSY if any buffer is mmapped. That can also be tested in the videobuf core. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l videobuf: remove unused mmap callbackHans Verkuil2010-05-191-4/+0
| | | | | | | | The mmap callback in struct videobuf_qtype_ops is never used. Remove. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Revert "V4L/DVB: Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable ↵Mauro Carvalho Chehab2010-05-191-1/+0
| | | | | | | | | | | DVB devices" Patch reverted per Andreas Oberritter <obi@linuxtv.org> request. It is basically not ready yet for upstream merge. This reverts commit 77b2ad374a82e3d740cb1780ff4caedc3e051b37. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable DVB devicesKlaus Schmidinger2010-05-191-0/+1
| | | | | | | | | | | | | | The enum fe_caps provides flags that allow an application to detect whether a device is capable of handling various modulation types etc. A flag for detecting PSK_8, however, is missing. This patch adds the flag FE_CAN_PSK_8 to frontend.h and implements it for the gp8psk-fe.c and cx24116.c driver (apparently the only ones with PSK_8). Only the gp8psk-fe.c has been explicitly tested, though. Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> Tested-by: Derek Kelly <user.vdr@gmail.com> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Add Sony support to ir-coreDavid Härdeman2010-05-191-0/+1
| | | | | | | This patch adds a Sony12/15/20 decoder to ir-core. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Add JVC support to ir-coreDavid Härdeman2010-05-191-0/+1
| | | | | | | This patch adds a JVC decoder to ir-core. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: change duration to be coded as a u32 integerDavid Härdeman2010-05-191-2/+14
| | | | | | | | | This patch implements the agreed upon 1:31 integer encoded pulse/duration struct for ir-core raw decoders. All decoders have been tested after the change. Comments are welcome. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: add imon pad and mce keymapsJarod Wilson2010-05-191-0/+2
| | | | | | | | | | This adds the keymaps for the hardware decode scancodes imon devices create for their native imon pad (and mini) remotes, and the hardware scancodes generated by the imon devices when used with an rc6 windows media center ed. remote. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: make ir_g_keycode_from_table a public functionJarod Wilson2010-05-191-0/+1
| | | | | | | | | | | The imon driver I've previously submitted and have been porting to use ir-core needs to use ir_g_keycode_from_table, as ir_keydown is not sufficient, due to these things having really oddball hardware decoders in them. This just moves the function declaration from ir-core-priv.h over to ir-core.h. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Add RC6 support to ir-coreDavid Härdeman2010-05-191-0/+1
| | | | | | | This patch adds an RC6 decoder (modes 0 and 6A) to ir-core. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: videodev2.h: move definition of enum v4l2_ctrl_type to the other ↵Hans Verkuil2010-05-191-10/+10
| | | | | | | | | | | | | | control types For some reason the definition of enum v4l2_ctrl_type is far from the place where it is actually needed. This makes it hard to work with this header. Move it to just before struct v4l2_queryctrl, which is the one that actually uses it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: move subsystem internal calls to ir-core-priv.hMauro Carvalho Chehab2010-05-191-77/+10
| | | | | | | | | | | | | | | | | | | | ir-core.h has the kABI to be used by the bridge drivers, when needing to register IR protocols and pass IR events. However, the same file also contains IR subsystem internal calls, meant to be used inside ir-core and between ir-core and the raw decoders. Better to move those functions to an internal header, for some reasons: 1) Header will be a little more cleaner; 2) It avoids the need of recompile everything (bridge/hardware drivers, etc), just because a new decoder were added, or some other internal change were needed; 3) Better organize the ir-core API, splitting the functions that are internal to IR core and the ancillary drivers (decoders, lirc_dev) from the features that should be exported to IR subsystem clients. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Teach drivers/media/IR/ir-raw-event.c to use durationsDavid Härdeman2010-05-191-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/media/IR/ir-raw-event.c is currently written with the assumption that all "raw" hardware will generate events only on state change (i.e. when a pulse or space starts). However, some hardware (like mceusb, probably the most popular IR receiver out there) only generates duration data (and that data is buffered so using any kind of timing on the data is futile). Furthermore, using signed int's to represent pulse/space durations is a well-known approach when writing ir decoders. With this patch: - s64 int's are used to represent pulse/space durations in ns - a workqueue is used to decode the ir protocols outside of interrupt context - #defines are added to make decoders clearer - decoder reset is implemented by passing a zero duration to the kfifo queue and decoders are updated accordingly Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Distinguish sysfs attributes for in-hardware and raw decodersMauro Carvalho Chehab2010-05-191-6/+14
| | | | | | | | | | | | | | Some devices have in-hardware Remote Controller decoder, while others need a software decoder to get the IR code. As each software decoder can be enabled/disabled individually, allowing multiple protocol decoding capability. On the other hand, hardware decoders have a limited protocol support, often being able of decoding just one protocol each time. So, each type needs a different set of capabilities to control the supported protocol(s). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Add support for badly-implemented hardware decodersMauro Carvalho Chehab2010-05-192-5/+22
| | | | | | | | | | | | | A few hardware Remote Controller decoders, even using a standard protocol, aren't able to provide the entire scancode. Due to that, the capability of using other IR's are limited on those hardware. Adds a way to indicate to ir-core what are the bits that the hardware provides, from a scancode, allowing the addition of a complete IR table to the kernel and allowing a limited support for changing the Remote Controller on those devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: move rc map code to rc-map.hMauro Carvalho Chehab2010-05-192-35/+36
| | | | | | | | | | The keymaps don't need to be recompiled every time a change at ir-core.h happens, since it only depends on rc-map defines. By moving those definitions to the proper header, the code became cleaner, and avoids needing to recompile all the RC maps every time a non-related change is introduced. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L-DVB: ir-core: remove the ancillary bufferMauro Carvalho Chehab2010-05-191-2/+1
| | | | | | | | Now that the decoders are state machine, there's no need to create an ancillary buffer while decoding the protocol. Just call the decoders code directly, event by event. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L-DVB: ir-rc5-decoder: Add a decoder for RC-5 IR protocolMauro Carvalho Chehab2010-05-191-0/+7
| | | | | | | | | This decoder is also based on a state machine, just like the NEC protocol decoder. It is pedantic in the sense that accepts only 14 bits. As there are some variants that outputs less bits, it needs to be improved to also handle those. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: improve keyup/keydown logicDavid Härdeman2010-05-191-5/+10
| | | | | | | | | | | | | | | | | Rewrites the keyup/keydown logic in drivers/media/IR/ir-keytable.c. All knowledge of keystates etc is now internal to ir-keytable.c and not scattered around ir-raw-event.c and ir-nec-decoder.c (where it doesn't belong). In addition, I've changed the API slightly so that ir_input_dev is passed as the first argument rather than input_dev. If we're ever going to support multiple keytables we need to move towards making ir_input_dev the main interface from a driver POV and obscure away the input_dev as an implementational detail in ir-core. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: drivers/media/IR - improve keytable codeDavid Härdeman2010-05-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attached patch rewrites much of the keytable code in drivers/media/IR/ir-keytable.c. The scancodes are now inserted into the array in sorted order which allows for a binary search on lookup. The code has also been shrunk by about 150 lines. In addition it fixes the following bugs: Any use of ir_seek_table() was racy. ir_dev->driver_name is leaked between ir_input_register() and ir_input_unregister(). ir_setkeycode() unconditionally does clear_bit() on dev->keybit when removing a mapping, but there might be another mapping with a different scancode and the same keycode. This version has been updated to incorporate patch feedback from Mauro Carvalho Chehab. [mchehab@redhat.com: Fix a conflict with RC keytable breakup patches and input changes] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-common: remove keymap tables from the moduleMauro Carvalho Chehab2010-05-1966-4111/+0
| | | | | | | Now that the remote keymaps were broken into separate modules, get rid of the keycode tables that were hardcoded into ir-common. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Make use of the new IR keymap modulesMauro Carvalho Chehab2010-05-193-4/+102
| | | | | | | | Instead of using the ugly keymap sequences, use the new rc-*.ko keymap files. For now, it is still needed to have one keymap loaded, for the RC code to work. Later patches will remove this depenency. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir: prepare IR code for a parameter change at register functionMauro Carvalho Chehab2010-05-191-6/+20
| | | | | | | A latter patch will reuse the ir_input_register with a different meaning. Before it, change all occurrences to a temporary name. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Add support for RC map code registerMauro Carvalho Chehab2010-05-191-0/+11
| | | | | | | | Instead of having all RC tables hardcoded on one file with all tables there, add infrastructure for registering and dynamically load the table(s) when needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-common: move IR tables from ir-keymaps.c to a separate fileMauro Carvalho Chehab2010-05-1966-85/+4111
| | | | | | | Instead of having one big file with lots of keytables, create one include file for each IR keymap. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-common: Use macros to define the keytablesMauro Carvalho Chehab2010-05-191-1/+13
| | | | | | | | The usage of macros ensures that the proper namespace is being used by all tables. It also makes easier to associate a keytable with the name used inside the drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-common: re-order keytables by name and remove duplicatesMauro Carvalho Chehab2010-05-191-48/+48
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-common: Use a function to declare an IR tableMauro Carvalho Chehab2010-05-191-65/+71
| | | | | | | | This is the first patch of a series of changes that will break the IR tables into a series of small modules that can be dynamically loaded, or just loaded from userspace. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Add CHIP ID of the uPD61151Dmitri Belimov2010-05-191-0/+5
| | | | | | | Add CHIP ID of the NEC MPEG2 encoders uPD61151 and uPD61152. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Add callbacks for input/evdev open/close on IR coreMauro Carvalho Chehab2010-05-182-0/+3
| | | | | | | | | | Especially when IR needs to do polling, it generates lots of wakeups per second. This makes no sense, if the input event device is closed. Adds a callback handler to the IR hardware driver, to allow registering an open/close ops. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: prepare to add more operations for ir decodersMauro Carvalho Chehab2010-05-181-5/+2
| | | | | | | | | | | | Some decoders and a lirc_dev interface may need some other operations to work. For example: IR device register/unregister and ir_keydown events may need to be tracked. As some operations can occur in interrupt time, and a lock is needed to prevent un-registering a decode while decoding a key, the lock needed to be convert into a spin lock. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud