I am working on setting up an HTPC running Ubuntu 12.10. I have been searching for hours for a solution to get 5.1 surround sound working through HDMI, to no avail. I do not know a lot about audio standards or how they are managed in Linux. Right now, I am able to get what I think is 2 channel audio through HDMI.

In PulseAudio Volume Control, I only get the following two profile options for HDMI:
  • Digital Stereo (HDMI) Output + Analog Stereo Input
  • Digital Stereo (HDMI) Output


The computer is connected via HDMI to the TV which in turn is connected to the speaker system.

Possibly relevant computer specs:
  • Shuttle XH61V (Intel H61 Chipset)
  • Onboard Realtek ALC662 5.1 channel High Definition Audio
  • Intel Core i3-3225 with Intel HD Graphics 4000


Being as the HDMI is built into the motherboard, I don't really know whether the ALC662, the motherboard or the Intel Graphics is controlling it.

I have tried running "speaker-test -c 6" and Front Left, Center, Front Right all produce static but Rear Right, Rear Left and LFE all either silent or are much quieter.

pacmd list-cards gives me the following:
Code:
Welcome to PulseAudio! Use "help" for usage information.
>>> 1 card(s) available.
    index: 0
    name: <alsa_card.pci-0000_00_1b.0>
    driver: <module-alsa-card.c>
    owner module: 4
    properties:
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7d00000 irq 51"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "0"
        device.description = "Built-in Audio"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    profiles:
        output:analog-stereo: Analog Stereo Output (priority 6000)
        output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060)
        output:analog-surround-40: Analog Surround 4.0 Output (priority 700)
        output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 760)
        output:analog-surround-41: Analog Surround 4.1 Output (priority 800)
        output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 860)
        output:analog-surround-50: Analog Surround 5.0 Output (priority 700)
        output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 760)
        output:analog-surround-51: Analog Surround 5.1 Output (priority 800)
        output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 860)
        output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500)
        output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560)
        output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400)
        output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460)
        input:analog-stereo: Analog Stereo Input (priority 60)
        off: Off (priority 0)
    active profile: <output:hdmi-stereo+input:analog-stereo>
    sinks:
        alsa_output.pci-0000_00_1b.0.hdmi-stereo/#0: Built-in Audio Digital Stereo (HDMI)
    sources:
        alsa_output.pci-0000_00_1b.0.hdmi-stereo.monitor/#0: Monitor of Built-in Audio Digital Stereo (HDMI)
        alsa_input.pci-0000_00_1b.0.analog-stereo/#1: Built-in Audio Analog Stereo
    ports:
        analog-output: Analog Output (priority 9900, available: unknown)
            properties:
                
        analog-output-headphones: Headphones (priority 9000, available: no)
            properties:
                
        analog-input-microphone-front: Front Microphone (priority 8500, available: no)
            properties:
                
        analog-input-microphone-rear: Rear Microphone (priority 8200, available: no)
            properties:
                
        analog-input-linein: Line In (priority 8100, available: no)
            properties:
                
        iec958-stereo-output: Digital Output (S/PDIF) (priority 0, available: unknown)
            properties:
                
        hdmi-output-0: HDMI / DisplayPort (priority 5900, available: yes)
            properties:
And aplay -L gives me this:
Code:
default
    Playback/recording through the PulseAudio sound server
sysdefault:CARD=PCH
    HDA Intel PCH, ALC662 rev1 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    Front speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, ALC662 rev1 Digital
    Direct sample mixing device
dmix:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, ALC662 rev1 Digital
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC662 rev1 Digital
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC662 rev1 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC662 rev1 Digital
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Hardware device with all software conversions

Thank you in advance for any help on this!