I expected to be playing on (or finished with) my VT-d enabled VM by now, but instead I've run into a weird issue with my integrated Intel GPU and how it's sending audio to my system. This is an issue in Linux for sure, but from what I'm reading this issue could also be found in Windows (although I haven't tested yet).
I have ALSA and pulseaudio installed (latest stable in arch). I have sound coming to the speakers, but the problem first shows up when I open Sound Preferences. First the devices shown in this list don't reflect what I see from other methods (more on that later). I see three devices: HDMI, SPDIF, and headphones. I have done no testing on SPDIF, but the headphones audio works perfectly. For the HDMI device, I need to select the digital 5.1 profile for anything to work regardless of the fact that my display is only 2.0. Then when I select Test Speakers, I only get output from two channels. The issue though is these channels are seemingly randomly assigned to the 6 different 5.1 channels. The assignment seems to get changes on restarts, but it possibly changes on other events.
The behavior above is when this portion of the test works. Other times (on subsequent reboots, after testing playback through other methods, etc.) none of the channels play back anything using the Sound Preferences window. I think this tool is pretty lame especially compared to some of the other methods I've tried, like aplay and speaker-test commands
The output of aplay -L is:
The device that I need to have work for HDMI is 'hdmi:CARD=HDMI,DEV=2' above. The output of aplay -l is:
My HDMI device above is the third HDMI device listed, i.e. 'card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]'. The issue I'm having shows up when I send a sound test to that device (either through speaker-test -c 6 -r 48000 -Dhw:0,8 or speaker-test -c 6 -r 48000 -Ddefault). Most of the time I get audio playback on two channels (one per speaker), but these seem to be mapped randomly. Other times I get no audio playback, even during the same session (without rebooting or changing any settings).
First I tried editing settings in pulseaudio /etc/pulse directory, but the underlying problem showing up in ALSA remained. Then I made sure everything looked right in alsamixer, which it does. Something interesting there was that I found the device which is tied to my HDMI audio output there is labeled S/PDIF 2 which is obviously wrong. Nevertheless, my HDA Intel HDMI card shows up as having only three playback settings: S/PDIF, S/PDIF 1, and S/PDIF 2. When I toggle mute on S/PDIF 2 it has the expected outcome on audio.
Then I tried creating a .asoundrc file and doing some of the things mentioned in the above gentoo link to switch channels. I don't think this had an effect. When I reboot the channels are different, but as I mentioned they are random after a reboot anyway.
The other related issue is playback of audio in other regular apps (browser, etc.). I've done one test to ensure I can actually get something to hear from other apps, and that is to bring up Steam and play a video from one of the app stores. This does play audio, but the quality is not bearable. 9/10 seconds there is no sound, but the short bursts of time that it is playing back something it sounds fine. It just seems as though the HDMI output is trying to start something up, and when it finally does something else has given up and decided to retry the process. The last paragraph in this section reminds me of this issue: ALSA - Gentoo Wiki
There's probably more I could add to this issue, but I've spent all afternoon night trying to work this out and I'm ready to do something else. If there are any questions let me know.
I have ALSA and pulseaudio installed (latest stable in arch). I have sound coming to the speakers, but the problem first shows up when I open Sound Preferences. First the devices shown in this list don't reflect what I see from other methods (more on that later). I see three devices: HDMI, SPDIF, and headphones. I have done no testing on SPDIF, but the headphones audio works perfectly. For the HDMI device, I need to select the digital 5.1 profile for anything to work regardless of the fact that my display is only 2.0. Then when I select Test Speakers, I only get output from two channels. The issue though is these channels are seemingly randomly assigned to the 6 different 5.1 channels. The assignment seems to get changes on restarts, but it possibly changes on other events.
The behavior above is when this portion of the test works. Other times (on subsequent reboots, after testing playback through other methods, etc.) none of the channels play back anything using the Sound Preferences window. I think this tool is pretty lame especially compared to some of the other methods I've tried, like aplay and speaker-test commands
The output of aplay -L is:
Code:
null Discard all samples (playback) or generate zero samples (capture) pulse PulseAudio Sound Server default Default ALSA Output (currently PulseAudio Sound Server) hdmi:CARD=HDMI,DEV=0 HDA Intel HDMI, HDMI 0 HDMI Audio Output hdmi:CARD=HDMI,DEV=1 HDA Intel HDMI, HDMI 1 HDMI Audio Output hdmi:CARD=HDMI,DEV=2 HDA Intel HDMI, HDMI 2 HDMI Audio Output sysdefault:CARD=Intel HDA Intel, ALC1150 Analog Default Audio Device front:CARD=Intel,DEV=0 HDA Intel, ALC1150 Analog Front speakers surround40:CARD=Intel,DEV=0 HDA Intel, ALC1150 Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=Intel,DEV=0 HDA Intel, ALC1150 Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Intel,DEV=0 HDA Intel, ALC1150 Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Intel,DEV=0 HDA Intel, ALC1150 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Intel,DEV=0 HDA Intel, ALC1150 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=Intel,DEV=0 HDA Intel, ALC1150 Digital IEC958 (S/PDIF) Digital Audio Output
Code:
**** List of PLAYBACK Hardware Devices **** card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2] Subdevices: 0/1 Subdevice #0: subdevice #0 card 1: Intel [HDA Intel], device 0: ALC1150 Analog [ALC1150 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Intel [HDA Intel], device 1: ALC1150 Digital [ALC1150 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0
First I tried editing settings in pulseaudio /etc/pulse directory, but the underlying problem showing up in ALSA remained. Then I made sure everything looked right in alsamixer, which it does. Something interesting there was that I found the device which is tied to my HDMI audio output there is labeled S/PDIF 2 which is obviously wrong. Nevertheless, my HDA Intel HDMI card shows up as having only three playback settings: S/PDIF, S/PDIF 1, and S/PDIF 2. When I toggle mute on S/PDIF 2 it has the expected outcome on audio.
Then I tried creating a .asoundrc file and doing some of the things mentioned in the above gentoo link to switch channels. I don't think this had an effect. When I reboot the channels are different, but as I mentioned they are random after a reboot anyway.
The other related issue is playback of audio in other regular apps (browser, etc.). I've done one test to ensure I can actually get something to hear from other apps, and that is to bring up Steam and play a video from one of the app stores. This does play audio, but the quality is not bearable. 9/10 seconds there is no sound, but the short bursts of time that it is playing back something it sounds fine. It just seems as though the HDMI output is trying to start something up, and when it finally does something else has given up and decided to retry the process. The last paragraph in this section reminds me of this issue: ALSA - Gentoo Wiki
There's probably more I could add to this issue, but I've spent all afternoon night trying to work this out and I'm ready to do something else. If there are any questions let me know.
Comment