Audio
如何設置音效卡上的輸出埠?
我的音效卡有兩個埠;為清楚起見,我將它們稱為“揚聲器”和“耳機”埠。在 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>
結果發現,當耳機插孔插入某些東西時,ALSA 會自動使我的主揚聲器靜音。我可以通過禁用 alsamixer 中的自動靜音模式來禁用它。然後我可以獨立控制耳機埠和揚聲器埠的電平。