pactl list cards
这是我在 Debian 系统上运行时得到的结果。
Card #0
Name: alsa_card.pci-0000_00_0e.0
Driver: module-alsa-card.c
Owner Module: 1
Properties:
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0x82510000 irq 130"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:0e.0"
sysfs.path = "/devices/pci0000:00/0000:00:0e.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.form_factor = "internal"
device.string = "0"
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, available: yes)
output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6000, available: yes)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6060, available: yes)
output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5400, available: yes)
output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5460, available: yes)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5200, available: no)
output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5260, available: yes)
output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 100, available: no)
output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 160, available: yes)
output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 100, available: no)
output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 160, available: yes)
output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5200, available: no)
output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5260, available: yes)
output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 100, available: no)
output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 160, available: yes)
output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 100, available: no)
output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 160, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: output:hdmi-stereo
Ports:
analog-input-internal-mic: Internal Microphone (priority: 8900, latency offset: 0 usec)
Properties:
device.icon_name = "audio-input-microphone"
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1+input:analog-stereo, output:hdmi-surround71-extra1+input:analog-stereo, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2+input:analog-stereo
analog-input-headphone-mic: Microphone (priority: 8700, latency offset: 0 usec)
Properties:
device.icon_name = "audio-input-microphone"
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1+input:analog-stereo, output:hdmi-surround71-extra1+input:analog-stereo, output:hdmi-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2+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
hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec, available)
Properties:
device.icon_name = "video-display"
device.product.name = "MSI MP243"
Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo
hdmi-output-1: HDMI / DisplayPort 2 (priority: 5800, latency offset: 0 usec, not available)
Properties:
device.icon_name = "video-display"
Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1, output:hdmi-surround-extra1+input:analog-stereo, output:hdmi-surround71-extra1, output:hdmi-surround71-extra1+input:analog-stereo
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-stereo-extra2+input:analog-stereo, output:hdmi-surround-extra2, output:hdmi-surround-extra2+input:analog-stereo, output:hdmi-surround71-extra2, output:hdmi-surround71-extra2+input:analog-stereo
在配置文件下,我有output:analog-stereo
优先级6000
和output:hdmi-stereo
优先级5400
。
我尝试通过运行以下命令来检查音频的工作原理
为了output:hdmi-stereo
aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Right.wav
- 没有音频
为了output:analog-stereo
aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Right.wav
- 音频存在
这是我的pactl list short sinks
0 alsa_output.pci-0000_00_0e.0.analog-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
所以我看到默认是模拟立体声。所以我用以下内容改变了它
pactl set-card-profile 0 output:hdmi-stereo
pactl set-default-sink alsa_output.pci-0000_00_0e.0.hdmi-stereo
现在pactl list short sinks
是
1 alsa_output.pci-0000_00_0e.0.hdmi-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
当我运行以下命令时,两者都有音频
aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Right.wav
for output:hdmi-stereo
- 音频存在
aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Right.wav
for output:analog-stereo
- 音频存在
output:analog-stereo
我想知道在这种设置下播放的原因是否是因为它具有更高的优先级。理想情况下,我希望两者以相同的优先级运行。这意味着我不必按照我所做的步骤来玩output:hdmi-stereo
。无论如何,我需要两个都玩。我需要更改其优先级以匹配吗output:analog-stereo
?两个都6000?我该如何完成这件事?