[mythtv-users] Major chnages to ir-keytable in v4l-utils version 1.20.0?

Tom Dexter digitalaudiorock at gmail.com
Sun Jan 24 14:09:24 UTC 2021


Wow did I just get burned. I've been using ir-keytable for MythTV
flawlessly for many years under Gentoo. Today, the update of
media-tv/v4l-utils and media-libs/libv4l from 1.16.6 to 1.20.0 broke
everything I'm doing. They also removed the old versions, and I just
spent all morning digging them up and putting them in my local repo to
get 1.16.6 back and everything's working again.

It appears there must have been very major changes in 1.20.0.

What I've always done is to use a script that runs at boot time to
load the keymap etc. What it does is to parse the output of the
ir-keytable command to find the entry for the driver I'm using
(currently iguanair), and figure out the correct /sys/class/rc/rcN
path and the correct input dev (/dev/input/eventN), and then to do
something like this:

echo nec > /sys/class/rc/rc1/protocols
/usr/bin/ir-keytable -D 1000 -P 900 -c -w /etc/rc_keymaps/tivo34_nec
-d /dev/input/event2

Like I say...this has worked for years. Part of what changed is the
format of the ir-keytable output, which tripped up the parsing in my
script. But even when I fixed that, the above ir-keytable command
failed with this error:

/usr/bin/ir-keytable -p nec -D 1000 -P 900 -c -w
/etc/rc_keymaps/tivo34_nec -d /dev/input/event2
Missing protocol in /etc/rc_keymaps/tivo34_nec
ir-keytable: Failed to read table file /etc/rc_keymaps/tivo34_nec
Try `ir-keytable --help' or `ir-keytable --usage' for more information.

Apparently the keytable file needs the protocol now. Mine has never
had anything but the scan codes, like this:

cat /etc/rc_keymaps/tivo34_nec
0x3085c031	KEY_0
0x3085d028	KEY_1
0x3085d029	KEY_2
0x3085d02a	KEY_3
0x3085d02b	KEY_4
...etc...

I see there's a new man page "man rc_keymap" that describes the file
as being in toml format with the protocols and the scan codes. I'm
just starting to understand what it appears they want there. What
sucks is that updating to 1.20.0 again in order to screw around with
that requires downtime for the frontend that we use a lot.

Like I said, I *think* I understand for format, but if anyone else is
familiar with this, here's what I also need to understand:

If I have the "nec" format defined in that key table, does that mean
it's no longer necessary for me to manually write it to the
/sys/class/rc/rcN/protocols as I've been doing?

Thanks!
Tom


More information about the mythtv-users mailing list