[PATCH 3/8] [media] lirc: LIRC_{G,S}ET_SEND_MODE fail if device cannot transmit

2016-12-02 Thread Sean Young
These ioctls should not succeed if the device cannot send. Also make it clear that these ioctls should return the lirc mode, although the actual value does not change. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/ir-lirc-codec.c | 10 -- 1 file changed, 8 inse

[PATCH 6/8] [media] rc: allow software timeout to be set

2016-12-02 Thread Sean Young
Both the iguanair and the technotrend usb ir do not do any timeout handling in hardware, so timeout is entirely done in ir_raw_event_store_with_filter(). Any sensible timeout value will do, so allow it to be set using LIRC_SET_REC_TIMEOUT. Signed-off-by: Sean Young <s...@mess.org> --- d

[PATCH 2/8] [media] lirc_dev: LIRC_{G,S}ET_REC_MODE do not work

2016-12-02 Thread Sean Young
Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these ioctls no longer work. Signed-off-by: Sean Young <s...@mess.org> Cc: Andi Shyti <andi.sh...@samsung.com> Cc: <sta...@vger.kernel.org> # v4.8+ --- drivers/media/rc/lirc_dev.c | 4 ++-- 1 file changed,

[PATCH 8/8] [media] rc5x: document that this is the 20 bit variant

2016-12-02 Thread Sean Young
There are many variants of extended rc5. This implements the 20 bit version. Signed-off-by: Sean Young <s...@mess.org> Cc: David Härdeman <da...@hardeman.nu> --- drivers/media/rc/ir-rc5-decoder.c | 6 +++--- drivers/media/rc/rc-main.c| 2 +- include/media/rc-map.h

[PATCH 4/8] [media] em28xx: IR protocol not reported correctly

2016-12-02 Thread Sean Young
Report the correct NEC variant. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/usb/em28xx/em28xx-input.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c index a

[PATCH 1/8] [media] mceusb: LIRC_SET_SEND_CARRIER returns 0 on success

2016-12-02 Thread Sean Young
LIRC_SET_SEND_CARRIER ioctl should not return the carrier used, it should return 0. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/mceusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 9

[PATCH 5/8] [media] serial_ir: generate timeout

2016-12-02 Thread Sean Young
No timeout is generated by serial_ir since the port only generates interrupts on edges. Some IR protocols like rc6 and rc5 need a trailing space or timeout so they know there are no more bits coming. Without it, the current key will only be reported once some more IR occurs. Signed-off-by: Sean

[GIT PULL FOR v4.10] lirc cdev fixes for 4.10

2016-11-29 Thread Sean Young
Hi Mauro, Just one fix to prevent double free or NULL deref in error path. Thanks, Sean The following changes since commit a000f0d3995f622410d433a01e94fbfb45969e27: [media] vivid: Set color_enc on HSV formats (2016-11-29 12:12:32 -0200) are available in the git repository at: git

Re: ir-keytable: infinite loops, segfaults

2016-11-27 Thread Sean Young
On Fri, Nov 25, 2016 at 07:59:21PM +1100, Vincent McIntyre wrote: > On 11/25/16, Sean Young <s...@mess.org> wrote: > > > > So if I understand you correctly, if you change the keymap, like you > > changed 0xfe47 to KEY_PAUSE, then "ir-keytable -s rc1 -t" s

[PATCH] [media] lirc: fix error paths in lirc_cdev_add()

2016-11-27 Thread Sean Young
"c77d17c0 [media] lirc: use-after free" introduces two problems: cdev_del() can be called with a NULL argument, and the kobject_put() path will cause a double free. Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Sean Young <s...@mess.org> --- drivers/m

Re: [bug report] [media] lirc: prevent use-after free

2016-11-26 Thread Sean Young
Hi Dan, On Sat, Nov 26, 2016 at 12:57:17PM +0300, Dan Carpenter wrote: > Hello Sean Young, > > The patch afbb110172b9: "[media] lirc: prevent use-after free" from > Oct 31, 2016, leads to the following static checker warning: > > drivers/media/rc/

Re: [PATCH] media: rc: refactor raw handler kthread

2016-11-25 Thread Sean Young
; - Don't grep / release the mutex for each individual event but just once > for the complete fifo content. This reduces overhead if a driver e.g. > triggers processing after writing the content of a hw fifo to the kfifo. > > Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com&

Re: ir-keytable: infinite loops, segfaults

2016-11-24 Thread Sean Young
On Thu, Nov 24, 2016 at 11:12:57PM +1100, Vincent McIntyre wrote: > On Wed, Nov 23, 2016 at 10:34:19PM +0000, Sean Young wrote: > > > Not sure why Driver is (null), dvb_usb_cxusb is loaded. > > > > That's a mistake, I've fixed that now. > > Ah. I see the ad

