You are not logged in.
I'm setting up a new system with hdmi only output and I must be missing some step to get audio. The hdmi cable is connected to a monitor with built in speakers which worked well when booting windows (which was preinstalled but now gone).
Now that arch is installed, I have no sound. alsamixer shows only a single sound card with 5 controls (S/PDIF, S/PDIF 1, ... S/PDIF 4) each of which only has a mute / unmute toggle (no volume). All are unmuted. This is consistent with the devices shown by `aplay -l`:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
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
I've tried various invocations of speaker-test to no avail:
$ speaker-test -c 2
speaker-test 1.2.5.1
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1035:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
The results above are similar with no ~/.asoundrc, or with content of that file matching several different recommended configurations including the one below.
$ cat ~/.asoundrc
defaults.pcm.!card "PCH"
defaults.ctl.!card "PCH"
Any help would be appreciated as I've never had audio over HDMI before and I'm not really sure where to start.
Last edited by Trilby (2021-07-21 14:36:45)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
https://wiki.gentoo.org/wiki/ALSA#S.2FPDIF
You probably also want softvol, eg. https://wiki.archlinux.org/title/TerraT … me_control
Online
With the .asoundr from the gentoo page I get output like the following from speaker-test (regardless of the number of channels specified with the -c flag):
$ speaker-test -c 2
speaker-test 1.2.5.1
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 8544000
Period size range from 32 to 4272000
Using max buffer size 8544000
Periods = 4
Unable to set hw params for playback: Cannot allocate memory
Setting of hwparams failed: Cannot allocate memory
I'm not sure that section is really relevant as the gentoo-page's asoundrc is to address problems specific to some applications:
With a default installed ALSA installation, it is possible for a S/PDIF or HDMI connection to work out of the box (no .asoundrc file alterations). While only some applications, such as the web browser's Adobe Flash plugin will fail playing sound. As such, the below .asoundrc is usually required
EDIT: scratch that, with the gentoo asoundrc aplay does work, just speaker-test fails as above. I'll do a bit more testing.
Mine doesn't work "out of the box" - I'm not trying to get sound to work better or with more applications, I simply have no sound at all yet even from speaker-test / aplay.
Last edited by Trilby (2021-07-21 14:22:11)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Unable to set hw params for playback: Cannot allocate memory
Setting of hwparams failed: Cannot allocate memory
https://bugzilla.redhat.com/show_bug.cgi?id=1959169 ?
Mine doesn't work "out of the box"
hdmi/gpu related errors in dmesg?
Online
The gentoo asoundrc does indeed seem to work except for speaker-test (aplay works, browser audio works). It took a little trial and error to merge the softvol example and the spdif gentoo example, but this now works for all my needs: I have working sound and the ability to adjust volume:
pcm.!spdif {
type hw
card 0
device 3
}
pcm.!softvol {
type softvol
slave.pcm "spdif"
control {
name "Master"
card 0
}
}
pcm.!default {
type plug
slave.pcm "softvol"
}
speaker-test still doesn't work (odd), and the command from the redhat bug didn't have any apparent affect with or without the asoundrc.
Thanks for pointing me to the gentoo page, that was the fix I need.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The above asoundrc can, apparently, be drastically simplified for the same result:
pcm.!default {
type softvol
slave.pcm hdmi:PCH
control {
name "Master"
card 0
}
}
This has *almost* everything working. But I'm not having any luck with zoom. There are two zoom clients in the AUR, one of them picks up my microphone, but doesn't recognize any audio output devices; the other finds the hdmi audio output, but can't connect to my microphone. Zoom sucks ... but everyone expects it to be used.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
https://aur.archlinux.org/packages/zoom/#pinned-752571
alsa or pulsenoaudio?
Online
Somehow I missed that last post w/ link.
I just came back here to report I threw in the towel and switched to pulseaudio. I really don't like PA because it is a mysterious black box that is supposed to "just work" - the problem with such systems is if / when they don't work, it's harder to do anything about it. However, in my case, I couldn't get alsa working sufficiently. The config setting for zoom from the link above made zoom crash on startup 100% of the time (as opposed to the roughly 50% of the time it does otherwise). So that didn't work for me.
Pulseadio, however, is working perfectly (for the moment) including with zoom.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I've had luck with apulse when trying to run Microsoft Teams which wouldn't recognize the microphone / would crash with ALSA only. apulse solved those issues for me, maybe it would work with zoom too.
Last edited by karabaja4 (2021-08-02 16:00:42)
Offline