summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-input.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] patch for Asus My Cinema PS3-100 (1043:48cd)remi schwartz2012-05-201-0/+7
| | | | | Signed-off-by: Remi Schwartz <remi.schwartz@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Add support for KWorld PC150-U ATSC hybrid tuner cardKyle Strickland2012-03-081-0/+63
| | | | | | [mchehab@redhat.com: CodingStyle fixes] Signed-off-by: Kyle Strickland <kyle@kyle.strickland.name> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc-videomate-m1f.c Rename to match remote controler nameSamuel Rakitnican2012-01-101-1/+1
| | | | | | | | | | | | | | | | This remote was added with support for card Compro VideoMate M1F. This remote is shipped with various Compro cards, not this one only. Furthermore this remote can be bought separately under name Compro VideoMate K100. http://compro.com.tw/en/product/k100/k100.html So give it a proper name. [mchehab@redhat.com: Fix the Makefile] Signed-off-by: Samuel Rakitničan <samuel.rakitnican@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: fix IR handling for HVR-1110Mauro Carvalho Chehab2012-01-011-9/+12
| | | | | | | | | Return the complete RC-5 code, instead of just the 8 least significant bits. Reported-by: Dorozel Csaba <mrjuuzer@upcmail.hu> Tested-by: Dorozel Csaba <mrjuuzer@upcmail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: fix raw IR timeout valueJarod Wilson2011-07-011-1/+1
| | | | | | | | | The comment says "wait 15ms", but the code says jiffies_to_msecs(15) instead of msecs_to_jiffies(15). Fix that. Tested, works fine with both rc5 and rc6 decode, in-kernel and via lirc userspace, with an HVR-1150. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: enable IR support for Hauppauge HVR-1150/1120Devin Heitmueller2011-05-201-0/+8
| | | | | | | | | | | Enable the IR support for the Hauppauge HVR-1150 and HVR-1120. Thanks to Fernando Laudares Camargos for testing the patch. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Fernando Laudares Camargos <fernando.laudares.camargos@gmail.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] remove the old RC_MAP_HAUPPAUGE_NEW RC mapMauro Carvalho Chehab2011-03-221-1/+1
| | | | | | | | | | | | | | | | | The rc-hauppauge-new map is a messy thing, as it bundles 3 different remote controllers as if they were just one, discarding the address byte. Also, some key maps are wrong. With the conversion to the new rc-core, it is likely that most of the devices won't be working properly, as the i2c driver and the raw decoders are now providing 16 bits for the remote, instead of just 8. delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com>
* [media] saa7134-input: key up events not sent after suspend/resumeVadim Solomin2011-03-221-10/+39
| | | | | | | | | | | | | On my AverMedia AverTV Studio 507, key up events are no longer sent after a suspend-to-disk/resume cycle, resulting in "stuck" keys. Apparently, for key up events to be generated, a certain GPIO pin must be set. Currently it's set in saa7134_input_init1(), but that function is not called on device resume. I suggest that code be moved to __saa7134_ir_start(), which is called both on init and resume. Signed-off-by: Vadim Solomin <vadic052@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] add support for Encore FM3Mauro Carvalho Chehab2011-03-211-0/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: Add support for Compro VideoMate Vista M1FRamiro Morales2010-12-291-0/+5
| | | | | | Signed-off-by: Pavel Osnova <pvosnova@gmail.com> Signed-off-by: Ramiro Morales <ramiro@rmorales.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: merge saa7134_card_ir->timer and saa7134_card_ir->timer_endDavid Härdeman2010-12-291-6/+4
| | | | | | | | Both timers are used for a similar purpose. Merging them allows for some minor simplifications. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: some minor cleanupsDavid Härdeman2010-12-291-30/+19
| | | | | | | Mostly using appropriate data types and constants (e.g. int -> bool). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: use full keycode for BeholdTVDavid Härdeman2010-12-291-17/+2
| | | | | | | | Using the full keycode for BeholdTV hardware makes another module parameter unnecessary. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: remove unused module parameterDavid Härdeman2010-12-291-3/+0
| | | | | | | ir_rc5_remote_gap is a leftover from ir-common, remove it. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc: Rename remote controller type to rc_type instead of ir_typeMauro Carvalho Chehab2010-12-291-1/+1
| | | | | | | for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,IR_TYPE,RC_TYPE,g <$i >a && mv a $i; done for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_type,rc_type,g <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Rename all public generic RC functions from ir_ to rc_Mauro Carvalho Chehab2010-12-291-6/+6
| | | | | | | Those functions are not InfraRed specific. So, rename them to properly reflect it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc: Remove ir-common.hMauro Carvalho Chehab2010-12-291-15/+15
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc: remove ir-common moduleMauro Carvalho Chehab2010-12-291-220/+6
| | | | | | | | | | | | Something weird happened with commit 740069e6e043403199dbe2b42256722fb814f6ae. Instead of dong the right thing, it got somehow corrupted and reverted the rc changes. Thanks to David Härdeman for pointing me about the problem. This patch should be merged with 740069e6e04 before sending upstream. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc: Remove ir-common moduleMauro Carvalho Chehab2010-12-291-6/+220
| | | | | | | | | | | | | | Now, just one old bttv board uses the old RC5 raw decoding routines. Its conversion to rc-core requires the generation of IRQ data for both positive and negative transitions at the IRQ line. I'm not sure if bttv driver supports it or if the transitions will be reliable enough. So, due to the lack of hardware for testing, the better for now is to just move the legacy routines to bttv driver, and wait for someone with a Nebula Digi could help to port it to use also rc-core raw decoders. Acked-by: Hermann Pitton <hermann-pitton@arcor.de> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: Remove legacy IR decoding logic inside the moduleMauro Carvalho Chehab2010-12-291-217/+2
| | | | | | | | | The only IR left still using the old raw decoders on saa7134 is ENCORE FM 5.3. As it is now using the standard rc-core raw decoders, lots of old code can be removed from saa7134. Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: use rc-core raw decoders for Encore FM 5.3Mauro Carvalho Chehab2010-12-291-3/+4
| | | | | Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ir-core: make struct rc_dev the primary interfaceDavid Härdeman2010-12-291-42/+30
| | | | | | | | | | | | | | | | | | | | | | This patch merges the ir_input_dev and ir_dev_props structs into a single struct called rc_dev. The drivers and various functions in rc-core used by the drivers are also changed to use rc_dev as the primary interface when dealing with rc-core. This means that the input_dev is abstracted away from the drivers which is necessary if we ever want to support multiple input devs per rc device. The new API is similar to what the input subsystem uses, i.e: rc_device_alloc() rc_device_free() rc_device_register() rc_device_unregister() [mchehab@redhat.com: Fix compilation on mceusb and cx231xx, due to merge conflicts] 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>
* [media] ir-core: remove remaining users of the ir-functions keyhandlersDavid Härdeman2010-12-291-39/+10
| | | | | | | | | | This patch removes the remaining usages of the ir_input_nokey() and ir_input_keydown() functions provided by drivers/media/IR/ir-functions.c by using the corresponding functionality in ir-core instead. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media: Removed unnecessary KERN_<level>s from dprintk usesJoe Perches2010-12-291-1/+1
| | | | | | | Converted if (debug >= 2) printk(KERN_DEBUG... to if debug >= 2) dprintk(...) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: port Asus P7131 Hybrid to use the new rc-coreMauro Carvalho Chehab2010-10-211-2/+4
| | | | | | | | The rc map table were corrected thanks to Giorgio input and tests. Reported-by: Giorgio Vazzana <mywing81@gmail.com> Tested-by: Giorgio Vazzana <mywing81@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7134-input can't be a module right nowMauro Carvalho Chehab2010-10-211-4/+1
| | | | | | | | | There are some symbols at saa7134-input that are used on saa7134 and vice-versa. Due to that, module install fails. So, partially revert commit 9f495cf7d691c99bf7bdcec9f35fcfdad2cf9ae9. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7134: split RC code into a different moduleMauro Carvalho Chehab2010-10-211-1/+4
| | | | | | | This allows the removal of CONFIG_INPUT from saa7134, and helps to create a better Kconfig dependency hierarchy. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4l/DVB: saa7134: properly mark some functions as staticMauro Carvalho Chehab2010-10-211-2/+2
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7134: get rid of I2C_HW_SAA7134Mauro Carvalho Chehab2010-10-211-0/+5
| | | | | | | | The only reason for keeping I2C_HW_SAA7134 is to allow setting a per-device polling interval. Just move this info to the platform data, allowing drivers to change it per device, where needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: video/saa7134: change dprintk() to i2cdprintk()Dan Carpenter2010-06-011-4/+4
| | | | | | | | | | | | The problem is that dprintk() dereferences "dev" which is null here. The i2cdprintk() uses "ir" so that's OK. Also Jean Delvare pointed out a typo in the comment so we may as well fix that. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: video/saa7134: remove duplicate breakDan Carpenter2010-06-011-1/+0
| | | | | | | | The original code had two break statements in a row. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7134: add RM-K6 remote control support for Avermedia M135AHerton Ronaldo Krzesinski2010-06-011-1/+1
| | | | | | | | 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>
* V4L/DVB: saa7134: add support for Avermedia M733AHerton Ronaldo Krzesinski2010-06-011-0/+7
| | | | | | | | | | | 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>
* V4L/DVB: saa7134: Add support new Behold TV cardsDmitri Belimov2010-05-191-0/+2
| | | | | | | | [dougsland@redhat.com: Fixed cards numbers reject due changes in saa7134.h] Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | 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-nec-decoder: Reimplement the entire decoderMauro Carvalho Chehab2010-05-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB: saa7134: Fix IRQ2 bit names for the register mapMauro Carvalho Chehab2010-05-191-2/+2
| | | | | | | | | | | | | | 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>
* V4L/DVB: ir-core: Make use of the new IR keymap modulesMauro Carvalho Chehab2010-05-191-41/+40
| | | | | | | | 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-1/+1
| | | | | | | 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: use IR_KEYTABLE where an IR table is neededMauro Carvalho Chehab2010-05-191-34/+34
| | | | | | | 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>
* V4L/DVB: saa7134: fix GPIO HW-404M7Vladimir Ermakov2010-05-191-1/+0
| | | | | | | Signed-off-by: Vladimir Ermakov <vooon341@gmail.com> Reviewed-by: hermann pitton <hermann-pitton@arcor.de> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.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-181-14/+75
| | | | | | | | | | 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: saa7134: clear warning noiseMauro Carvalho Chehab2010-05-181-1/+1
| | | | | | | | drivers/media/video/saa7134/saa7134-input.c: In function ‘saa7134_raw_decode_irq’: drivers/media/video/saa7134/saa7134-input.c:957: warning: unused variable ‘oldpulse’ drivers/media/video/saa7134/saa7134-input.c:957: warning: unused variable ‘count’ 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-1/+1
| | | | | | | | | | | | 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>
* V4L/DVB: saa7134: don't wait too much to generate an IR event on raw_decodeMauro Carvalho Chehab2010-05-181-26/+17
| | | | | | | | | | | | | | | | | At raw_decode mode, the key is processed after the end of a timer. The previous code resets the timer every time something is received at the IR port. While this works fine with IR's that don't implement repeat, like Avermedia RM-JX IR, it keeps waiting until keydown, on IR's that implement NEC repeat command, like the Terratec yellow. The solution is to change the behaviour to do the timeout after the first received data. The timeout is currently set to 15 ms, as it works fine with NEC protcocol. It may need some adjustments to support other protocols and to better handle spurious detections that may happen with some IR sensors. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core/saa7134: Move ir keyup/keydown code to the ir-coreMauro Carvalho Chehab2010-05-181-11/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: ir-core: Add logic to decode IR protocols at the IR coreMauro Carvalho Chehab2010-05-181-4/+81
| | | | | | | | | | | | Adds a method to pass IR raw pulse/code events into ir-core. This is needed in order to support LIRC. It also helps to move common code from the drivers into the core. In order to allow testing, it implements a simple NEC protocol decoder at ir-nec-decoder.c file. The logic is about the same used at saa7134 driver that handles Avermedia M135A and Encore FM53 boards. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7134: add code to allow changing IR protocolMauro Carvalho Chehab2010-05-181-4/+60
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7134: use a full scancode table for M135AMauro Carvalho Chehab2010-05-181-2/+2
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud