You are not logged in.

#1 2021-01-12 21:13:32

Krokodil
Member
Registered: 2021-01-12
Posts: 3

ALSA will not detect HDMI audio device

I recently installed Arch to a new system, and I can't figure out what to do to get it to recognize my HDMI audio device. I have tried both attempting to set the default device in asoundrc and in modprobe.d and neither were able to accomplish the task.

$ cat /proc/asound/cards
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfcb00000 irq 116
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfcca0000 irq 114

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 0: ALCS1200A Analog [ALCS1200A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 1: ALCS1200A Digital [ALCS1200A Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

From this I can tell that the sound card that I wish to be using is card 1 (HDMI) and device 3. When I look at the settings for card 1 in alsamixer, I see no volume controls for the hdmi device, only a S/PDIF toggle. Following the advice on the wiki and in https://bbs.archlinux.org/viewtopic.php?id=185675, I attempted modifying /etc/asound.conf and ~/.asoundrc to contain

defaults.pcm.card 1
defaults.ctl.card 1

and

defaults.pcm.device 3
defaults.ctl.device 3

with no luck. Upon attempting a speaker test with -D HDMI, I receive the following error.

Playback device is HDMI
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory

In following with the linked topic, I also attempted to perform the modification

$ cat /etc/modprobe.d/50-alsa.conf
options snd-hda-intel index=0,1

as they both use snd-hda-intel, and HDMI is first on the PCI/hardware bus placement. However, this also had no effect. I am rather stuck at this point, and any assistance would be much appreciated.

Offline

#2 2021-01-12 21:42:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: ALSA will not detect HDMI audio device

Which device the actual sound producing one is depends on the port you plugged your HDMI into. See for a suggestion for identifying this no clue if or how this would map to AMD

A surefire albeit tedious way would be to try and identify the correct device, either use the hdmi pcms (as exposed by aplay -L ) or just go through them by number, e.g.

speaker-test -c2 -Dhw:1,3
speaker-test -c2 -Dhw:1,7
speaker-test -c2 -Dhw:1,8
...

Map the identified combination in a relevant ALSA conf

Last edited by V1del (2021-01-12 21:43:44)

Offline

#3 2021-01-12 22:20:00

Krokodil
Member
Registered: 2021-01-12
Posts: 3

Re: ALSA will not detect HDMI audio device

Thank you for the information. I was able to identify using the method described in this post that the device for which monitor_present = 1 is hw:1,3. However, that is the card/device combination that I have already been using in my .asoundrc configuration file, and running

speaker-test -c2 -Dhw:1,3

produces no sound. For good measure, I ran speaker-test for all other possible combinations ([1,7], [1,8], [1,9], [1,10] and [1,11]), and none of them produced any sound either.

When using pacmd list-cards, I am shown that I have only one card available (alsa_card.pci-0000_0b_00.1) and setting that as the default sink using pacmd does not seem to have had any noticeable effect. Could there perhaps be another setting that I would need to change in order to fix this issue?

Last edited by Krokodil (2021-01-12 22:20:39)

Offline

#4 2021-01-12 23:18:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: ALSA will not detect HDMI audio device

Does it actually work, as in it tries to play back but there's simply no audible noise?

Does your monitor have HDMI output in the first place ? Any messages in dmesg when this doesn't work? Which actual card and kernel driver is this, also xorg or wayland? I've heard reports that wayland has issues here for some reason. The relevant SPDIF control in alsamixer is set to OO ?

Last edited by V1del (2021-01-12 23:19:12)

Offline

#5 2021-01-13 02:22:57

Krokodil
Member
Registered: 2021-01-12
Posts: 3

Re: ALSA will not detect HDMI audio device

Yes, that is correct, the program displays no errors in terminal, but I get no sound from it.

I am certain that my monitor does have HDMI output, I have tested it with a windows machine and it works fine. The card and kernel driver are "HDA ATI HDMI" and snd_hda_intel, respectively, and I am using xorg. I am not sure what you mean regarding alsamixer, because as far as I can tell, the program does not allow me to modify any settings for that card.

When I try to run the sound test, I get the following message in dmesg:

snd_hda_intel 0000:0b:00.1: IRQ timing workaround is activated for card #1. Suggest a bigger bdl_pos_adj.

Upon googling the message, I came onto a page that suggested modifying the value of bld_pos_adj in /sys/module/snd_hda_intel. I tried doing that, increasing the values by a factor of 2 and testing the sound-test after, but even with a value of 64, (as opposed to the default of -1), the sound test still didn't produce any sound. Should I try to keep increasing the value, or is there another location I should be looking at instead?

Offline

#6 2022-09-17 09:53:25

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 170

Re: ALSA will not detect HDMI audio device

I have a very similar - if not the same problem.

$ cat /proc/asound/cards    
 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfe960000 irq 65
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfe800000 irq 67

$ aplay -l                  
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 8: HDMI 2 [XF270HU]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 9: HDMI 3 [LG TV]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Going through speaker-test, the DisplayPort monotor with speakers on 0,8 works fine as well as headphones and line out on 1,0 and 1,1. But the HDMI connected TV on 0,9 doesn't.
There are no errors, simply no sound. I tried the same hdmi cable with a macbook and that worked fine, so this is not a TV issue.

All six S/PDIF divices (0 through 5) are set to OO.

One thing to note is that when selecting an output device with KDE's audio volume widget, it's built in small progress/VU meter looks like it's working normally - almost like I simply had muted my TV, but it is definitely not muted.

Also a thing to note: when I was testing the sound with youtube playback, and playing around with the plasma volume widget, it did funny things to the playback speed. Sometimes it doubled the speed of the video, sometimes it halved it. But I couldn't get it to play on the TV.

$ uname -roms
Linux 5.19.9-arch1-1 x86_64 GNU/Linux

Last edited by JonnyRobbie (2022-09-17 09:53:59)

Offline

#7 2022-09-20 10:23:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: ALSA will not detect HDMI audio device

What's your refresh rate on the TV? There are/used to be driver bugs if you tried to drive a non-60Hz refresh rate and have audio out, especially so on HDMI because it is quite fickle in that regard.

Last edited by V1del (2022-09-20 10:24:09)

Offline

#8 2022-09-20 19:48:36

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 170

Re: ALSA will not detect HDMI audio device

The HTMI TV is set to 60Hz. I do have a 144Hz monitor on my DP though. I've tried to change my monitor to 60Hz to match it to tv, but no difference. No audio output.

Offline

Board footer

Powered by FluxBB