我的声卡有两个端口;为了清楚起见,我将它们称为“扬声器”和“耳机”端口。在Windows中,音频控制有两个独立的端口,我可以随意在扬声器和耳机之间来回切换。
在Linux中,默认情况下音频总是从扬声器端口发出,如果我插入耳机,则自动切换到耳机端口。
我该如何控制这种行为?我尝试使用 pacmd 的“sink-set-port”,“list-sinks”输出表明“活动端口”已更改,但实际上没有任何反应。
来自列表接收器的数据:
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC889 Analog"
alsa.id = "ALC889 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xfbff8000 irq 60"
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 = "1c20"
device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
alsa.mixer_name = "Realtek ALC889"
alsa.components = "HDA:10ec0889,1458a022,00100004"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
properties:
analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
properties:
device.icon_name = "audio-headphones"
active port: <analog-output>
答案1
结果是,当耳机插孔插入某些东西时,ALSA 会自动将我的主扬声器静音。我可以通过在 alsamixer 中禁用自动静音模式来禁用它。然后我可以独立控制耳机端口和扬声器端口的电平。