summaryrefslogtreecommitdiffstats
path: root/drivers/media/IR
AgeCommit message (Collapse)AuthorFilesLines
2010-08-02V4L/DVB: IR/mceusb: add tx callback functions and wire upJarod Wilson1-10/+138
mchehab: merged with IR/mceusb: userspace buffer copy moved out of driver Userspace buffer copy moved out of driver and into lirc bridge driver [mchehab@redhat.com: merged the patch to avoid compilation errors with allyesconfig ] Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/mceusb: kill pinnacle-device-specific nonsenseJarod Wilson1-49/+14
I have pinnacle hardware now. None of this pinnacle-specific crap is at all necessary (in fact, some of it needed to be removed to actually make it work). The only thing unique about this device is that it often transfers inbound data w/a header of 0x90, meaning 16 bytes of IR data following it, so I had to make adjustments for that, and now its working perfectly fine. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/mceusb: misc cleanups and init fixesJarod Wilson1-69/+69
The first-gen mceusb device init code, while mostly functional, had a few issues in it. This patch does the following: 1) removes use of magic numbers 2) eliminates mapping of memory from stack 3) makes debug spew translator functional Additionally, this clean-up revealed that we cannot read the proper default tx blaster bitmask from the device, we do actually have to initialize it ourselves, which requires use of a somewhat gross list-based mask inversion check. This patch also removes the entirely unnecessary use of struct ir_input_state. Also supersedes two earlier patches that also touched on first-gen cleanup, but were partially botched. This one actually compiles, works, etc., I swear. ;) Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/mceusb: use the proper ir-core device unregister functionJarod Wilson1-1/+1
Was using input_unregister_device directly, instead of using ir_input_unregister, which tears down a bunch of other things in addition to eventually calling input_unregister_device. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/imon: use the proper ir-core device unregister functionJarod Wilson1-2/+2
Was using input_unregister_device directly, instead of using ir_input_unregister, which tears down a bunch of other things in addition to eventually calling input_unregister_device. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: media/IR: nec-decoder needs to select BITREVRandy Dunlap1-0/+1
Fix ir-nec-decoder build: it uses bitrev library code, so select BITREVERSE in its Kconfig. ir-nec-decoder.c:(.text+0x1a2517): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2526): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2530): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2539): undefined reference to `byte_rev_table' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: move decoding state to ir_raw_event_ctrlDavid Härdeman7-464/+118
This patch moves the state from each raw decoder into the ir_raw_event_ctrl struct. This allows the removal of code like this: spin_lock(&decoder_lock); list_for_each_entry(data, &decoder_list, list) { if (data->ir_dev == ir_dev) break; } spin_unlock(&decoder_lock); return data; which is currently run for each decoder on each event in order to get the client-specific decoding state data. In addition, ir decoding modules and ir driver module load order is now independent. Centralizing the data also allows for a nice code reduction of about 30% per raw decoder as client lists and client registration callbacks are no longer necessary (but still kept around for the benefit of the lirc decoder). Out-of-tree modules can still use a similar trick to what the raw decoders did before this patch until they are merged. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: allow specifying multiple protocols at one open/writeMauro Carvalho Chehab1-46/+46
With this change, it is now possible to do something like: su -c 'echo "none +rc-5 +nec" > /sys/class/rc/rc1/protocols' This prevents the need of multiple opens, one for each protocol change, and makes userspace application easier. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: Add support for disabling all protocolsMauro Carvalho Chehab1-9/+18
Writing "none" to /dev/class/rc/rc*/protocols will disable all protocols. This allows an easier setup, from userspace, as userspace applications don't need to disable protocol per protocol, before enabling a different set of protocols. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: Rename sysfs protocols nomenclature to rc-5 and rc-6Mauro Carvalho Chehab1-2/+2
While rc-5 and rc-6 protocols are generally abreviated as "rc5" and "rc6", previous sysfs nodes uses rc-5 and rc-6 for the Philips protocols. This is consistent with the protocol nomenclature given by the original Philips spec: "Remote control system RC-5" (doc. Nr. 9398 706 23011). Also, rc5 is the name of a widely known cryptography protocol. So, the better is to keep referring to those protocols as "rc-5" and "rc-6". Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: Remove magic numbers at the sysfs logicMauro Carvalho Chehab1-51/+32
Instead of using "magic" sizes for protocol names, replace them by an array, and use strlen(). No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: centralize sysfs raw decoder enabling/disablingDavid Härdeman8-462/+232
With the current logic, each raw decoder needs to add a copy of the exact same sysfs code. This is both unnecessary and also means that (re)loading an IR driver after raw decoder modules have been loaded won't work as expected. This patch moves that logic into ir-raw-event and adds a single sysfs file per device. Reading that file returns something like: "rc5 [rc6] nec jvc [sony]" (with enabled protocols in [] brackets) Writing either "+protocol" or "-protocol" to that file will enable or disable the according protocol decoder. An additional benefit is that the disabling of a decoder will be remembered across module removal/insertion so a previously disabled decoder won't suddenly be activated again. The default setting is to enable all decoders. This is also necessary for the next patch which moves even more decoder state into the central raw decoding structs. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR: add mceusb IR receiver driverJarod Wilson3-0/+1098
This is a new driver for the Windows Media Center Edition/eHome Infrared Remote transceiver devices. Its a port of the current lirc_mceusb driver to ir-core, and currently lacks transmit support, but will grow it back soon enough... This driver also differs from lirc_mceusb in that it borrows heavily from a simplified IR buffer decode routine found in Jon Smirl's earlier ir-mceusb port. This driver has been tested on the original first-generation MCE IR device with the MS vendor ID, as well as a current-generation device with a Topseed vendor ID. Every receiver supported by lirc_mceusb should work equally well. Testing was done primarily with RC6 MCE remotes, but also briefly with a Hauppauge RC5 remote, and all works as expected. v2: fix call to ir_raw_event_handle so repeats work as they should. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR: add RC6 keymap for Windows Media Center Ed. remotesJarod Wilson2-0/+106
This is the RC6 keymap for the Windows Media Center Edition remotes that come bundled with MCE/eHome Infrared Remote transceivers. Tested with 3 different variants of the remote, but its possible there are still some additional keys missing, but its simple enough to add them in later... This patch also adds an IR_TYPE_ALL convenience macro to make life easier for receivers that support all IR protocols. v2: fix an erroneous comment that referred to imon devices Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR: only initially registers protocol that matches loaded keymapJarod Wilson5-5/+15
Rather than registering all IR protocol decoders as enabled when bringing up a new device, only enable the IR protocol decoder that matches the keymap being loaded. Additional decoders can be enabled on the fly by those that need to, either by twiddling sysfs bits or by using the ir-keytable util from v4l-utils. Functional testing done with the mceusb driver, and it behaves as expected, only the rc6 decoder is enabled, keys are all handled properly, etc. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR: let all protocol decoders have a go at raw dataJarod Wilson1-4/+3
On Fri, May 28, 2010 at 3:59 PM, Jarod Wilson <jarod@redhat.com> wrote: > The mceusb driver I'm about to submit handles just about any raw IR you > can throw at it. The ir-core loads up all protocol decoders, starting > with NEC, then RC5, then RC6. RUN_DECODER() was trying them in the same > order, and exiting if any of the decoders didn't like the data. The > default mceusb remote talks RC6(6A). Well, the RC6 decoder never gets a > chance to run unless you move the RC6 decoder to the front of the list. > > What I believe to be correct is to have RUN_DECODER keep trying all of > the decoders, even when one triggers an error. I don't think the errors > matter so much as it matters that at least one was successful -- i.e., > that _sumrc is > 0. The following works for me w/my mceusb driver and > the default decoder ordering -- NEC and RC5 still fail, but RC6 still > gets a crack at it, and successfully does its job. > > Signed-off-by: Jarod Wilson <jarod@redhat.com> > > --- >  drivers/media/IR/ir-raw-event.c |    7 ++++--- > > diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c > index ea68a3f..44162db 100644 > --- a/drivers/media/IR/ir-raw-event.c > +++ b/drivers/media/IR/ir-raw-event.c > @@ -36,14 +36,15 @@ static DEFINE_SPINLOCK(ir_raw_handler_lock); >  */ >  #define RUN_DECODER(ops, ...) ({                                           \ >        struct ir_raw_handler           *_ir_raw_handler;                   \ > -       int _sumrc = 0, _rc;                                                \ > +       int _sumrc = 0, _rc, _fail;                                         \ >        spin_lock(&ir_raw_handler_lock);                                    \ >        list_for_each_entry(_ir_raw_handler, &ir_raw_handler_list, list) {  \ >                if (_ir_raw_handler->ops) {                                 \ >                        _rc = _ir_raw_handler->ops(__VA_ARGS__);            \ >                        if (_rc < 0)                                        \ > -                               break;                                      \ > -                       _sumrc += _rc;                                      \ > +                               _fail++;                                    \ > +                       else                                                \ > +                               _sumrc += _rc;                              \ Self-NAK. The only place we actually *care* about the retval from a RUN_DECODER() call is in __ir_input_register(), and currently, its looking for retval < 0, which is currently never possible. When we're running the decoders, either they fail and return -EINVAL or they succeed and return 0, and in the register case, we get either a negative error (ex: -ENOMEM from rc6) or 0, so with the above, _sumrc will *always* be 0 in the two cases I'm looking at. The third place where RUN_DECODER gets called (decoder unregister) doesn't care about the retval either. New patch below, including updated comments about the macro. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: Bug fix: make IR work again for dm1105Igor M. Liplianin2-10/+14
It makes IR to work again for dm1105 and, possibly, others. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: media/IR: nec-decoder needs to select BITREVRandy Dunlap1-0/+1
Fix ir-nec-decoder build: it uses bitrev library code, so select BITREVERSE in its Kconfig. ir-nec-decoder.c:(.text+0x1a2517): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2526): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2530): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2539): undefined reference to `byte_rev_table' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: IR/imon: add auto-config for 0xffdc rf deviceJarod Wilson1-10/+17
Add auto-config support for iMON 2.4G LT RF device, based on debug output from Giulio Amodeo in Red Hat bugzilla #572288. Also flips the switch on only setting up the rf associate sysfs attr only if we think we're looking at an RF device, vs. previously, setting up the attr for all 0xffdc devices, so its possible (but a bit unlikely) there's another iMON RF device we'll have to fix up. Nb: should be applied after "IR/imon: clean up usage of bools", or there will be a slight contextual mismatch. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: IR/imon: clean up usage of boolsJarod Wilson1-24/+24
There was a mix of 0/1 and false/true. Pick one convention and stick with it (I picked false/true). Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: [-next] IR: fix ir-nec-decoder build, select BITREVERSERandy Dunlap1-0/+1
Fix ir-nec-decoder build: it uses bitrev library code, so select BITREVERSE in its Kconfig. ir-nec-decoder.c:(.text+0x1a2517): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2526): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2530): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2539): undefined reference to `byte_rev_table' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: saa7134: add RM-K6 remote control support for Avermedia M135AHerton Ronaldo Krzesinski3-91/+148
This change adds support for one more remote control type for Avermedia M135A (model RM-K6), shipped with Positivo machines. Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: saa7134: add support for Avermedia M733AHerton Ronaldo Krzesinski2-0/+96
This change adds support for Avermedia M733A. The original version for linux 2.6.31 was sent to me from Avermedia, original author is unknown. I ported it to current kernels, expanded and fixed key code handling for RM-K6 remote control, and added an additional pci id also supported. [mchehab@redhat.com: make checkpatch.pl happier] Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSETJarod Wilson1-6/+6
On Tue, May 04, 2010 at 06:06:41PM +0200, Dan Carpenter wrote: > On Tue, May 04, 2010 at 10:03:18AM -0400, Jarod Wilson wrote: > > @@ -1205,7 +1204,7 @@ static u32 imon_panel_key_lookup(u64 hw_code) > > if (imon_panel_key_table[i].hw_code == (code | 0xffee)) > > break; > > > > - keycode = imon_panel_key_table[i % IMON_KEY_RELEASE_OFFSET].keycode; > > + keycode = imon_panel_key_table[i].keycode; > > > > return keycode; > > } > > There is still potentially a problem here because if we don't hit the > break statement, then we're one past the end of the array. D'oh. Okay, here's v2, should fix that buglet too. This hack was used when the imon driver was using internal key lookup routines, but became dead weight when the driver was converted to use ir-core's key lookup routines. These bits simply didn't get removed, drop 'em now. Pointed out by Dan Carpenter. v2: fix possible attempt to access beyond end of key table array, also pointed out by Dan. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: media/IR: Add missing include file to rc-map.cPeter Huewe1-0/+1
This patch adds a missing include linux/delay.h to prevent build failures[1-5] Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: media/IR/imon: potential double unlock on errorDan Carpenter1-1/+0
If there is an error here we should unlock in the caller (which is imon_init_intf1()). We can remove this stray unlock. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: media/IR/imon: testing the wrong variableDan Carpenter1-1/+1
There is a typo here. We meant to test "ir" instead of "props". The "props" variable was tested earlier. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: media/IR/imon: precendence issue: ! vs ==Dan Carpenter1-1/+1
The original condition is always false because ! has higher precedence than == and neither 0 nor 1 is equal to IMON_DISPLAY_TYPE_VGA. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: IR/imon: add proper auto-repeat supportJarod Wilson1-5/+6
Simplified from version 1, in that hacks heisted from ati_remote2.c aren't actually necessary, the real fix for too many repeats was from setting too long a timer release value (200ms) on repeats in mce mode -- this patch drops the release timeout to 33ms, matching the input subsystem default input_dev->rep[REP_PERIOD]. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: IR/imon: minor change_protocol fixupsJarod Wilson1-11/+9
This is a follow-up to my prior patch implementing ir-core's change_protocol functionality in the imon driver, which eliminates a false warning when change_protocol is called without a specific protocol selected yet (i.e., still IR_TYPE_UNKNOWN). It also removes some extraneous blank lines getting spewn into dmesg. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: remove IR_TYPE_PDDavid Härdeman1-6/+0
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>
2010-05-19V4L/DVB: IR/imon: convert to ir-core protocol change handlingJarod Wilson3-89/+69
Drop the imon driver's internal protocol definitions in favor of using those provided by ir-core. Should make ir-keytable Just Work for switching protocol on the fly on the imon devices that support both the native imon remotes and mce remotes. The imon-no-pad-stabilize pseudo-protocol was dropped as a protocol, and converted to a separate modprobe option (which it probably should have been in the first place). On the TODO list is to convert this to an as yet unwritten protocol-specific options framework. While the mce remotes obviously map to IR_TYPE_RC6, I've yet to look at what the actual ir signals from the native imon remotes are, so for the moment, imon native ir is mapped to IR_TYPE_OTHER. Nailing it down more accurately is also on the TODO list. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: fix some confusing commentsDavid Härdeman2-2/+2
Fix some confusing comments in drivers/media/IR/* Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: fix table resize during keymap initMauro Carvalho Chehab1-4/+6
drivers/media/IR/ir-keytable.c would alloc a suitably sized keymap table only to have it resized as it is populated with the initial keymap. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: fix double spinlock init in drivers/media/IR/rc-map.cDavid Härdeman2-7/+0
Fix a double initialization of the same spinlock in drivers/media/IR/rc-map.c. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: irmon: Cleanup some warning noiseMauro Carvalho Chehab1-25/+27
Driver is not properly initializing u64 constants on 32 bit systems: drivers/media/IR/imon.c:301: warning: integer constant is too large for ‘long’ type drivers/media/IR/imon.c:302: warning: integer constant is too large for ‘long’ type drivers/media/IR/imon.c:304: warning: integer constant is too large for ‘long’ type drivers/media/IR/imon.c:305: warning: integer constant is too large for ‘long’ type drivers/media/IR/imon.c:308: warning: integer constant is too large for ‘long’ type drivers/media/IR/imon.c:309: warning: integer constant is too large for ‘long’ type drivers/media/IR/imon.c:310: warning: integer constant is too large for ‘long’ type Fix also a few troubles at error printk handling: drivers/media/IR/imon.c: In function ‘imon_init_intf0’: drivers/media/IR/imon.c:1909: warning: ‘ret’ may be used uninitialized in this function drivers/media/IR/imon.c: In function ‘imon_init_intf1’: drivers/media/IR/imon.c:1989: warning: ‘ret’ may be used uninitialized in this function Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: Add Sony support to ir-coreDavid Härdeman6-0/+334
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>
2010-05-19V4L/DVB: ir-core: Add JVC support to ir-coreDavid Härdeman6-0/+342
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>
2010-05-19V4L/DVB: ir-core-priv.h: Fix a few CodingStyle errorsMauro Carvalho Chehab1-4/+8
As reported by checkpatch.pl: ERROR: open brace '{' following function declarations go on the next line +static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin) { ERROR: open brace '{' following function declarations go on the next line +static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin) { ERROR: open brace '{' following function declarations go on the next line +static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event *y) { Cc: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: change duration to be coded as a u32 integerDavid Härdeman5-254/+271
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>
2010-05-19V4L/DVB: ir-core: add imon driverJarod Wilson3-0/+2432
This is a new driver for the SoundGraph iMON and Antec Veris IR/display devices commonly found in many home theater pc cases and as after-market case additions. [mchehab@redhat.com: add KERN_CONT on line 2098 to shutup checkpatc.pl] Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core: add imon pad and mce keymapsJarod Wilson3-0/+299
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>
2010-05-19V4L/DVB: ir-core: make ir_g_keycode_from_table a public functionJarod Wilson1-7/+0
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>
2010-05-19ir-core: Fix the delete logicMauro Carvalho Chehab1-1/+1
Instead of removing an entry, the logic were doing both a deletion and a key addition, as shown by the log: [11517.323314] ir_getkeycode: unknown key for scancode 0x0050 [11517.326529] ir_do_setkeycode: #80: Deleting scan 0x0050 [11517.326529] ir_do_setkeycode: #80: New scan 0x0050 with key 0x0000 [11517.340598] ir_getkeycode: unknown key for scancode 0x0051 [11517.343811] ir_do_setkeycode: #81: Deleting scan 0x0051 [11517.343811] ir_do_setkeycode: #81: New scan 0x0051 with key 0x0000 [11517.357889] ir_getkeycode: unknown key for scancode 0x0052 [11517.361104] ir_do_setkeycode: #82: Deleting scan 0x0052 [11517.361104] ir_do_setkeycode: #82: New scan 0x0052 with key 0x0000 [11517.375453] ir_getkeycode: unknown key for scancode 0x0053 [11517.378474] ir_do_setkeycode: #83: Deleting scan 0x0053 [11517.378474] ir_do_setkeycode: #83: New scan 0x0053 with key 0x0000 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19ir-core: Remove the quotation mark from the uevent namesMauro Carvalho Chehab1-2/+2
There's no need to use quotation marks at the uevent names for the driver and table. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir Kconfig: better describe the optionsMauro Carvalho Chehab1-2/+2
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: ir-core-priv: fix a typo for RC6 config optionMauro Carvalho Chehab1-1/+1
As Adreas pointed, RC6 should use CONFIG_IR_RC6_DECODER_MODULE, instead of the RC5 config option. Thanks-to: Andreas Oberitter <obi@linuxtv.org> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: Add RC6 support to ir-coreDavid Härdeman6-0/+432
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>
2010-05-19V4L/DVB: Add NECx support to ir-coreDavid Härdeman1-1/+2
This patch adds NECx support to drivers/media/IR/ir-nec-decoder.c Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: Add RC5x support to ir-coreDavid Härdeman1-19/+59
This patch adds RC5x support to drivers/media/IR/ir-rc5-decoder.c Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>