summaryrefslogtreecommitdiff
path: root/drivers/media/rc
AgeCommit message (Collapse)Author
2012-10-07[media] rc-msi-digivox-ii: Add full scan keycodesWolfgang Bail
The ir-rc from my MSI DigiVox mini II Version 3 (af9015) will not work since kernel 3.2.x. sudo ir-keytable -t shows: 1348890734.303273: event MSC: scancode = 317 1348890734.303280: event key down: KEY_POWER (0x0074) 1348890734.303282: event sync 1348890734.553961: event key up: KEY_POWER (0x0074) 1348890734.553963: event sync 1348890741.303451: event MSC: scancode = 30d 1348890741.303457: event key down: KEY_DOWN (0x006c) 1348890741.303459: event sync 1348890741.553956: event key up: KEY_DOWN (0x006c) So I changed in rc-msi-digivox-ii.c { 0x0002, KEY_2 }, to { 0x0302, KEY_2 }, and so on. And now it works well. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07[media] winbond: remove space from driver nameSean Young
-snip- ACTION=add DEVPATH=/devices/pnp0/00:04/rc/rc0 DRV_NAME=Winbond CIR NAME=rc-rc6-mce SUBSYSTEM=rc UDEV_LOG=6 USEC_INITIALIZED=88135858 run: '/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s rc0' Having a space makes it impossible to match in /etc/rc_maps.cfg. [root@pequod ~]# udevadm test /sys/class/rc/rc0 Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07[media] iguanair: cannot send data from the stackSean Young
Note that the firmware already disables the receiver before transmit, there is no need to do this from the driver. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06[media] rc-core: fix return codes in ir_lirc_ioctl()Dan Carpenter
These should be -ENOSYS because not -EINVAL. Reported-by: Sean Young <sean@mess.org> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06[media] rc: divide by zero bugs in s_tx_carrier()Dan Carpenter
"carrier" comes from a get_user() in ir_lirc_ioctl(). We need to test that it's not zero before using it as a divisor. It might have been nice to test for this ir_lirc_ioctl() but the mceusb driver uses zero to disable carrier modulation. The bug in redrat3 is a little more subtle. The ->carrier is passed to mod_freq_to_val() which uses it as a divisor. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-25[media] winbond-cir: asynchronous txDavid Härdeman
Change winbond-cir's tx support to be asynchronous and not to mess with the TX buffer. Essentially the winbond-cir counterpart to the patch Sean Young sent for iguanair. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-25[media] winbond-cir: correctness fixDavid Härdeman
This is a minor correctness fix for the duration calculation in winbond-cir (the read value should be incremented by one). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-23[media] drivers/media/rc/ati_remote.c: fix error return codePeter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-23[media] drivers/media/rc/redrat3.c: fix error return codePeter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-18[media] mceusb: Optimize DIV_ROUND_CLOSEST callJean Delvare
DIV_ROUND_CLOSEST is faster if the compiler knows it will only be dealing with unsigned dividends. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15[media] ir-rx51: Adjust dependenciesTimo Kokkonen
Although this kind of IR diode circuitry is known to exist only in N900 hardware, nothing prevents making similar circuitry on any OMAP based board. The MACH_NOKIA_RX51 dependency is thus not something we want to be there. Also, this should depend on LIRC as it is a LIRC driver. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15[media] ir-rx51: Trivial fixesTimo Kokkonen
-Fix typo -Change pwm_timer_num type to match type in platform data -Remove extra parenthesis -Replace magic constant with proper bit defintions -Remove duplicate exit pointer Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15[media] ttusbir: ad support suspend and resumeSean Young
While here, fix the led name: the led is green, not yellow. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15[media] iguanair: do not modify transmit bufferSean Young
Since commit "[media] rc-core: move timeout and checks to lirc", the incoming buffer is used after the driver transmits. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15[media] ttusbir: Add USB dependencySean Young
This patch fixes the error: ERROR: "usb_speed_string" [drivers/usb/core/usbcore.ko] undefined! Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15[media] rc: fix buffer overrunSean Young
"[media] rc-core: move timeout and checks to lirc" introduced a buffer overrun by passing the number of bytes, rather than the number of samples, to the transmit function. Signed-off-by: Sean Young <sean@mess.org> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-14[media] rc: ite-cir: Initialise ite_dev::rdev earlierBen Hutchings
ite_dev::rdev is currently initialised in ite_probe() after rc_register_device() returns. If a newly registered device is opened quickly enough, we may enable interrupts and try to use ite_dev::rdev before it has been initialised. Move it up to the earliest point we can, right after calling rc_allocate_device(). Reported-and-tested-by: YunQiang Su <wzssyqa@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-24Merge tag 'v3.6-rc3' into staging/for_v3.7Mauro Carvalho Chehab
Linux 3.6-rc3 * tag 'v3.6-rc3': (764 commits) Linux 3.6-rc3 task_work: add a scheduling point in task_work_run() fs: fix fs/namei.c kernel-doc warnings eventpoll: use-after-possible-free in epoll_create1() vfio: grab vfio_device reference *before* exposing the sucker via fd_install() vfio: get rid of vfio_device_put()/vfio_group_get_device* races vfio: get rid of open-coding kref_put_mutex introduce kref_put_mutex() vfio: don't dereference after kfree... fbcon: fix race condition between console lock and cursor timer (v1.1) mm: compaction: Abort async compaction if locks are contended or taking too long mm: have order > 0 compaction start near a pageblock with free pages rapidio/tsi721: fix unused variable compiler warning rapidio/tsi721: fix inbound doorbell interrupt handling drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode mm: correct page->pfmemalloc to fix deactivate_slab regression drivers/rtc/rtc-pcf2123.c: initialize dynamic sysfs attributes mm/compaction.c: fix deferring compaction mistake drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources string: do not export memweight() to userspace ...
2012-08-14[media] rc/Kconfig: Fix a warningMauro Carvalho Chehab
drivers/media/rc/Kconfig:291:warning: multi-line strings not supported Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] rc-core: move timeout and checks to lircDavid Härdeman
The lirc TX functionality expects the process which writes (TX) data to the lirc dev to sleep until the actual data has been transmitted by the hardware. Since the same timeout calculation is duplicated in more than one driver (and would have to be duplicated in even more drivers as they gain TX support), it makes sense to move this timeout calculation to the lirc layer instead. At the same time, centralize some of the sanity checks. Signed-off-by: David Härdeman <david@hardeman.nu> Cc: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] media: rc: Introduce RX51 IR transmitter driverTimo Kokkonen
This is the driver for the IR transmitter diode found on the Nokia N900 (also known as RX51) device. The driver is mostly the same as found in the original 2.6.28 based kernel that comes with the device. The following modifications have been made compared to the original driver version: - Adopt to the changes that has happen in the kernel during the past five years, such as the change in the include paths - The OMAP DM-timers require much more care nowadays. The timers need to be enabled and disabled or otherwise many actions fail. Timers must not be freed without first stopping them or otherwise the timer cannot be requested again. The code has been tested with sending IR codes with N900 device running Debian userland. The device receiving the codes was Anysee DVB-C USB receiver. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi> Cc: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] ati_remote: use %*ph to dump small buffersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] rc: transmit on device which does not support it should failSean Young
Currently write() will return 0 if an IR device does not support sending. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] rc: do not wake up rc thread unless there is something to doSean Young
The TechnoTrend USB IR Receiver sends 125 ISO URBs per second, even when there is no IR activity. Reduce the number of wake ups from the other drivers too. This saves about 0.25ms/s on a 2.4GHz Core 2 according to powertop. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] rc: Add support for the TechnoTrend USB IR ReceiverSean Young
This driver adds support for TechnoTrend USB IR Receiver. It is a complete rewrite of the staging/media/lirc/lirc_ttusbir driver. It adds more accurate sample reporting and led control. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] iguanair: fix receiver overflowSean Young
The Pioneer CU-700 remote causes receiver overflows if you hold down any button. The remote does not send NEC IR repeats, it repeats the entire NEC code after 20ms. The iguanair hardware advertises an interval of 10 which just not enough; with 100 URBs per second and at most 7 edges per URB, we handle at most 700 edges per second. The remote generates about 900. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] iguanair: advertise the resolution and timeout properlySean Young
With the timeout supplied the interface can go idle. The keymap is the same one as other drivers which do not come with a remote. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] iguanair: reset the IR state after rx overflow or receiver enableSean Young
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] iguanair: fix return value for transmitSean Young
Also fix error codes returned from open. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] iguanair: support suspend and resumeSean Young
Now unbind also stops the receiver. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] iguanair: ignore unsupported firmware versionsSean Young
Firmware versions lower than 0x0205 use a different interface which is not supported. Also report the firmware version in the standard format. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] iguanair: reuse existing urb callback for command responsesSean Young
Rather than using usb_interrupt_msg() to receive responses, reuse the urb callback we already have in place. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12[media] Add USB dependency for IguanaWorks USB IR TransceiverGuenter Roeck
This patch fixes the error drivers/usb/core/hub.c:3753: undefined reference to `usb_speed_string' seen in various random configurations. Cc: Sean Young <sean@mess.org> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-11[media] nec-decoder: fix NEC decoding for Pioneer Laserdisc CU-700 remoteSean Young
This remote sends a header pulse of 8150us followed by a space of 4000us. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-31[media] Add support for the IguanaWorks USB IR TransceiverSean Young
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-31[media] Minor cleanups for MCE USBSean Young
Signed-off-by: Sean Young <sean@mess.org> Cc: Jarod Wilson <jarod@wilsonet.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-31[media] mceusb: Add Twisted Melon USB IDsMark Lord
Add USB identifiers for MCE compatible I/R transceivers from Twisted Melon. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-31[media] rc: ati_remote.c: code style fixingDu, Changbin
changes: 1. wrap some lines that are longer than 80 characters. 2. remove local function prototype declarations which do not need. 3. replace TAB character with a space character in function comments. Signed-off-by: Du, Changbin <changbin.du@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-31[media] Avoid sysfs oops when an rc_dev's raw device is absentDouglas Bagnall
For some reason, when the lirc daemon learns that a usb remote control has been unplugged, it wants to read the sysfs attributes of the disappearing device. This is useful for uncovering transient inconsistencies, but less so for keeping the system running when such inconsistencies exist. Under some circumstances (like every time I unplug my dvb stick from my laptop), lirc catches an rc_dev whose raw event handler has been removed (presumably by ir_raw_event_unregister), and proceeds to interrogate the raw protocols supported by the NULL pointer. This patch avoids the NULL dereference, and ignores the issue of how this state of affairs came about in the first place. Version 2 incorporates changes recommended by Mauro Carvalho Chehab (-ENODEV instead of -EINVAL, and a signed-off-by). Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-14Merge branch 'v4l_for_linus' into staging/for_v3.6Mauro Carvalho Chehab
* v4l_for_linus: (31 commits) [media] Revert "[media] V4L: JPEG class documentation corrections" [media] s5p-fimc: Add missing FIMC-LITE file operations locking [media] omap3isp: preview: Fix contrast and brightness handling [media] omap3isp: preview: Fix output size computation depending on input format [media] winbond-cir: Initialise timeout, driver_type and allowed_protos [media] winbond-cir: Fix txandrx module info [media] cx23885: Silence unknown command warnings [media] cx23885: add support for HVR-1255 analog (cx23888 variant) [media] cx23885: make analog support work for HVR_1250 (cx23885 variant) [media] cx25840: fix vsrc/hsrc usage on cx23888 designs [media] cx25840: fix regression in HVR-1800 analog audio [media] cx25840: fix regression in analog support hue/saturation controls [media] cx25840: fix regression in HVR-1800 analog support [media] s5p-mfc: Fixed setup of custom controls in decoder and encoder [media] cx231xx: don't DMA to random addresses [media] em28xx: fix em28xx-rc load [media] dvb-core: Release semaphore on error path dvb_register_device() [media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validate fails [media] s5p-fimc: Fix compiler warning in fimc-lite.c [media] s5p-fimc: media_entity_pipeline_start() may fail ...
2012-07-06[media] media: Use pr_info not homegrown pr_reg macroJoe Perches
No need to duplicate normal kernel logging capabilities. Add pr_fmt and convert pr_reg to pr_info. Remove pr_reg macros. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06[media] winbond-cir: Initialise timeout, driver_type and allowed_protosAnton Blanchard
We need to set a timeout so we can go idle on no activity. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06[media] winbond-cir: Fix txandrx module infoAnton Blanchard
We aren't getting any module info for the txandx option because of a typo: parm: txandrx:bool Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06[media] media: gpio-ir-recv: add allowed_protos for platform dataDu, Changbin
It's better to give platform code a chance to specify the allowed protocols to use. [mchehab@redhat.com: fix merge conflict with a patch that made half of this change] Signed-off-by: Du, Changbin <changbin.du@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06[media] rc/Kconfig: Move a LIRC sub-option to the right placeMauro Carvalho Chehab
The IR to LIRC option were at the wrong sub-menu. Move it to the right place. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06[media] Kconfig: Split the core support options from the driver onesMauro Carvalho Chehab
Better arrange the remote controller driver items to happen after the core support, on their proper menus, and making clerarer what is media core options and what is media driver options. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-05[media] media: reorganize the main Kconfig itemsMauro Carvalho Chehab
Change the main items to: <m> Multimedia support ---> [ ] Cameras/video grabbers support [ ] Analog TV support [ ] Digital TV support [ ] AM/FM radio receivers/transmitters support [ ] Remote Controller support This provides an interface that is clearer to end users that are compiling the Kernel, and will allow the building system to automatically unselect drivers for unused functions. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-05[media] ene_ir: Fix driver initialisationLuis Henriques
commit 9ef449c6b31bb6a8e6dedc24de475a3b8c79be20 ("[media] rc: Postpone ISR registration") fixed an early ISR registration on several drivers. It did however also introduced a bug by moving the invocation of pnp_port_start() to the end of the probe function. This patch fixes this issue by moving the invocation of pnp_port_start() to an earlier stage in the probe function. Cc: stable@vger.kernel.org Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] media: gpio-ir-recv: switch to module_platform_driverBenoît Thébaudeau
Cc: Ravi Kumar V <kumarrav@codeaurora.org> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-25[media] media: gpio-ir-recv: add map nameBenoît Thébaudeau
Make it possible for gpio-ir-recv users to choose a map name. Cc: Ravi Kumar V <kumarrav@codeaurora.org> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>