You are not logged in.
A quirk that I've been noticing on my system for a while now is that playing audio via the HDMI cable on my Radeon 5450 doesn't work just after my system has booted (i.e. on the tty console, I do startx manually). Alsamixer doesn't show the output as being muted, and application that play sound (such as aplay /dev/urandom) don't throw an error, but nothing is heard from my monitor's speakers.
Now, if I run startx and try playing audio in an xterm, it starts working. It continues to work if I quit my X session, up until I reboot my system. I've tried weston as well, because that does DRI modesetting like Xorg does, but sound refuses to work if I run that; no matter what I do, no sound can be heard from the monitor speakers until Xorg has run at least once.
I figured it must be something that specifically Xorg does when it detects HDMI outputs as it starts up. This would seem to be supported by the fact that it's possible to mute the audio out for a HDMI output connector via an xrandr command, like so:
xrandr --output HDMI-0 --set audio off
(and likewise with "on" for enabling again).
Another interesting pointer is a control shown by
amixer controls
when ran against the HDMI audio "card", called "HDMI/DP,pcm=3 Jack". The value of this control is "off" when ran before Xorg is started (i.e. no sound), and "on" after Xorg is run (i.e. sound working). This would suggest that the audio "jack" for this output is not detected, despite the fact that there's a HDMI monitor plugged in.
Has anyone else encountered a similar situation with the HDMI audio out on radeon cards? And if so, how did you fix it? Is there a tool somewhere that can do what Xorg seems to do without needing to startx (i.e. NOT xrandr)?
I realize that for most people, audio will only be played after a graphical X session was started anyway (i.e. a music player application), but Xorg won't be the main windowing system forever, and sometimes I like playing music on my console without having to startx (currently using the motherboard's onboard sound until I can fix this), so starting and quitting Xorg just to "unmute" the audio on the HDMI connector seems a long-winded workaround. Plus, it seems quite strange that the kernel can do modesetting on the HDMI display just fine but seems to need a userspace application to tell it when to enable the audio part.
Any pointers, info or docs as to why this is a thing or how to work around it (without Xorg, please ) would be appreciated.
(NB: I've tried looking at the Xorg source code, the result was me getting lost in there with a headache >.< )
Cheers, D^2
EDIT: A bit more poking around:
- Changing the DDX (i.e. to something like xf86-video-modesetting) doesn't affect the sound starting to work after Xorg is run; it would seem this rules out anything weird poking done by xf86-video-ati, so it looks more like the sound enabling does happen at the xrandr level.
- The adformentioned amixer control for jack detection is a read-only property, I can't set it using amixer ("Operation not permitted").
Last edited by deltasquared (2014-12-07 10:26:17)
Offline