因为LeonidMew
询问的是18.04(我正在使用18.04.2
),所以这是我的版本。
GUI paprefs
尝试将一个HDMI与一个模拟输出而不是两个HDMI结合在一起。所以我必须按照Léo Léopold Hertz 준영
$ gedit /etc/pulse/default.pa
# then after changes
$ pulseaudio -k
这两种方法都可以单独使用,因此请选择其中一种(确保将其添加到文件的顶部,我放在后面.fail
!!否则将无效)。
方法一
load-module module-alsa-sink device=hw:1,3 sink_name=hdmi
load-module module-alsa-sink device=hw:1,7 sink_name=hdmi2
load-module module-combine-sink sink_name=combined slaves=hdmi,hdmi2
set-default-sink hdmi-combined
方法B
load-module module-alsa-sink device=hw:0,0
load-module module-combine-sink sink_name=combined
参考
方法一
供参考,hw:0,0
来自aplay -l
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 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
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
方法B
而1:3
来自
$ pacmd list-sinks | grep -e 'name:' -e 'alsa.device ' -e 'alsa.subdevice '
name: <alsa_output.pci-0000_00_1b.0.iec958-stereo>
alsa.subdevice = "0"
alsa.device = "1"
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
alsa.subdevice = "0"
alsa.device = "7"
在“声音设置”上,我将另一个HDMI设置为输出,然后得到
$ pacmd list-sinks | grep -e 'name:' -e 'alsa.device ' -e 'alsa.subdevice '
name: <alsa_output.pci-0000_00_1b.0.iec958-stereo>
alsa.subdevice = "0"
alsa.device = "1"
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>
alsa.subdevice = "0"
alsa.device = "3"
为了验证,我跑了
$ aplay -D plughw:1,3 /usr/share/sounds/alsa/Front_Right.wav
$ aplay -D plughw:1,7 /usr/share/sounds/alsa/Front_Right.wav
在各自的监视器上响起。