Re: ir-keytable: infinite loops, segfaults

2016-11-23 Thread Sean Young
On Wed, Nov 23, 2016 at 11:39:06PM +1100, Vincent McIntyre wrote: > On Tue, Nov 22, 2016 at 09:20:44AM +0000, Sean Young wrote: > > > Thanks for this. I have got it to build within the media_build setup > > > but will need to find some windows in the schedule for testing. M

Re: [PATCH] [media] nec decoder: wrong bit order for nec32 protocol

2016-11-22 Thread Sean Young
... I'm pretty sure I do have both a > > remote and receiver on hand that would fit the bill here though. Is the > > question primarily about what actually gets emitted by the TiVo remote? > > Yes. Sean suspects that we're decoding the NEC 32 bits in the > wrong order at the in-ker

Re: [PATCH] [media] nec decoder: wrong bit order for nec32 protocol

2016-11-22 Thread Sean Young
On Tue, Nov 22, 2016 at 09:19:19AM -0500, Jarod Wilson wrote: > On Tue, Nov 22, 2016 at 11:35:06AM -0200, Mauro Carvalho Chehab wrote: > > Em Wed, 9 Nov 2016 16:13:35 + > > Sean Young <s...@mess.org> escreveu: > > > > > The bits are sent in lsb firs

Re: ir-keytable: infinite loops, segfaults

2016-11-22 Thread Sean Young
On Tue, Nov 22, 2016 at 06:25:59PM +1100, Vincent McIntyre wrote: > On 11/21/16, Sean Young <s...@mess.org> wrote: > >> > >> Ah. Here we have a problem. The device (/dev/input/event15) > >> doesn't have a corresponding rcX node, see ir-keytable output below

[PATCH v4 3/3] [media] lirc_serial: move out of staging and rename to serial_ir

2016-11-21 Thread Sean Young
Signed-off-by: Sean Young <s...@mess.org> --- MAINTAINERS | 6 + drivers/media/rc/Kconfig | 17 + drivers/media/rc/Makefile| 1 + drivers/media/rc/serial_ir.c | 845 +++ drivers/staging

[PATCH v4 2/3] [media] lirc_serial: use precision ktime rather than guessing

2016-11-21 Thread Sean Young
This makes transmission more reliable and the code much cleaner. Signed-off-by: Sean Young <s...@mess.org> --- drivers/staging/media/lirc/lirc_serial.c | 286 +++ 1 file changed, 65 insertions(+), 221 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_se

[PATCH v4 1/3] [media] lirc_serial: port to rc-core

