在我身上的声音戴尔 XPS 13不插入扩展坞时,它工作正常(并且始终工作正常)。默认情况下,音频路由到内置扬声器,插入耳机时,会使用耳机。这在连接到扩展坞时也有效。扩展坞是ThinkPad USB-C 基座音频。
然而,从上周五开始,当笔记本电脑连接到扩展坞时,耳机和内置扬声器都不再工作。
插入耳机时,系统会检测到它们并显示对话框以选择它们是什么设备(耳机、耳麦等)。我已验证在侏儒设置,音量设置正确。更改音量时,我还能听到耳机上的短音量反馈。
我记得唯一改变的是:我第一次将扬声器插入基座的 3.5 毫米插孔。那是在我第一次注意到问题的前一天。从那时起,无论我选择什么设备,音频似乎总是路由到基座。我可以通过将扬声器连接到基座来确认这一点。声音总是无论我选择什么设备,都可以在该扬声器上播放。
我不知道如何诊断这个问题。这是我在类似问题中找到的命令的输出:
> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3246 Analog [ALC3246 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Audio [ThinkPad USB-C Dock Audio], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
我pacmd list-sinks
看到以下输出:
2 sink(s) available.
* index: 1
name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9039
volume: front-left: 30537 / 47% / -19.90 dB, front-right: 30537 / 47% / -19.90 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 1
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
card: 0 <alsa_card.pci-0000_00_1f.3>
module: 20
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC3246 Analog"
alsa.id = "ALC3246 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 0xdc328000 irq 131"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1f.3"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9d71"
device.product.name = "Sunrise Point-LP HD Audio"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-speakers"
analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
properties:
device.icon_name = "audio-headphones"
active port: <analog-output-headphones>
index: 2
name: <alsa_output.usb-Lenovo_ThinkPad_USB-C_Dock_Audio_000000000000-00.iec958-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9048
volume: front-left: 61872 / 94% / -1.50 dB, front-right: 61872 / 94% / -1.50 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 34.06 ms
max request: 6 KiB
max rewind: 6 KiB
monitor source: 4
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 4
linked by: 5
configured latency: 36.00 ms; range is 36.00 .. 2000.00 ms
card: 2 <alsa_card.usb-Lenovo_ThinkPad_USB-C_Dock_Audio_000000000000-00>
module: 25
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "ThinkPad USB-C Dock Audio"
alsa.long_card_name = "Lenovo ThinkPad USB-C Dock Audio at usb-0000:39:00.0-1.4.2.3, full speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:39:00.0-usb-0:1.4.2.3:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:39:00.0/usb3/3-1/3-1.4/3-1.4.2/3-1.4.2.3/3-1.4.2.3:1.0/sound/card2"
udev.id = "usb-Lenovo_ThinkPad_USB-C_Dock_Audio_000000000000-00"
device.bus = "usb"
device.vendor.id = "17ef"
device.vendor.name = "Lenovo"
device.product.id = "3063"
device.product.name = "ThinkPad USB-C Dock Audio"
device.serial = "Lenovo_ThinkPad_USB-C_Dock_Audio_000000000000"
device.string = "iec958:2"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "iec958-stereo"
device.profile.description = "Digital Stereo (IEC958)"
device.description = "ThinkPad USB-C Dock Audio Digital Stereo (IEC958)"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
ports:
iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
active port: <iec958-stereo-output>
包含内置扬声器和耳机列表的 ID 为 1 的接收器是否有意义used by: 0
?
如果需要的话,我很乐意提供更多信息。
编辑:暂时移动一个接收器输入
灵感来自这个答案通过运行以下命令,我能够更改单个输入的接收器以再次在内部扬声器上播放:
pacmd move-sink-input 610 1
(其中610
是来自pacmd list-sink-inputs
并且1
是来自上面列出的接收器的索引)。
但是,这只是暂时有效的(我不知道为什么它会切换回来),并且只影响其中一个输入。我想找到一个解决方案,让我回到以前的设置,我可以使用 Gnome 设置来切换在哪个设备上播放音频。
我的问题:
我该如何调试和修复错误的音频路由并恢复到以前的状态:我能够在 Gnome 设置中选择音频设备?
答案1
我可以(至少暂时)通过pavucontrol
更改特定应用程序的输出设备来解决问题。
问题似乎在于这两个应用程序火狐和Gnome 设置配置为使用错误的音频设备。我不知道原因,但出于某种原因,切换输出设备Gnome 设置不会影响任何使用音频的应用程序的音频路由方式。
但是,使用时pavucontrol
我可以单独更改每个应用程序的音频设备。这会让 Firefox 再次使用正确的输出设备。
使用以下命令安装:
sudo apt install pavucontrol
运行该应用程序。选项卡中列出了几个使用音频的应用程序回放。我在条目旁边的下拉列表中选择了正确的音频设备火狐。