Ubuntu 无法通过 HDMI 播放音频

Ubuntu 无法通过 HDMI 播放音频

我有一台华硕 x55l 笔记本电脑。我将笔记本电脑连接到电视上,视频播放正常。但是音频是通过笔记本电脑播放的。我尝试更改音频设置以通过 HDMI 播放,但测试后没有声音。我尝试更改 pulseaudio 上的配置,但仍然没有声音。

这是我的aplay -l输出:

**** 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: ALC3236 Analog [ALC3236 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

这是我的pacmd list-cards输出:

2 card(s) available.
    index: 0
   name: <alsa_card.pci-0000_00_03.0>
   driver: <module-alsa-card.c>
   owner module: 6
   properties:
      alsa.card = "0"
      alsa.card_name = "HDA Intel HDMI"
      alsa.long_card_name = "HDA Intel HDMI at 0xf721c000 irq 51"
      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 = "160c"
      device.product.name = "Broadwell-U 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 (priority 5400, available: unknown)
      output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
      output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
      output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
      output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: unknown)
      output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: unknown)
      output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: unknown)
      output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: unknown)
      off: Off (priority 0, available: unknown)
   active profile: <output:hdmi-stereo-extra1>
   sinks:
      alsa_output.pci-0000_00_03.0.hdmi-stereo-extra1/#0: Built-in Audio Digital Stereo (HDMI 2)
   sources:
      alsa_output.pci-0000_00_03.0.hdmi-stereo-extra1.monitor/#0: Monitor of Built-in Audio Digital Stereo (HDMI 2)
   ports:
      hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
         properties:
            device.icon_name = "video-display"
      hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
         properties:
            device.icon_name = "video-display"
      hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
         properties:
            device.icon_name = "video-display"
    index: 1
   name: <alsa_card.pci-0000_00_1b.0>
   driver: <module-alsa-card.c>
   owner module: 7
   properties:
      alsa.card = "1"
      alsa.card_name = "HDA Intel PCH"
      alsa.long_card_name = "HDA Intel PCH at 0xf7218000 irq 50"
      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 = "9ca0"
      device.product.name = "Wildcat Point-LP 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 (priority 60, available: unknown)
      output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
      output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
      off: Off (priority 0, available: unknown)
   active profile: <output:analog-stereo+input:analog-stereo>
   sinks:
      alsa_output.pci-0000_00_1b.0.analog-stereo/#1: Built-in Audio Analog Stereo
   sources:
      alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#1: Monitor of Built-in Audio Analog Stereo
      alsa_input.pci-0000_00_1b.0.analog-stereo/#2: Built-in Audio Analog Stereo
   ports:
      analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
         properties:
            device.icon_name = "audio-input-microphone"
      analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
         properties:
            device.icon_name = "audio-speakers"
      analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
         properties:
            device.icon_name = "audio-headphones"

答案1

我遇到过类似的事情。有时 hdmi 声音能用,有时不行。只有重启才能解决问题。查找选定的 irq - 您的捕获使用了 51 和 50。现在转到 /proc 并查看使用的中断。我在名为 Interrupts 的文本文件中看到了它们。对我来说,当 pacmd 列出中断 52 和 51 时声音有效,而当使用中断 51 和 50 时声音无效。当英特尔 hda 声音使用 51 和 50 时 - 英特尔 wifi 使用 52。我检查了设置/网络/wifi。wifi 已关闭但飞行模式已打开。关闭飞行模式和 wifi 使 hdmi 声音在 irq 51 和 50 上工作。多次重启会导致 hda 声音在 irq 51 和 50 上并且声音有效。对我来说,这似乎是一个问题,如果 wifi 已关闭但飞行模式已打开,则启动时分配的 irq 会发生冲突。如果当 wifi 自动关闭时飞行模式也关闭的话就好了。

相关内容