Lirc and Mythtv with Debian buster

Configuring MCE remote with Debian buster using lirc 0.10.

General configuration from http://lirc.sourceforge.net/lirc.org/html/index.html.

Install and enable lirc

apt-get install lirc
systemctl enable lirc

/etc/lirc/lirc_options.conf should have

driver = default

Copy the mse remote control definition over

cp /usr/share/lirc/remotes/mceusb/lircd.conf.mceusb /etc/lirc/lircd.conf.d/mceusb.lircd.conf

restart lirc

systemctl restart lirc

$ mode2 --driver default --device /dev/lirc0
Using driver default on device /dev/lirc0
Trying device: /dev/lirc0
Using device: /dev/lirc0

And test with remove keypresses to see if anything is output.

Run irw and test (pressing OK should give):

$ irw
000000037ff07bdd 00 KEY_OK mceusb

Then create mythtv file for keymappings as in http://git.netscum.org.uk/stefan/mythtv_remote/src/master/mythtv in ~/.lircrc

Pressing OK on the remote while running ircat should now give:

$ ircat mythtv
Space

And it should work with mythtv

Odroid H2 HDMI sound

New Odroid-H2 running Debian Stretch but no sound via the HDMI connection even though the device is listed:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

It gives the following message at boot:

$ dmesg | grep hdmi

snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec

This is running the stock stretch kernel of 4.9.0 and it needs a more up to date kernel. So add

deb http://ftp.debian.org/debian stretch-backports main

to

/etc/apt/sources.list

Then do

$ sudo apt-get update
$ sudo apt-get -t stretch-backports upgrade

to upgrade any dependencies

Look for a suitable kernel:

$ aptitude search linux-image

and choose the one with the highest version number to install, eg

$ sudo apt-get -t stretch-backports install linux-image-4.18.0-0.bpo.3-amd64

Then reboot. This seems to change the card name from INTEL to PCH and the following now produces noise from the speakers via the HDMI cable

$ speaker-test -D hdmi:CARD=PCH,DEV=1 -c 2

The warnings about missing firmware seem related to power management and harmless here.

Odroid H2 rtl_nic

Warnings in dmesg for Odroid H2 when booting:

r8169 0000:02:00.0: firmware: failed to load rtl_nic/rtl8168g-2.fw (-2)
r8169 0000:02:00.0: Direct firmware load for rtl_nic/rtl8168g-2.fw failed with error -2
r8169 0000:03:00.0: firmware: failed to load rtl_nic/rtl8168g-2.fw (-2)
r8169 0000:03:00.0: Direct firmware load for rtl_nic/rtl8168g-2.fw failed with error -2

Make sure the following is in

/etc/apt/sources.list
deb http://ftp.uk.debian.org/debian/ stretch non-free
deb-src http://ftp.uk.debian.org/debian/ stretch non-free

Then do

sudo apt-get update
sudo apt-get install firmware-realtek

and reboot and the warning goes away