我使用旧笔记本电脑作为 DVD 播放器,因此我希望声音始终通过 HDMI 播放,但每当我暂停声音时,就会切换回内部扬声器。我可以使用以下命令将声音更改回 HDMI:
pacmd set-card-profile 0 output:hdmi-stereo
我已编辑 /etc/pulse/default.pa 如下:
load-module module-stream-restore restore_device=false #added restore_device=false
...
#load-module module-switch-on-port-available #commented this out
...
set-card-profile 0 output:hdmi-stereo #added at end of file
这使得 HDMI 在计算机启动时成为默认设置,但在挂起时仍会切换回内部扬声器。如何永久将 HDMI 设置为默认设置?如果有帮助,则输出pacmd list-cards
为:
1 card(s) available.
index: 0
name: <alsa_card.pci-0000_00_1b.0>
driver: <module-alsa-card.c>
owner module: 6
properties:
alsa.card = "0"
alsa.card_name = "HDA Intel MID"
alsa.long_card_name = "HDA Intel MID at 0xf6000000 irq 30"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "3b56"
device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
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: Analogue Stereo Input (priority 60, available: unknown)
output:analog-stereo: Analogue Stereo Output (priority 6000, available: unknown)
output:analog-stereo+input:analog-stereo: Analogue Stereo Duplex (priority 6060, available: unknown)
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analogue Stereo Input (priority 5460, available: unknown)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analogue Stereo Input (priority 360, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <output:analog-stereo>
sinks:
alsa_output.pci-0000_00_1b.0.analog-stereo/#2: Built-in Audio Analogue Stereo
sources:
alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#2: Monitor of Built-in Audio Analogue Stereo
ports:
analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-input-microphone"
analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)
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"
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
properties:
device.icon_name = "video-display"
device.product.name = "LG TV"
更新:出于某种原因,将 /etc/pulse/ 复制到 ~/.config/pulse 使其工作。不知道为什么
答案1
我刚刚遇到这个问题。我按照@Nebuzaradan 在更新中所说的进行操作,结果成功了。我尝试了论坛上列出的许多其他方法,但没有一个有效,但出于某种原因,这个有效。
因此,重申一下,要解决此问题,请:
将 /etc/pulse/ 复制到 ~/.config/pulse