使用混音器更改蓝牙扬声器的音量

使用混音器更改蓝牙扬声器的音量

我目前使用自定义创建的键盘快捷键来更改计算机的音量。我使用的终端命令是:

amixer sset Master 3%+
amixer sset Master 3%-

这会改变下图中“内置音频模拟立体声”级别的音量。但是,这并不能控制我使用 blueman 应用程序连接的蓝牙设备的音量。在 pavucontrol > 输出设备中,我看到蓝牙设备使用扬声器端口,但这不起作用:

amixer sset Speaker 3%+
amixer: Invalid command!

在此输入图像描述

如果这很重要,MATE 音量控制会显示: 在此输入图像描述

如何让主音量成为能够更改蓝牙设备音量的“全局”音量?

来自 alsamixer 的更多信息:

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 69 [79%] [-13.50dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Beep',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 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 51 [81%] [21.00dB] [off]
  Front Right: Capture 51 [81%] [21.00dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Speaker Only' 'Line Out+Speaker'
  Item0: 'Line Out+Speaker'
Simple mixer control 'Digital',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 81 [68%] [10.50dB]
  Front Right: Capture 81 [68%] [10.50dB]
Simple mixer control 'Dock Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Dock 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 'Headset Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Headset Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]
Simple mixer control 'Internal Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [on]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [36.00dB]
  Front Right: 3 [100%] [36.00dB]

答案1

您正在运行 Pulseaudio,它使用 ALSA 驱动声卡,但它连接到蓝牙扬声器时不涉及 ALSA。当您使用 设置 ALSA 音量时amixer,Pulseaudio 会注意到并纠正源/接收器音量(实际上使用了一种有点复杂的算法,因为 ALSA 音量可以被控制),但无论您尝试什么,您都无法控制蓝牙扬声器方式。

所以直接设置Pulseaudio音量即可。执行此操作的命令是

pactl set-sink-volume name_of_bluetooth_speaker +3%

等等。您可以使用以下命令查看所有接收器的名称

pacmd list-sinks | grep name:

使用不带尖括号的名称。没有“主”卷。

您还可以使用脚本像这个它检测活动的接收器,并改变它们的音量。

相关内容