2016-11-21 Thread Sean Young
Tested with a homebrew serial ir. Remove last remmants of the nslu2 which could not be enabled, and fix checkpatch warnings. Signed-off-by: Sean Young <s...@mess.org> --- drivers/staging/media/lirc/lirc_serial.c | 677 +-- 1 file changed, 274 insertions(+

Re: [PATCH v3 1/2] [media] serial_ir: port lirc_serial to rc-core

2016-11-21 Thread Sean Young
On Mon, Nov 21, 2016 at 02:28:08PM -0200, Mauro Carvalho Chehab wrote: > Em Fri, 11 Nov 2016 23:13:06 + > Sean Young <s...@mess.org> escreveu: > > > Tested with a homebrew serial ir. Remove last remmants of the nslu2 > > which could not be enabled. > > T

Re: ir-keytable: infinite loops, segfaults

2016-11-20 Thread Sean Young
On Sat, Nov 19, 2016 at 09:01:10AM +1100, Vincent McIntyre wrote: > On Fri, Nov 18, 2016 at 05:40:34PM +0000, Sean Young wrote: > > > > > > So are you saying that the hex codes in the rc_map_dvico_mce_table > > > struct are invalid (at least in some cases)? &

Re: ir-keytable: infinite loops, segfaults

2016-11-18 Thread Sean Young
On Fri, Nov 18, 2016 at 11:14:25PM +1100, Vincent McIntyre wrote: > On Thu, Nov 17, 2016 at 01:45:26PM +0000, Sean Young wrote: > > On Wed, Nov 16, 2016 at 09:52:58PM +1100, Vincent McIntyre wrote: > > > I have a fairly old dvico dual digital 4 tuner and remote. > > > T

Re: ir-keytable: infinite loops, segfaults

2016-11-17 Thread Sean Young
s remote sends (and in what protocol). A scancode of 0xfe47 is not a valid RC5 scancode. Would it be possible to test the remote with another device (say an usb mce receiver or so) and see what scancodes it sends? Then we can translate the keymap to a real one and make the cxusb driver send correct scancodes

[PATCH v3 1/2] [media] serial_ir: port lirc_serial to rc-core

2016-11-11 Thread Sean Young
Tested with a homebrew serial ir. Remove last remmants of the nslu2 which could not be enabled. Signed-off-by: Sean Young <s...@mess.org> --- MAINTAINERS |6 + drivers/media/rc/Kconfig | 17 + drivers/media/rc/Makefile

[PATCH v3 2/2] [media] serial_ir: use precision ktime rather than guessing

2016-11-11 Thread Sean Young
This makes transmission more reliable and the code much cleaner. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/serial_ir.c | 264 ++- 1 file changed, 59 insertions(+), 205 deletions(-) diff --git a/drivers/media/rc/serial_ir.c b/d

Re: [PATCH v2 2/2] serial_ir: use precision ktime rather than guessing

2016-11-11 Thread Sean Young
On Fri, Nov 11, 2016 at 11:49:38AM +0800, kbuild test robot wrote: > Hi Sean, > > [auto build test ERROR on linuxtv-media/master] > [also build test ERROR on next-20161110] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve th

[PATCH v2 1/2] [media] serial_ir: port lirc_serial to rc-core

2016-11-10 Thread Sean Young
Tested with a homebrew serial ir. Signed-off-by: Sean Young <s...@mess.org> --- MAINTAINERS |6 + drivers/media/rc/Kconfig | 17 + drivers/media/rc/Makefile|1 + drivers/media/rc/serial_ir.c

[PATCH v2 2/2] serial_ir: use precision ktime rather than guessing

2016-11-10 Thread Sean Young
This makes transmission more reliable and the code much cleaner. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/serial_ir.c | 260 +-- 1 file changed, 54 insertions(+), 206 deletions(-) diff --git a/drivers/media/rc/serial_ir.c b/d

Re: [PATCH 1/2] [media] serial_ir: port lirc_serial to rc-core

2016-11-10 Thread Sean Young
On Thu, Nov 03, 2016 at 03:39:31AM +0800, kbuild test robot wrote: > Hi Sean, > > [auto build test WARNING on linuxtv-media/master] > [also build test WARNING on v4.9-rc3 next-20161028] > [if your patch is applied to the wrong git tree, please drop us a note to > help

Re: [PATCH] ir-kbd-i2c: fix uninitialized variable reference

2016-11-10 Thread Sean Young
he same). https://patchwork.linuxtv.org/patch/37930/ Sean > > Signed-off-by: Hans Verkuil <hansv...@cisco.com> > --- > diff --git a/drivers/media/i2c/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c > index f95a6bc..cede397 100644 > --- a/drivers/media/i2c/ir-kbd-i2c.c > ++

Re: dib0700_core.c: uninitialized variable warning, not sure how to fix

2016-11-10 Thread Sean Young
ing like that is a mystery to me. This is already solved in this patch: https://patchwork.linuxtv.org/patch/37516/ Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v4l-utils 3/3] ir-keytable: make it possible to select the rc5 streamzap variant

2016-11-09 Thread Sean Young
It was not possible to select the rc-5-sz protocol. Signed-off-by: Sean Young <s...@mess.org> --- utils/keytable/keytable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c index 3922ad2..202610a 100644 --- a/utils/keytable/keyt

[PATCH v4l-utils 1/3] ir-ctl: add ability to send scancodes in most protocols

2016-11-09 Thread Sean Young
except for XMP and the MCE Keyboard. Signed-off-by: Sean Young <s...@mess.org> --- utils/ir-ctl/Makefile.am | 2 +- utils/ir-ctl/ir-ctl.1.in | 82 ++--- utils/ir-ctl/ir-ctl.c| 130 ++- utils/ir-ctl/ir-encode.c | 427 +++ utils/

[PATCH] [media] nec decoder: wrong bit order for nec32 protocol

2016-11-09 Thread Sean Young
The bits are sent in lsb first. Hardware decoders also send nec32 in this order (e.g. dib0700). This should be consistent, however I have no way of knowing which order the LME2510 and Tivo keymaps are (the only two kernel keymaps with NEC32). Signed-off-by: Sean Young <s...@mess.org> --- d

[PATCH] [media] sanyo decoder: address was being truncated

2016-11-09 Thread Sean Young
The address is 13 bits but it was stuffed in an u8, so 5 bits are missing from the scancode. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/ir-sanyo-decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-sanyo-decoder.c b/d

[PATCH v4l-utils 2/3] ir-ctl: add verbose option

2016-11-09 Thread Sean Young
This is useful to see what IR is actually being sent (e.g. after scancode generation). Signed-off-by: Sean Young <s...@mess.org> --- utils/ir-ctl/ir-ctl.1.in | 3 +++ utils/ir-ctl/ir-ctl.c| 15 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/utils/ir-

Re: [PATCH] media: fix uninitialized variable warning in dib0700_rc_urb_completion()

2016-11-08 Thread Sean Young
e protocol = RC_TYPE_UNKNOWN; > u32 uninitialized_var(keycode); > u8 toggle; > There is another (better) fix for it here: https://patchwork.linuxtv.org/patch/37516/ Thanks Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] [media] lirc: remove lirc_serial driver

2016-11-02 Thread Sean Young
r driver you refer to isn't about > a usb-based serial ir? See patch 1/2. That introduces the serial_ir rc-core driver. http://www.spinics.net/lists/linux-media/msg107352.html Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to

[PATCH 2/2] [media] lirc: remove lirc_serial driver

2016-11-02 Thread Sean Young
This has been replaced by the serial_ir driver in rc-core. Signed-off-by: Sean Young <s...@mess.org> --- drivers/staging/media/lirc/Kconfig | 13 - drivers/staging/media/lirc/Makefile |1 - drivers/staging/media/lirc/lirc_serial.c | 1130 -- 3

[PATCH 1/2] [media] serial_ir: port lirc_serial to rc-core

2016-11-02 Thread Sean Young
Tested with a homebrew serial ir. Signed-off-by: Sean Young <s...@mess.org> --- MAINTAINERS |6 + drivers/media/rc/Kconfig | 17 + drivers/media/rc/Makefile|1 + drivers/media/rc/serial_ir.c | 1020 ++ 4 files c

Re: [PATCH v3 0/6] Add support for IR transmitters

2016-11-02 Thread Sean Young
s currently ongoing. Looks great! For the whole series: Reviewed-by: Sean Young <s...@mess.org> Thanks, Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] [media] dib0700: fix nec repeat handling

