分离前置/后置音频端口

分离前置/后置音频端口

我有一个连接到前面板的耳机和连接到后面板(固定计算机)的扬声器。我希望能够从扬声器或耳机播放音频,但不能同时播放任何音频。我使用的是 Ubuntu 15.10 (Wily)。耳机和扬声器都是模拟的。

我知道这应该以某种方式起作用,我已经找到了类似这样的帖子:thomasa88.blogspot.se/2008/11/pulseaudio-and-speakersheadphones.html
但我无法让它正常工作,可能是因为帖子已经过时了。

我的声卡:Realtek ALC892(内置于主板)

有人能告诉我我需要做什么吗?如果您需要我提供更多信息,请直接询问!


更新(2016/01/17)

输出amixer

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 45 [70%] [-19.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 254 [100%] [-0.20dB]
  Front Right: Playback 254 [100%] [-0.20dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 0 [0%] [-64.00dB] [off]
  Front Right: Playback 0 [0%] [-64.00dB] [off]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 0 [0%] [-64.00dB] [off]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 0 [0%] [-64.00dB] [off]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 0 [0%] [-64.00dB] [off]
  Front Right: Playback 0 [0%] [-64.00dB] [off]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Line Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 46 [100%] [30.00dB] [on]
  Front Right: Capture 46 [100%] [30.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 0 [0%] [-16.00dB] [off]
  Front Right: Capture 0 [0%] [-16.00dB] [off]
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

我猜它应该是可以的,因为它在 Windows 7 中使用相同的设置就能完美运行,尽管我对 Ubuntu 还很陌生。


更新(2016/01/20)

alsamixer当声音输出设置为“耳机”时的结果

alsamixer将声音输出设置为“Line Out”时的结果

当拔下或插入任何相关设备时,不会自动静音。

在 alsamixer 中,我可以独立于其他所有设备静音“耳机”声道。但是,要静音扬声器,我需要静音“前置”声道,而不能在不静音其他所有设备的情况下静音该声道。

我能做的最好的就是将“前置”声道的音量调低到 0,问题是扬声器仍然播放声音(虽然很低但仍然存在,并且没有低到可以忽略不计)。

需要明确的是:
我希望能够独立地使耳机和扬声器静音,并且不同时收听两者,我该怎么做?

答案1

这通常开箱即用,无需任何修改。理想情况下,如果您的前面板支持插孔检测,它应该像笔记本电脑一样自动工作,当连接时,音频会路由到耳机,当耳机断开连接时,音频会路由到扬声器。您可以在pavucontrol

在此处输入图片描述

链接中描述的方法通过播放选项卡(也描述了这里) 旨在将流从一个声卡移动到另一个声卡。设置具有重新映射通道的虚拟声卡看起来有点过于复杂。


编辑:我刚刚检查了我的台式机(我不经常使用板载声卡),它配有 Haswell 主板和 ALC892 芯片,在 14.04 中,插孔检测功能可以正常工作,并且在连接耳机时会自动切换到前面板。检查您的前面板是否有高清音频连接器(12)。

相关内容