ミキサーを使ってBluetoothスピーカーの音量を変更します。

ミキサーを使ってBluetoothスピーカーの音量を変更します。

現在、カスタムキーボードショートカットを使用してコンピュータの音量を変更しています。私が使用する端末コマンドは次のとおりです。

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

これにより、下の画像の「内蔵オーディオシミュレーションステレオ」レベルで音量が変わります。ただし、これはブルーマンアプリを使用して接続したBluetoothデバイスの音量を制御しません。 pavucontrol>出力デバイスでは、Bluetoothデバイスがスピーカーポートを使用していることがわかりますが、機能しません。

amixer sset Speaker 3%+
amixer: Invalid command!

ここに画像の説明を入力してください。

これが重要な場合は、MATEボリュームコントロールに次のものが表示されます。 ここに画像の説明を入力してください。

マスターボリュームをBluetoothデバイスのボリュームを変更できる「グローバル」ボリュームにするにはどうすればよいですか?

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

ALSAを使用してサウンドカードを駆動するPulseaudioを実行していますが、Bluetoothスピーカーに接続してもALSAは関係ありません。 Pulseaudioを使用してALSA音量を設定すると、amixerソース/受信機の音量を検出して変更しますが(実際にはALSA音量を制御できるため複雑なアルゴリズムを使用します)、何を試してもBluetoothスピーカーモードを制御することはできません。

したがって、Pulseaudioボリュームを直接設定してください。これを行うコマンドは次のとおりです。

pactl set-sink-volume name_of_bluetooth_speaker +3%

など。次のコマンドを使用して、すべての受信者の名前を表示できます。

pacmd list-sinks | grep name:

山かっこなしで名前を使用してください。 「マスター」ボリュームはありません。

スクリプトを使用することもできますこのようにアクティブ受信機を検出し、音量を変更します。

おすすめ記事