2016-11-02 Thread Sean Young
On Sat, Oct 29, 2016 at 11:04:32PM +0200, Arnd Bergmann wrote: > On Thursday, October 13, 2016 10:28:44 PM CEST Sean Young wrote: > > When receiving a nec repeat, ensure the correct scancode is repeated > > rather than a random value from the stack. This removes the need &g

Re: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-11-01 Thread Sean Young
understanding. Did I miss something? Sean > To me it just doesn't look right to simulate a fake transmission > period and wait unnecessary time. Of course, the "over-wait" is not > a big deal and at the end we can decide to drop it. > > Otherwise, an alternative could

Re: [PATCH 5/9] [media] redrat3: enable carrier reports using wideband receiver

2016-10-31 Thread Sean Young
The wideband receiver is a little awkward on the redrat3. Data arrives on a different endpoint, and the learning command must be reissued every time data is learned. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 186 ++

[PATCH 5/9] [media] redrat3: enable carrier reports using wideband receiver

2016-10-31 Thread Sean Young
The wideband receiver is a little awkward on the redrat3. Data arrives on a different endpoint, and the learning command must be reissued every time data is learned. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 184 ++

[PATCH 9/9] [media] lirc: use-after free while reading from device and unplugging

2016-10-31 Thread Sean Young
Many lirc drivers have their own receive buffers which are freed on unplug (e.g. ir_lirc_unregister). This means that ir->buf->wait_poll will be freed directly after unplug so do not remove yourself from the wait queue. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/r

[PATCH 4/9] [media] redrat3: fix error paths in probe

2016-10-31 Thread Sean Young
If redrat3_delete() is called, ensure ep_in and udev members are set up so we don't dereference null in the error path. Also ensure that rc dev device exists before we enable the receiver and that the led urb exists before we create the led device. Signed-off-by: Sean Young <s...@mess.

[PATCH 3/9] [media] redrat3: remove dead code and pointless messages

2016-10-31 Thread Sean Young
No need to log kmalloc failures. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 42 ++ 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index de40e58..2

[PATCH 1/9] [media] winbond-cir: use name without space for pnp driver

2016-10-31 Thread Sean Young
Rename the pnp driver in sysfs from /sys/bus/pnp/drivers/Winbond CIR to /sys/bus/pnp/drivers/winbond-cir Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/winbond-cir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/winbond-cir.c b/drivers

[PATCH 6/9] [media] redrat3: increase set size for lengths to maximum

2016-10-31 Thread Sean Young
In learning mode, you can get much longer messages which can run out of lengths. The usb message will slightly larger. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/redrat3.c b/d

[PATCH 7/9] [media] lirc: might sleep error in lirc_dev_fop_read

