Announcement

Collapse
No announcement yet.

HDMI audio, channels switched, surround vs dual speaker sound

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HDMI audio, channels switched, surround vs dual speaker sound

    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:
    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
    The device that I need to have work for HDMI is 'hdmi:CARD=HDMI,DEV=2' above. The output of aplay -l is:
    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
    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.

  • #2
    Re: HDMI audio, channels switched, surround vs dual speaker sound

    Just to post a followup to this. I'm not sure why or how, but things are working much better. The only thing I (remember) doing was restarting one more time, and now the left and right speakers are consistently assigned to the FL and FR channels respectively. The two issues that remain are:

    1) I'm unsure why the HDMI output is stuck on 5.1 output
    2) audio from some sources (flash for one) is still broken (play 1 out of every 10 seconds at most, see post above).

    Audio during games works fairly well, but it seems like the audio playback becomes out of sync with the video or something at time, and then the audio playback resets in some way. The outcome is that playback sounds fine for about 15 seconds or so and then the playback starts at some other place in the track. Also, certain audio sounds (many times it's the clicking of buttons in a GUI) end up being played many seconds after I've actually pressed the button that initiates playback.

    Comment

    Working...
    X