I have 3 IVC-200 cards (with 4 video channels on each).
2 of the cards identify theirselves as 000[0-3]:a155 (ids already in
cardlist) and another one identifies itself as 080[0-3]:a155, which ids
were unknown so far.
Note - it's IVC-200, not IVC-200G.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch retrieve the correct mac address from the eeprom for TeVii
S470 card.
Signed-off-by: Pierre Gronlier <pierre.gronlier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Serialize DVB initialization, to avoid it to happen while analog
initialization is still happening.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
In cx88-mpeg.c, there is code that sets core->input to CX88_VMUX_DVB.
However, this may be incorrect, since core->input is actually an
index to core->board.input[], which has not enough elements to be
indexed by the value of CX88_VMUX_DVB. So, the modified code searches
core->board.input[] for an input with a type of CX88_VMUX_DVB, and if
it does not find one, the index is simply set to zero.
The change may not have much effect, though, since it appears the only
case when core->input is actually used is when the current input is
being queried.
Signed-off-by: Istvan Varga <istvanv@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert drivers/media/video/cx231xx/cx231xx-input.c to not
rely on ir-functions.c.
(I do not have the hardware so I can only compile test this)
Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
spin_is_locked() always returns zero when spinlock debugging is
disabled on a single CPU machine. Replace WARN_ON() with
assert_spin_locked().
Thanks to Laurent Pinchart for spotting this!
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Brightness is done by the gamma tables and not by single bridge registers.
It will be back as soon as an algorithm will be found.
This change also fixes the autogain problem found by Jose Alberto Reguero
(webcam 046d:08dd).
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The error was introduced by "gspca - zc3xx: Rename the USB sequences."
in commit e945e2e44c798f84494260c02478d3c23965bb93.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The webcams 0c45:613e may contain the sensors ov7630 or soi768.
A sensor probe is done at init time when the sensor is declared ov7630.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
According to the V4L2 specification, applications set bytesused, field and
timestamp fields of struct v4l2_buffer when the buffer is intended for
output and memory type is MMAP. This adds proper copying of those values
to videobuf_buffer so drivers can use them.
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>
Features Supported -
1. Provides V4L2 user interface for the video pipelines of DSS
2. Basic streaming working on LCD, DVI and TV.
3. Works on latest DSS2 library from Tomi
4. Support for various pixel formats like YUV, UYVY, RGB32, RGB24,
RGB565
5. Supports Alpha blending.
6. Supports Color keying both source and destination.
7. Supports rotation.
8. Supports cropping.
9. Supports Background color setting.
10. Allocated buffers to only needed size
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Murailidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
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>
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>
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>
This is a virtual device driver for testing the memory-to-memory framework.
This virtual device uses in-memory buffers for both its source and destination.
It is capable of multi-instance, multi-buffer-per-transaction operation
(via the mem2mem framework).
[mchehab@redhat.com: use videobuf_queue_to_vaddr instead of the removed videobuf_queue_to_vmalloc]
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>
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>
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>
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>
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>
Current version of sh_mobile_ceu_camera.c interprets the V4L2 API specification
of the VIDIOC_S_CROP ioctl as "change input (for capture devices) area,
preserve scaling factors, therefore change output window," whereas a more
intuitive interpretation of the API is "change input area, preserve output
window." Switch sh_mobile_ceu_camera.c to use this interpretation.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
- Clean up the code
- Use the kernel's built-in vga8x16 font instead of our own.
- Drop exclusive open: now multiple users can open the device as per the V4L2 spec.
- Move the format description to the vivi device instead of keeping it in the file
handle. Again as per the spec.
- Streamline and simplify the drawing code. It is now easy to add text on top of
the colorbar pattern.
- Upgrade the max resolution to 1920x1200.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf-dma-sg.c: In function ‘__videobuf_mmap_mapper’:
drivers/media/video/videobuf-dma-sg.c:557: warning: ‘size’ may be used uninitialized in this function
The condition where size is floating should never happen, due to the paranoia check,
but a future change at the logic might break it. So, let's just set size to zero and
use it for the paranoia check.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
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>
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>
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>
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>
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>
kref replaced as suggested in code review
uses atomic variable to track when it is ok to delete device
removes setting of video device parent, which is now
handled in v4l2_device.c
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
usb_set_intfdata should not be used when using v4l2_device_register
and a non-NULL argument for the device.
Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There is a macro called dev_info that prints struct device specific
information. Having variables with the same name can be confusing and
prevents conversion of the macro to a function.
Rename the existing dev_info variables to something else in preparation
to converting the dev_info macro to a function.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Return -EINVAL if we don't find the right query control id.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Return -EINVAL if we don't find the control id.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Handle case of GSPCA=m, INPUT=m when building gspca core;
also handle case of INPUT=n by using stubs.
drivers/media/video/gspca/gspca.c:662: error: implicit declaration of function 'gspca_input_destroy_urb'
drivers/media/video/gspca/gspca.c:668: error: implicit declaration of function 'gspca_input_create_urb'
drivers/media/video/gspca/gspca.c:2284: error: implicit declaration of function 'gspca_input_connect'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The hybrid tuner FMD1216MEX_MK3 after cold start has disabled IF. This
tuner has internal I2C switch. This switch switch I2C bus between DVB-T
and IF part. Default state is DVB-T. When module saa7134 is load it
can't find IF tda9887 and disable analog TV mode.
Sets internal I2C switch of the tuner to IF by send special value to the
tuner as for receive analog TV from low band. It can be usefule for
other cards.
I didn't set configure a tuner by a tuner model because this tuner can
have different I2C address. May be we can do it later after discuss for
more robust support a tuners.
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Return an error if the controller is not found.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The original code doesn't handle the situation where the controller is
not found.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Return an error if the controller is not found.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
"dev" is never NULL here so there is no need to check.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
adding v4l2_device structure.
if one video_register_device call fails, allows use of other devices
or channels.
Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
big kernel lock removed from open function.
v4l2 code does not require locking the open function except
to check asynchronous firmware load state, which is protected
by a mutex
Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
call to video_device_alloc was not being checked in probe function.
code simplified and uses video_device inside device structure.
Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The "AUVI_INPUT(tmp)" macro uses "tmp" as an index of an array with
AU0828_MAX_INPUT elements.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The following patch fixes code that checks for CX88_VMUX_TELEVISION,
but not CX88_VMUX_CABLE. This prevented for example the audio standard
from being set when using the cable input.
Signed-off-by: Istvan Varga <istvanv@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
makes USB_PWC_INPUT_EVDEV to depend also on USB_PWC
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Due to obvious copy and paste coding a number of video capture drivers
which implement a limit on the buffer memory decremented the user
supplied buffer count in a while loop until it reaches an acceptable
value.
This is a silly thing to do when the maximum value can be directly
computed.
Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This reverts commit bc52d6eb44.
On newer kernels, a saa7134 board stopped to display TV video output
properly. After a bisect, I found it as the commit causing the issue.
Turns out that v4l_bound_align_image isn't doing the same bounding
calculation as manually done previously in saa7134_try_fmt_vid_cap.
What isn't equal is the calculation done in clamp align, while
previously it did "f->fmt.pix.width &= ~0x03", clamp_align function
does "Round to nearest aligned value" as stated in the comment, which
yields a different result. If I comment the round calculation in
clamp_align like this: "x = (x /*+ (1 << (align - 1))*/) & mask",
I get it fixed too, because this way the calculation is the same then.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Now that video_ioctl2 no longer clobbers the argument for _IO() ioctls we
can move these into vidioc_default where they really belong.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Try to make a more sensible sequence of events in __video_do_ioctl: first
check for a valid ops pointer, then get the compat part done. The VIDIOCGMBUF
command is now part of the big switch.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Note that I have not been able to find anyone with this hardware. I tried
contacting the author without success, searched on eBay and similar places
without luck either.
So this conversion is untested. That said, it was pretty straightforward
so it is time to have this driver join the V4L2 world at last.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The usbvision driver created vbi device nodes but the actual implementation
was just stubs and only returned errors to userspace.
In addition it used video_usercopy() and we want to remove that eventually.
So remove all the vbi code except for the vbi flag in the card definition
should someone ever be mad enough to work on a proper implementation for this
driver.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
You want to be able to reach the debug code at the end of this function,
so don't use return, use break.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
If the ioctl was defined without direction (e.g. _IO('o', 25)), then
the arg as passed to vidioc_default was NULL instead of the original
argument.
Several ioctls in e.g. include/linux/dvb/video.h and audio.h use this type
of ioctl to pass simple numerical values to the driver.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
If the kmalloc() failed for "ccdc_cfg = kmalloc(...);" then we would exit
with the lock held. I moved the mutex_lock() below the allocation
because it isn't protecting anything in that block and allocations are
allocations are sometimes slow.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
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>
The patch that adds the rc-map changes didn't take into account that an
a table with IR_TYPE_UNKNOWN would make change_protocol to return -EINVAL.
As this function is fundamental to initialize some data, including a
callback to the getkey function, this caused the driver to stop working,
hanging the machine most of the times.
The fix were simply to add a handler for the IR type, but, to avoid further
issues, explicitly call change_protocol and handle the error before
initializing the IR. Also, let input_dev to start/stop IR handling,
after the opening of the input device.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
Thanks to Andy Walls <awalls@md.metrocast.net> for pointing me his
code, that gave me some ideas to better implement it.
After some work with saa7134 bits, I found a way to catch both IRQ
edge pulses. By enabling it, the NEC decoder can now take both
pulse and spaces into account, making it more precise.
Instead of the old strategy of handling the events all at once,
this code implements a state machine. Due to that, it handles
individual pulse or space events, validating them against the
protocol, producing a much more reliable decoding.
With the new implementation, the protocol trailer bits are properly
handled, making possible for the repeat key to work.
Also, the code is now capable of handling both NEC and NEC extended
IR devices. With NEC, it produces a 16 bits code, while with NEC
extended, a 24 bits code is returned.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The code that enables IRQ for the Remote Controller on saa7134 is a little
messy: it is outside saa7134-input, it checks if RC is GPIO based, and
it mixes both serial raw decode with parallel reads from a hardware-based
IR decoder.
Also, currently, it doesn't allow to trigger both transition edges at GPIO16
and GPIO18 lines. A rework on the code is needed to provide a better way
to specify what saa7134-input needs, maybe even moving part of the code from
saa7134-core and saa7134-cards into saa7134-input.
Yet, as a large rework is happening at RC core, it is better to wait until
the core changes stablize, in order to rework saa7134 RC internals.While
this don't happen, let's just change the logic a little bit to allow
enabling IRQ to be generated on both edge transitions, in order to better
support pulse/space raw decoders.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There's an error at the IRQ2 bit map registers. Also, it doesn't
show what bits are needed for positive and for negative edge.
In the case of IR raw decoding, for some protocols, it is important
to detect both positive and negative edges. So, a latter patch
will need to use the other values.
Also, the code that detects problems on IRQ handling is incomplete,
as it disables only one of the IRQ bits for GPIO16 and GPIO18.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
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>
Replaces most of the occurences of IR keytables on V4L drivers by a macro
that evaluates to provide the name of the exported symbol.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It seems impossible for ov to be NULL at this point.
The semantic match that finds the problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
expression E, E1;
identifier f;
statement S1,S3;
iterator iter;
@@
if ((E == NULL && ...) || ...)
{
... when != false ((E == NULL && ...) || ...)
when != true ((E != NULL && ...) || ...)
when != iter(E,...) S1
when != E = E1
(
sizeof(E->f)
|
* E->f
)
... when any
return ...;
}
else S3
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
cap->driver is a 16 char buffer and dev->name is a 32 char buffer.
I don't see an actual problem, but we may as well make the static
checkers happy.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
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>