2016-10-31 Thread Sean Young
[ 101.457944] [ cut here ] [ 101.457954] WARNING: CPU: 3 PID: 1819 at kernel/sched/core.c:7708 __might_sleep+0x7e/0x80 [ 101.457960] do not call blocking ops when !TASK_RUNNING; state=1 set at [] lirc_dev_fop_read+0x292/0x4e0 [lirc_dev] Signed-off-by: Sean Young &l

[PATCH 8/9] [media] lirc: prevent use-after free

2016-10-31 Thread Sean Young
If you unplug an lirc device while reading from it, you will get an use after free as the cdev is freed while still in use. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/lirc_dev.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/me

[PATCH 0/9] Various IR fixes

2016-10-31 Thread Sean Young
Teach the redrat3 driver how to use the wideband receiver, also fix some very nasty crashes if you disconnect a lirc device while reading from it. Sean Young (9): [media] winbond-cir: use name without space for pnp driver [media] redrat3: don't include vendor/product id in name [media

[PATCH 2/9] [media] redrat3: don't include vendor/product id in name

2016-10-31 Thread Sean Young
No need to duplicate these in the rc name. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 3b0ed1c..de40e58 100644 --- a/drivers

Re: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-10-31 Thread Sean Young
Hi David, Andi, On Mon, Oct 31, 2016 at 02:31:52PM +, David Härdeman wrote: > October 27, 2016 4:36 PM, "Sean Young" <s...@mess.org> wrote: > > Since we have to be able to switch between waiting and not waiting, > > we need some sort of ABI for this. I think thi

Re: [PATCH] [media] lirc: introduce LIRC_SET_TRANSMITTER_WAIT ioctl

2016-10-28 Thread Sean Young
Hi Andi, On Fri, Oct 28, 2016 at 04:38:39PM +0900, Andi Shyti wrote: > Hi Sean, > > > ret *= sizeof(unsigned int); > > > > - /* > > -* The lircd gap calculation expects the write function to > > -* wait for the actual IR signal to be tra

[PATCH] [media] lirc: introduce LIRC_SET_TRANSMITTER_WAIT ioctl

2016-10-27 Thread Sean Young
lirc transmit waits for the IR to complete, since existing versions of lircd (prior to 0.9.4) rely on this. Allows this to be configurable if this is not desirable. Signed-off-by: Sean Young <s...@mess.org> --- Documentation/media/uapi/rc/lirc-func.rst | 1 + .../media/uapi/rc/li

Re: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-10-27 Thread Sean Young
On Thu, Oct 27, 2016 at 04:44:01PM +0900, Andi Shyti wrote: > Hi Sean, > > it's been a while :) > > I was going through your review fixing what needs to be fixed, > but... > > > > @@ -153,7 +153,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file,

Re: [PATCH 04/18] [media] RedRat3: One function call less in redrat3_transmit_ir() after error detection

2016-10-15 Thread Sean Young
irdata); > - kfree(sample_lens); > - > +reset_member: > rr3->transmitting = false; > /* rr3 re-enables rc detector because it was enabled before */ > - > + kfree(irdata); > +free_sample: > + kfree(sample_lens); In this error path, rr3->tr

Re: [PATCH 4/5] [media] winbond-cir: One variable and its check less in wbcir_shutdown() after error detection

