# app-misc/lirc and kernel 4.16

## P.Kosunen

What has chanced in lirc with 4.16 kernel, CONFIG_IR_LIRC_CODEC is missing?

```
# grep LIRC linux-4.15.15-gentoo/.config

CONFIG_LIRC=m

CONFIG_IR_LIRC_CODEC=m
```

```
# grep LIRC linux-4.16.2-gentoo/.config

CONFIG_LIRC=y 
```

----------

## Hu

According to git, it was removed in media: lirc: lirc interface should not be a raw decoder.

```
$ git log --oneline -GIR_LIRC_CODEC v4.15..v4.16 -- '*Kconfig*'

a60d64b15c20 media: lirc: lirc interface should not be a raw decoder
```

----------

## P.Kosunen

I sent message to lirc mailing list:

 *Quote:*   

> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a60d64b15c20d178ba3a9bc3a542492b4ddeea70
> 
> Kernel config option missing for lirc protocol might not be related to issue, syslog shows:
> 
> Apr 21 14:14:09 beebox lircd-0.11.0-devel[3075]: Notice: 'lirc' written to protocols file /sys/class/rc/rc0/protocols
> ...

 

How can i test if nuvoton-cir is working properly?

----------

## Saundersx

Im in the same boat, just upgraded to 4.16.7 from 4.15 and lost lirc. I have a hauppauge dvb card that is only used as a remote now and cannot get it to receive anything.

```
$ ir-keytable

Found /sys/class/rc/rc0/ (/dev/input/event14) with:

        Name: cx88 IR (Hauppauge Nova-S-Plus 

        Driver: cx88xx, table: rc-hauppauge

        lirc device: /dev/lirc0

        Supported protocols: lirc rc-5 rc-5-sz 

        Enabled protocols: lirc rc-5 

        bus: 1, vendor/product: 0070:9202, version: 0x0001

        Repeat delay = 500 ms, repeat period = 125 ms
```

this is definitely flakey

```
$ mode2 --driver devinput --list-devices

/dev/input/event14 [(null):(null)] ? ? version: ? serial: ?

/dev/input/by-path/pci-0000:04:06.2-event-ir -> ../event14

/dev/input/irremote -> event14
```

irw aside just doing "cat /dev/input/event14" returns nothing. Looking at dmesg everything loads fine. I'm at a loss at what the problem could be.

----------

## mymatenige

Hi,

I don't want to add a "me too" post, but I'm experiencing this as well.  Has anyone identified a resolution or alternatively understand the cause?

Thanks,

Nige

----------

## Saundersx

Not fixed in 4.17.2 . Still not sure if this is an lirc issue or kernel one.

----------

## Saundersx

And fixed in 4.17.3 . I'm willing to bet it was this commit that fixed it.

```

commit b72cee00bc77e8cf07dcaa14e751b813342fe3f5

Author: Sean Young <sean@mess.org>

Date:   Thu May 24 05:47:17 2018 -0400

    media: rc: ensure input/lirc device can be opened after register

    

    commit d7832cd2a3c87eb6ae1e802c88b6fc56c5823f6d upstream.

    

    Since commit cb84343fced1 ("media: lirc: do not call close() or open() on

    unregistered devices") rc_open() will return -ENODEV if rcdev->registered

    is false. Ensure this is set before we register the input device and the

    lirc device, else we have a short window where the neither the lirc or

    input device can be opened.

    

    Fixes: cb84343fced1 ("media: lirc: do not call close() or open() on unregistered devices")

    

    Cc: stable@vger.kernel.org # v4.16+

    Signed-off-by: Sean Young <sean@mess.org>

    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```

----------

## P.Kosunen

 *Saundersx wrote:*   

> And fixed in 4.17.3 .

 

This kernel works also for me, had to enable LIRC user interface from menuconfig, option to compile as module was gone.

----------

