Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I connect my pc to a TV using HDMI cable I don't get audio over HDMI. PulseAudio Volume Control detects the HDMI audi output as unolugged. aplay -l lists the following:

**** 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: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

When I run aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav & aplay -D plughw:0,8 /usr/share/sounds/alsa/Front_Center.wav, nothing happens, but when I run aplay -D plughw:0,7 /usr/share/sounds/alsa/Front_Center.wav I get the sound from the TV speaker.

PulseAudio detects only device 3 (HDMI 0). pactl list gives

Card #0
    Name: alsa_card.pci-0000_00_03.0
    Driver: module-alsa-card.c
    Owner Module: 5
    Properties:
        alsa.card = "0"
        alsa.card_name = "HDA Intel HDMI"
        alsa.long_card_name = "HDA Intel HDMI at 0xf0614000 irq 45"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:03.0"
        sysfs.path = "/devices/pci0000:00/0000:00:03.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "0c0c"
        device.product.name = "Haswell HD 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:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority. 5400)
        output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority. 300)
        output:hdmi-stereo-extra1: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority. 5200)
        output:hdmi-stereo-extra2: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority. 5200)
        output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority. 100)
        off: Off (sinks: 0, sources: 0, priority. 0)
    Active Profile: output:hdmi-stereo
    Ports:
        hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "video-display"
            Part of profile(s): output:hdmi-stereo, output:hdmi-surround
        hdmi-output-1: HDMI / DisplayPort 2 (priority: 5800, latency offset: 0 usec, available)
            Properties:
                device.icon_name = "video-display"
                device.product.name = "Mstar Demo"
            Part of profile(s): output:hdmi-stereo-extra1
        hdmi-output-2: HDMI / DisplayPort 3 (priority: 5700, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "video-display"
            Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-surround-extra2

Card #1
    Name: alsa_card.pci-0000_00_1b.0
    Driver: module-alsa-card.c
    Owner Module: 6
    Properties:
        alsa.card = "1"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf0610000 irq 46"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "8c20"
        device.product.name = "Lynx Point High Definition Audio Controller"
        device.form_factor = "internal"
        device.string = "1"
        device.description = "Built-in Audio"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Profiles:
        input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority. 60)
        output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority. 6000)
        output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority. 6060)
        output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority. 5500)
        output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (sinks: 1, sources: 1, priority. 5560)
        off: Off (sinks: 0, sources: 0, priority. 0)
    Active Profile: output:iec958-stereo+input:analog-stereo
    Ports:
        analog-input-microphone-front: Front Microphone (priority: 8500, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "audio-input-microphone"
            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:iec958-stereo+input:analog-stereo
        analog-input-microphone-rear: Rear Microphone (priority: 8200, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "audio-input-microphone"
            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:iec958-stereo+input:analog-stereo
        analog-input-linein: Line In (priority: 8100, latency offset: 0 usec, not available)
            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:iec958-stereo+input:analog-stereo
        analog-output: Analog Output (priority: 9900, latency offset: 0 usec)
            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
        analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, not available)
            Properties:
                device.icon_name = "audio-headphones"
            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
        iec958-stereo-output: Digital Output (S/PDIF) (priority: 0, latency offset: 0 usec)
            Part of profile(s): output:iec958-stereo, output:iec958-stereo+input:analog-stereo

Setting the default audio output in Multimedia Systems Selector to plugin ALSA and device HDMI did not fix the problem. So far I have to select the output device in each application settings but I want this to be system wide. I need it to detect it automatically when the HDMI cable is plugged and unplugged. How can I do this?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.