2016-10-15 Thread Sean Young
a->wbase + WBCIR_REG_WCEIR_CTL, 0x01, 0x01); > +set_irqmask: > /* >* ACPI will set the HW disable bit for SP3 which means that the >* output signals are left in an undefined state which may cause > @@ -876,6 +858,14 @@ wbcir_shutdown(struct pnp_dev *device)

Re: [PATCH 12/18] [media] RedRat3: Move a variable assignment in redrat3_init_rc_dev()

2016-10-13 Thread Sean Young
by this function. The redrat3 driver shouldn't be adding the usb vendor/product id to the device name. A better patch would be to remove those from the snprintf completely and to away with the local variable. Sean > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> >

[PATCH] [media] dib0700: fix nec repeat handling

2016-10-13 Thread Sean Young
/media/usb/dvb-usb/dib0700_core.c:679: warning: ‘protocol’ may be used uninitialized in this function Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/usb/dvb-usb/dib0700_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/d

Re: [PATCH] [media] dib0700: Fix uninitialized protocol for NEC repeat codes

2016-10-13 Thread Sean Young
c_keydown(d->rc_dev, protocol, keycode, toggle); But keycode in this codepath is never set. Luckily keycode is declared as: u32 uninitialized_var(keycode); I've got another patch for this which I'll send as a reply to this. Sean > --- > drivers/media/usb/dvb-usb/dib0700_core.c | 1 + >

Re: [PATCH] [media/input] rc: report rc protocol type to userspace through input

2016-09-25 Thread Sean Young
Hi Dmitry, On Fri, Sep 23, 2016 at 03:08:31PM -0700, Dmitry Torokhov wrote: > On Thu, Sep 22, 2016 at 11:57:13AM -0300, Mauro Carvalho Chehab wrote: > > Em Wed, 21 Sep 2016 10:54:21 +0100 > > Sean Young <s...@mess.org> escreveu: > > > > > We might want to know

[PATCH] [media] rc: split nec protocol into its three variants

2016-09-21 Thread Sean Young
protocol type to userspace and we don't want to be introducing this world of pain into userspace too. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/pci/cx23885/cx23885-input.c | 2 +- drivers/media/pci/cx88/cx88-input.c | 5 +++-- drivers/media/pci/saa7134/saa7134-input.

[PATCH] [media/input] rc: report rc protocol type to userspace through input

2016-09-21 Thread Sean Young
that the input layer knows the rc protocol and scancode, at a later point we could add a feature where keymaps could be created based on both protocol and scancode, not just scancode. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/i2c/ir-kbd-i2c.c | 17 + drivers/med

[PATCH] [media] v4l-utils: report rc protocol while testing

2016-09-21 Thread Sean Young
-by: Sean Young <s...@mess.org> --- utils/keytable/Makefile.am | 7 +++ utils/keytable/keytable.c | 6 ++ utils/keytable/parse.h | 26 ++ 3 files changed, 39 insertions(+) diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am index 6

[PATCH] v4l-utils: ir-ctl: give proper error message if transmitter does not exist

2016-09-19 Thread Sean Young
If a transmitter does not exist when setting using -e, you get the error: warning: /dev/lirc0: failed to set send transmitters: Success Signed-off-by: Sean Young <s...@mess.org> --- utils/ir-ctl/ir-ctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/ir-

[PATCH] [media] rc: rc6 decoder should report protocol correctly

2016-09-19 Thread Sean Young
When reporting decoded protocol use the enum rather than the bitmap. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/ir-rc6-decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-dec

[PATCH] [media] rc: Hauppauge z8f0811 can decode RC6

2016-09-19 Thread Sean Young
The hardware does not decode the 16, 20 or 24 bit variety. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/i2c/ir-kbd-i2c.c | 90 ++-- drivers/media/pci/cx18/cx18-i2c.c| 3 +- drivers/media/pci/cx88/cx88-input.c

[PATCH] v4l-utils: ir-ctl: deal with consecutive pulses or spaces correctly

2016-09-19 Thread Sean Young
When sending a pulse-space file with consecutive spaces or pulses, add them together correctly. For example: pulse 100 space 150 space 100 pulse 150 pulse 200 Would send pulse 100, space 250, and pulse 350. Signed-off-by: Sean Young <s...@mess.org> --- utils/ir-ctl/ir-ctl.c | 4 ++--

Re: [PATCH v2 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-09-02 Thread Sean Young
On Fri, Sep 02, 2016 at 02:27:08PM +0900, Andi Shyti wrote: > > Thanks Andi, this is looking great! > > Thanks Sean! With your reviews the whole thing looks much better > now :) > > I agree with all your points here, I will fix them. Can I add > your reviewd-by? Yes, ple

Re: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-09-02 Thread Sean Young
help at all, lirc already ensures that it waits as long as the IR is long (see schedule_repeat_timer in lirc). This change was introduced in 3.10, commit f8e00d5. Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 3/7] [media] rc-core: add support for IR raw transmitters

2016-09-01 Thread Sean Young
ce applications, therefore they > don't need any input device allocation, but still they need to be > registered as raw devices. > > Suggested-by: Sean Young <s...@mess.org> > Signed-off-by: Andi Shyti <andi.sh...@samsung.com> > --- > drivers/media/rc/rc-main.c | 39 ++

Re: [PATCH v2 1/7] [media] rc-main: assign driver type during allocation

2016-09-01 Thread Sean Young
be > set as RC_DRIVER_SCANCODE which was the default '0' value. > > Suggested-by: Sean Young <s...@mess.org> > Signed-off-by: Andi Shyti <andi.sh...@samsung.com> > --- ... > diff --git a/drivers/media/pci/cx88/cx88-input.c > b/drivers/media/pci/cx88/cx88-input.c

Re: [PATCH v2 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-09-01 Thread Sean Young
Thanks Andi, this is looking great! On Fri, Sep 02, 2016 at 02:16:29AM +0900, Andi Shyti wrote: > The ir-spi is a simple device driver which supports the > connection between an IR LED and the MOSI line of an SPI device. > > The driver, indeed, uses the SPI framework to stream the raw data >

Re: [RFC 5/7] [media] ir-lirc-codec: do not handle any buffer for raw transmitters

2016-07-21 Thread Sean Young
f this patch was merged as-is tizen would have to be changed anyway to use different ioctls. If that is true, can it switch to use pulse-space format in the same change? If LIRC_GET_FREQUENCY fails then it would be a main-line kernel, else the existent driver. I could not find the code in android.

Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-21 Thread Sean Young
obal in idata. It can be stack allocated for sync transfers. You might want to lock the spi bus. > With the mutex I would like to prevent different tasks to change > the value at the same time, it's an easy case, it shouldn't make > much difference. That's cargo-cult locking. It does not achi

[PATCH 1/2] [media] redrat3: remove hw_timeout member

2016-07-20 Thread Sean Young
This is a duplicate of the timeout in rc_dev. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 399f44d..4739bce

[PATCH 2/2] [media] redrat3: hardware-specific parameters

2016-07-20 Thread Sean Young
Add these options as module parameters for now; should other drivers need similar options we could add it to the LIRC api. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 50 +- 1 file changed, 49 insertions(+), 1 de

[PATCH] ir-ctl: give proper error message if transmitter does not exist

2016-07-20 Thread Sean Young
If a transmitter does not exist when setting using -e, you get the error: warning: /dev/lirc0: failed to set send transmitters: Success Signed-off-by: Sean Young <s...@mess.org> --- utils/ir-ctl/ir-ctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/ir-

Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-19 Thread Sean Young
On Wed, Jul 20, 2016 at 12:56:58AM +0900, Andi Shyti wrote: > The ir-spi is a simple device driver which supports the > connection between an IR LED and the MOSI line of an SPI device. > > The driver, indeed, uses the SPI framework to stream the raw data > provided by userspace through a

Re: [RFC 5/7] [media] ir-lirc-codec: do not handle any buffer for raw transmitters

2016-07-19 Thread Sean Young
like any other device, so data should be provided as an array of u32 alternating pulse-space. If your device does not handle input like that then convert it into that format in the driver. Every other driver has to do some sort of conversion of that kind. Thanks Sean > > Signed-off

Re: [RFC 3/7] [media] rc-core: add support for IR raw transmitters

2016-07-19 Thread Sean Young
ce applications, therefore they > don't need any input device allocation, but still they need to be > registered as raw devices. > > Suggested-by: Sean Young <s...@mess.org> > Signed-off-by: Andi Shyti <andi.sh...@samsung.com> > --- > drivers/media/rc/rc-main.c | 35

Re: [RFC 1/7] [media] rc-main: assign driver type during allocation

2016-07-19 Thread Sean Young
ere lots of issues that checkpatch.pl would pick in these series. > > Suggested-by: Sean Young <s...@mess.org> > Signed-off-by: Andi Shyti <andi.sh...@samsung.com> > --- > drivers/media/rc/rc-main.c | 4 +++- > include/media/rc-core.h| 2 +- > 2 files changed, 4 inse

Re: [PATCH 03/20] [media] lirc.h: remove several unused ioctls

2016-07-12 Thread Sean Young
On Tue, Jul 12, 2016 at 02:35:56PM +0100, Sean Young wrote: > On Tue, Jul 12, 2016 at 10:23:00AM -0300, Mauro Carvalho Chehab wrote: > > Em Tue, 12 Jul 2016 14:14:06 +0100 > > Sean Young <s...@mess.org> escreveu: > > > On Tue, Jul 12, 2016 at 09:41:57AM -0300, Mauro

Re: [PATCH 03/20] [media] lirc.h: remove several unused ioctls

2016-07-12 Thread Sean Young
On Tue, Jul 12, 2016 at 10:23:00AM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 12 Jul 2016 14:14:06 +0100 > Sean Young <s...@mess.org> escreveu: > > On Tue, Jul 12, 2016 at 09:41:57AM -0300, Mauro Carvalho Chehab wrote: -snip- > > > -#define LIRC_SET_REC_DUTY_CYCLE

Re: [PATCH 03/20] [media] lirc.h: remove several unused ioctls

2016-07-12 Thread Sean Young
_REC_CARRIER_RANGE _IOW('i', 0x001f, __u32) > > -#define LIRC_NOTIFY_DECODE _IO('i', 0x0020) Also remove LIRC_CAN_NOTIFY_DECODE. > - > -#define LIRC_SETUP_START _IO('i', 0x0021) > -#define LIRC_SETUP_END _IO('i',

Re: [PATCH 08/20] [media] doc-rst: document ioctl LIRC_GET_REC_MODE

2016-07-12 Thread Sean Young
e two are the only drivers that use LIRC_MODE_LIRCCODE at all. The lirc_sasem driver should be ported to rc-core, but I've never been able to find the hardware for it. When it is ported it won't need LIRCCODE any more. The lirc_zilog driver is just for sending and also should be ported to rc-core. The hardwar

[PATCH 3/5] [media] redrat3: fix timeout handling

2016-07-10 Thread Sean Young
The redrat3 sends an usb packet to the host either when the minimum pause or the timeout occurs, so we can always add a trailing space in our processing. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/redrat3.c | 48 +++--- 1 file c

[PATCH 4/5] [media] redrat3: make hardware timeout configurable

2016-07-10 Thread Sean Young
Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/ir-lirc-codec.c | 5 - drivers/media/rc/redrat3.c | 34 ++ include/media/rc-core.h | 3 +++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/i

[PATCH 5/5] [media] redrat3: add sysfs attributes for hardware specific options

2016-07-10 Thread Sean Young
Signed-off-by: Sean Young <s...@mess.org> --- Documentation/ABI/testing/sysfs-class-rc-redrat3 | 33 drivers/media/rc/redrat3.c | 200 +++ 2 files changed, 233 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-rc-redrat3

[PATCH] [V4L-UTILS] ir-ctl: add new tool for sending & receiving raw IR

2016-07-10 Thread Sean Young
of lirc drivers. Signed-off-by: Sean Young <s...@mess.org> --- configure.ac | 2 + include/media/lirc.h | 168 +++ utils/Makefile.am| 1 + utils/ir-ctl/.gitignore | 2 + utils/ir-ctl/Makefile.am | 6 + utils/ir-ctl/ir-ctl.1.in | 192 utils/ir-

[PATCH 2/5] [media] rc: make s_tx_carrier consistent

2016-07-10 Thread Sean Young
LIRC_SET_SEND_CARRIER should return 0 on success or -errno. Signed-off-by: Sean Young <s...@mess.org> --- Documentation/DocBook/media/v4l/lirc_device_interface.xml | 2 +- drivers/media/rc/ene_ir.c | 2 +- drivers/media/rc/igua

[PATCH 1/5] [media] rc: make s_tx_mask consistent

2016-07-10 Thread Sean Young
When s_tx_mask is given an invalid bitmask, the number of transmitters should be returned. See the LIRC_SET_TRANSMITTER_MASK lirc ioctl documentation. Signed-off-by: Sean Young <s...@mess.org> --- drivers/media/rc/mceusb.c | 6 ++ drivers/media/rc/winbond-cir.c | 4 2 files c

Re: [PATCH] media: rc: nuvoton: decrease size of raw event fifo

2016-07-06 Thread Sean Young
On Tue, Jul 05, 2016 at 07:48:34PM +0200, Heiner Kallweit wrote: > Am 05.07.2016 um 11:17 schrieb Sean Young: > > On Tue, Jul 05, 2016 at 08:05:16AM +0200, Heiner Kallweit wrote: > >> Am 04.07.2016 um 23:06 schrieb Sean Young: > >>> On Mon, Jul 04, 2016 at 10:51:50P

Re: [GIT PULL FOR v4.8] Various dvb/rc fixes/improvements

2016-07-05 Thread Sean Young
On Tue, Jul 05, 2016 at 12:25:17AM +0200, Hans Verkuil wrote: > On 07/04/2016 10:19 PM, Sean Young wrote: > > On Mon, Jul 04, 2016 at 01:54:56PM +0200, Hans Verkuil wrote: > >> Mauro, > >> > >> As requested, I'm helping out with reducing the backlog.

Re: [PATCH] media: rc: nuvoton: decrease size of raw event fifo

2016-07-05 Thread Sean Young
On Tue, Jul 05, 2016 at 08:05:16AM +0200, Heiner Kallweit wrote: > Am 04.07.2016 um 23:06 schrieb Sean Young: > > On Mon, Jul 04, 2016 at 10:51:50PM +0200, Heiner Kallweit wrote: > >> Am 04.07.2016 um 22:13 schrieb Sean Young: > >>> On Wed, May 18, 2016 at 10:29:41P

Re: [PATCH] media: rc: nuvoton: decrease size of raw event fifo

2016-07-04 Thread Sean Young
On Mon, Jul 04, 2016 at 10:51:50PM +0200, Heiner Kallweit wrote: > Am 04.07.2016 um 22:13 schrieb Sean Young: > > On Wed, May 18, 2016 at 10:29:41PM +0200, Heiner Kallweit wrote: > >> This chip has a 32 byte HW FIFO only. Therefore the default fifo size > >> of 512 raw e

<    4   5   6   7   8   9   10   11   >