Centos

HDMI 沒有音頻?

  • February 21, 2022

我使用的是 CentOS 7.9,我有 Asus H110M-E(內置音頻和影片)和 GeForce GT 710 顯卡,驅動程序通過以下方式安裝yum

(1/4): nvidia-x11-drv-470.103.01-1.el7_9.elrepo.x86_64.rpm                                                                                                                                                                                                                                                                                                                                                        | 4.5 MB  00:00:02     
(2/4): kmod-nvidia-470.103.01-1.el7_9.elrepo.x86_64.rpm                                                                                                                                                                                                                                                                                                                                                           |  48 MB  00:00:03     
(3/4): yum-plugin-nvidia-1.0.2-1.el7.elrepo.noarch.rpm                                                                                                                                                                                                                                                                                                                                                            |  12 kB  00:00:00     
(4/4): nvidia-x11-drv-libs-470.103.01-1.el7_9.elrepo.x86_64.rpm                                  

而且我沒有使用最新的(510 版),因為 Nvidia 在 GeForce GT 710 的 470 版之後取消了支持。

我正在嘗試使用 GeForce GT 710 的 HDMI 將音頻也輸出到我的三星電視。

但是,沒有音頻(只有影片)。我查看了dmesg,這些行看起來很可疑:

[    3.194768] asus_wmi: Disabling ACPI video driver
[    3.218574] AVX2 version of gcm_enc/dec engaged.
[    3.218576] AES CTR mode by8 optimization enabled
[    3.226895] alg: No test for __gcm-aes-aesni (__driver-gcm-aes-aesni)
[    3.226930] alg: No test for __generic-gcm-aes-aesni (__driver-generic-gcm-aes-aesni)
[    3.242290] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    3.242459] snd_hda_intel 0000:01:00.1: Disabling MSI
[    3.242464] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[    3.265463] snd_hda_intel 0000:00:1f.3: irq 125 for MSI/MSI-X
[    3.300528] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC887-VD: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[    3.300532] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    3.300534] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    3.300536] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    3.300538] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x11/0x0
[    3.300540] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    3.300542] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19
[    3.300544] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18
[    3.300546] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a
[    3.301579] kvm: disabled by bios
[    3.314616] kvm: disabled by bios
[    3.316354] intel_rapl: Found RAPL domain package
[    3.316358] intel_rapl: Found RAPL domain core
[    3.316360] intel_rapl: Found RAPL domain uncore
[    3.316362] intel_rapl: Found RAPL domain dram
[    3.330539] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[    3.332496] kvm: disabled by bios
[    3.332523] hdaudio hdaudioC0D2: Unable to bind the codec
[    3.333055] resource sanity check: requesting [mem 0xfdffe800-0xfe0007ff], which spans more than pnp 00:07 [mem 0xfdb00000-0xfdffffff]
[    3.333058] caller pmc_core_probe+0x8f/0x1000 [intel_pmc_core] mapping multiple BARs
[    3.333065] intel_pmc_core:  initialized

GeForce GT 710 上的 HDMI 音頻似乎被抑制了。有沒有辦法解決它?

aplay檢測 HDMI 音頻設備(但我不確定它是我的顯卡還是主機板上的內置影片設備):

$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

查看檢測到的音效卡的另一種方法:

$ cat /proc/asound/cards
0 [PCH            ]: HDA-Intel - HDA Intel PCH
                     HDA Intel PCH at 0xf7220000 irq 125
1 [NVidia         ]: HDA-Intel - HDA NVidia
                     HDA NVidia at 0xf7080000 irq 17

lspci還將我的 Nvidia 卡視為音頻設備:

$ lspci | grep -i "NVIDIA"
01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)

謝謝!

您需要實際選擇輸出。在 Pulseaudio 下,您可以pavucontrol對應用程序執行此操作,即使應用程序本身不支持它。

引用自:https://unix.stackexchange.com/questions/691402