So, this has been bugging me for a few weeks now and I can't seem to find the root cause.
Starting with the switch to v10 (currently running 9.97.1 Generic.x86_64 but had this with several 9.9x releases) LibreELEC on my Intel NUC8i5BEH2 will not detect any HDMI audio devices and default to Pulse Audio (I've disabled Bluetooth in the BIOS and LibreELEC settings, still seems to be the fallback if nothing else exists)
This happens at random and independent of any Kodi Audio settings or state of my TV or Audio receiver.
With LibreELEC 9.x I had this on a very rare occasion and just restarting usually fixed it, but this became worse with 9.95.1 and now 9.97.1 where maybe 1/20 boots will detect HDMI audio and 19/20 will not
I've tried the good ol' process of elimination by going through different device states (AVR off -> start libreelec -> AVR on| AVR on -> start libreelec | AVR on -> reboot libreelec | AVR off -> reboot libreelec -> AVR on | etc), trying to exclude my peripherals from being an issue and by now I'm pretty sure it's not related to tha cable or AVR.
02_System.log also does show issues with snd_hda_codec_generic and snd_hda_codec_hdmi (see log sample below) but that's where my unix skills leave me and I'm hoping some of you can point me in the right directions
My setup:
TV <- HDMI 2.1 cable via ARC channel -> Marantz NR1506 <- HDMI 2.1 cable -> Intel NUC8i5BEH2 with LibreELEC 10 9.97.1
[ 3.776136] snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: last cmd=0x00cb0001
[ 4.782812] snd_hda_intel 0000:00:1f.3: No response from codec, disabling MSI: last cmd=0x00cb0001
[ 5.789473] snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to single_cmd mode: last cmd=0x00cb0001
[ 5.797590] snd_hda_codec_realtek: probe of hdaudioC0D0 failed with error -5
[ 5.798733] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC233: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:hp
[ 5.798736] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.798737] snd_hda_codec_realtek hdaudioC0D0: hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.798738] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 5.798739] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 5.798741] snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
[ 5.801766] snd_hda_codec_realtek hdaudioC0D0: rates == 0 (nid=0x8, val=0x0, ovrd=1)
[ 5.801767] snd_hda_codec_realtek hdaudioC0D0: fail to setup default for PCM ALC233 Analog
[ 5.801775] snd_hda_codec_realtek: probe of hdaudioC0D0 failed with error -5
[ 5.803588] snd_hda_codec_generic hdaudioC0D0: autoconfig for Generic: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:hp
[ 5.803591] snd_hda_codec_generic hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.803593] snd_hda_codec_generic hdaudioC0D0: hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.803594] snd_hda_codec_generic hdaudioC0D0: mono: mono_out=0x0
[ 5.803595] snd_hda_codec_generic hdaudioC0D0: inputs:
[ 5.803597] snd_hda_codec_generic hdaudioC0D0: Mic=0x19
[ 5.806242] snd_hda_codec_generic hdaudioC0D0: rates == 0 (nid=0x8, val=0x0, ovrd=1)
[ 5.806244] snd_hda_codec_generic hdaudioC0D0: fail to setup default for PCM Generic Analog
[ 5.806252] snd_hda_codec_generic: probe of hdaudioC0D0 failed with error -5
[ 5.806256] hdaudio hdaudioC0D0: Unable to bind the codec
[ 5.812672] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.812774] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.812876] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.812977] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.812985] snd_hda_codec_hdmi: probe of hdaudioC0D2 failed with error -22
[ 5.813642] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.813744] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.813846] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.813947] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.813952] snd_hda_codec_hdmi: probe of hdaudioC0D2 failed with error -22
[ 5.815228] snd_hda_codec_hdmi hdaudioC0D2: HDMI: failed to get afg sub nodes
[ 5.815236] snd_hda_codec_hdmi: probe of hdaudioC0D2 failed with error -22
[ 5.816474] snd_hda_codec_generic hdaudioC0D2: autoconfig for Generic: line_outs=0 (0x0/0x0/0x0/0x0/0x0) type:line
[ 5.816477] snd_hda_codec_generic hdaudioC0D2: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.816479] snd_hda_codec_generic hdaudioC0D2: hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.816481] snd_hda_codec_generic hdaudioC0D2: mono: mono_out=0x0
[ 5.816482] snd_hda_codec_generic hdaudioC0D2: dig-out=0x3/0x0
[ 5.816484] snd_hda_codec_generic hdaudioC0D2: inputs:
[ 5.817455] snd_hda_codec_generic: probe of hdaudioC0D2 failed with error -5
[ 5.817460] hdaudio hdaudioC0D2: Unable to bind the codec
...
################################################################################
# ... output of lsmod
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
Module Size Used by
8021q 24576 0
snd_hda_codec_hdmi 61440 0
iwlmvm 323584 0
mac80211 688128 1 iwlmvm
iwlwifi 303104 1 iwlmvm
wl 6385664 0
ir_nec_decoder 20480 0
snd_hda_codec_realtek 122880 0
^^^ on a successful boot both show "Used By 1"
Display More
################################################################################
# ... output of aplay -l
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
################################################################################
# ... output of aplay -L
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
null
Discard all samples (playback) or generate zero samples (capture)
################################################################################
# ... output of amixer
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
Display More
################################################################################
# ... output of aplay -l
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC233 Analog [ALC233 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
################################################################################
# ... output of aplay -L
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
HDA Intel PCH, ALC233 Analog
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, ALC233 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC233 Analog
Front output / input
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC233 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC233 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC233 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC233 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC233 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC233 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, HDMI 0
HDMI Audio Output
hdmi:CARD=PCH,DEV=1
HDA Intel PCH, HDMI 1
HDMI Audio Output
hdmi:CARD=PCH,DEV=2
HDA Intel PCH, HDMI 2
HDMI Audio Output
hdmi:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 3
HDMI Audio Output
hdmi:CARD=PCH,DEV=4
HDA Intel PCH, HDMI 4
HDMI Audio Output
################################################################################
# ... output of amixer
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
Simple mixer control 'Master',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 87 [100%] [0.00dB] [on]
Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 255 [100%] [0.00dB]
Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 0 [0%] [-34.50dB] [off]
Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Bxxst',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%] [0.00dB]
Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',1
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',2
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',3
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',4
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'Beep',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 0 [0%] [-34.50dB] [off]
Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 0 [0%] [-17.25dB] [off]
Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Loopback Mixing',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Disabled'
Display More
################################################################################
# ... output of cat /proc/bus/input/devices
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=4000 0 0
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input3
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0
I: Bus=0003 Vendor=20a0 Product=0006 Version=0101
N: Name="flirc.tv flirc Keyboard"
P: Phys=usb-0000:00:14.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:20A0:0006.0002/input/input4
U: Uniq=
H: Handlers=sysrq kbd event4
B: PROP=0
B: EV=100013
B: KEY=e080ffdf01cfffff fffffffffffffffe
B: MSC=10
I: Bus=0003 Vendor=20a0 Product=0006 Version=0101
N: Name="flirc.tv flirc Consumer Control"
P: Phys=usb-0000:00:14.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:20A0:0006.0002/input/input5
U: Uniq=
H: Handlers=kbd event5
B: PROP=0
B: EV=1f
B: KEY=302ff 0 0 483ffff17aff32d bfd4444600000000 1 130c730b17c000 267bfad9415fed 9e168000004400 10000002
B: REL=1040
B: ABS=100000000
B: MSC=10
I: Bus=0003 Vendor=20a0 Product=0006 Version=0101
N: Name="flirc.tv flirc System Control"
P: Phys=usb-0000:00:14.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:20A0:0006.0002/input/input6
U: Uniq=
H: Handlers=kbd event6
B: PROP=0
B: EV=13
B: KEY=c000 10000000000000 0
B: MSC=10
I: Bus=0019 Vendor=1283 Product=0000 Version=0000
N: Name="ITE8708 CIR transceiver"
P: Phys=
S: Sysfs=/devices/virtual/rc/rc0/input7
U: Uniq=
H: Handlers=kbd event7
B: PROP=20
B: EV=100017
B: KEY=fff 0 4200108fc32e 237605100000000 0 700158000 419200004001 8e968000000000 10000ffc
B: REL=3
B: MSC=10
I: Bus=0019 Vendor=1283 Product=0000 Version=0000
N: Name="eventlircd"
P: Phys=/dev/input/event7
S: Sysfs=/devices/virtual/input/input9
U: Uniq=
H: Handlers=event8
B: PROP=0
B: EV=5
B: REL=3
Display More
################################################################################
# ... output of cat /proc/bus/input/devices
# LibreELEC release: Generic.x86_64-9.97.1
#
################################################################################
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input0
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=3
B: KEY=4000 0 0
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input3
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0
I: Bus=0003 Vendor=20a0 Product=0006 Version=0101
N: Name="flirc.tv flirc Keyboard"
P: Phys=usb-0000:00:14.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:20A0:0006.0002/input/input4
U: Uniq=
H: Handlers=sysrq kbd event4
B: PROP=0
B: EV=100013
B: KEY=e080ffdf01cfffff fffffffffffffffe
B: MSC=10
I: Bus=0003 Vendor=20a0 Product=0006 Version=0101
N: Name="flirc.tv flirc Consumer Control"
P: Phys=usb-0000:00:14.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:20A0:0006.0002/input/input5
U: Uniq=
H: Handlers=kbd event5
B: PROP=0
B: EV=1f
B: KEY=302ff 0 0 483ffff17aff32d bfd4444600000000 1 130c730b17c000 267bfad9415fed 9e168000004400 10000002
B: REL=1040
B: ABS=100000000
B: MSC=10
I: Bus=0003 Vendor=20a0 Product=0006 Version=0101
N: Name="flirc.tv flirc System Control"
P: Phys=usb-0000:00:14.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:20A0:0006.0002/input/input6
U: Uniq=
H: Handlers=kbd event6
B: PROP=0
B: EV=13
B: KEY=c000 10000000000000 0
B: MSC=10
I: Bus=0019 Vendor=1283 Product=0000 Version=0000
N: Name="ITE8708 CIR transceiver"
P: Phys=
S: Sysfs=/devices/virtual/rc/rc0/input7
U: Uniq=
H: Handlers=kbd event7
B: PROP=20
B: EV=100017
B: KEY=fff 0 4200108fc32e 237605100000000 0 700158000 419200004001 8e968000000000 10000ffc
B: REL=3
B: MSC=10
I: Bus=0001 Vendor=10ec Product=0235 Version=0001
N: Name="HDA Digital PCBeep"
P: Phys=card0/codec#0/beep0
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input8
U: Uniq=
H: Handlers=kbd event8
B: PROP=0
B: EV=40001
B: SND=6
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH Mic"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input9
U: Uniq=
H: Handlers=event9
B: PROP=0
B: EV=21
B: SW=10
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH Front Headphone"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input10
U: Uniq=
H: Handlers=event10
B: PROP=0
B: EV=21
B: SW=4
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=3"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input11
U: Uniq=
H: Handlers=event11
B: PROP=0
B: EV=21
B: SW=140
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=7"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input12
U: Uniq=
H: Handlers=event12
B: PROP=0
B: EV=21
B: SW=140
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=8"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input13
U: Uniq=
H: Handlers=event13
B: PROP=0
B: EV=21
B: SW=140
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=9"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input14
U: Uniq=
H: Handlers=event14
B: PROP=0
B: EV=21
B: SW=140
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel PCH HDMI/DP,pcm=10"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/sound/card0/input15
U: Uniq=
H: Handlers=event15
B: PROP=0
B: EV=21
B: SW=140
I: Bus=0019 Vendor=1283 Product=0000 Version=0000
N: Name="eventlircd"
P: Phys=/dev/input/event7
S: Sysfs=/devices/virtual/input/input16
U: Uniq=
H: Handlers=event16
B: PROP=0
B: EV=5
B: REL=3
Display More