You are not logged in.
I would like to change the volume of left/right channels of my bluetooth headphones separately from each other, say left 10%, right 90%, but
pactl set-sink-volume <sink> 10% 90%
seems to only send the larger value (90% in the example) to the headphones and change the volume of both channels, even though the balance values reported by pactl do change as expected:
pactl list sinks | grep -A 100 RUNNING | grep Volume
pactl set-sink-volume 4 10% 90%
pactl list sinks | grep -A 100 RUNNING | grep Volume
yields
Volume: front-left: 32768 / 50% / -18.06 dB, front-right: 32768 / 50% / -18.06 dB
Base Volume: 65536 / 100% / 0.00 dB
Volume: front-left: 6553 / 10% / -60.00 dB, front-right: 58982 / 90% / -2.75 dB
Base Volume: 65536 / 100% / 0.00 dB
When I use "pactl set-sink-volume <sink> 10% 90%" on another pair of headphones that is plugged into my notebook, changing the balance works as expected. So the issue with my bluetooth headphones seems to be related to the interface between pulseaudio and bluetooth.
The headphones run with a2dp and the sound output is indeed stereo (when I play a stereo sound file that has only sound on the left, I hear that on the left only; I can pan the sound output when I play sound with Audacity by using a bar slider there).
Now I am out of ideas on how to proceed. My headphones are capable of stereo and the sound can be panned in principle (Audacity can do it), but how can I do it on the command line?
Here is the output of "pactl list sinks":
Sink #0
State: SUSPENDED
Name: alsa_output.pci-0000_00_1b.0.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 7
Mute: no
Volume: front-left: 19660 / 30% / -31.37 dB, front-right: 49545 / 76% / -7.29 dB
balance 0.60
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC3235 Analog"
alsa.id = "ALC3235 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xf7338000 irq 57"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9ca0"
device.product.name = "Wildcat Point-LP High Definition Audio Controller"
device.form_factor = "internal"
device.string = "front:1"
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-lineout: Line Out (type: Line, priority: 9000, not available)
analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability unknown)
analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 3, not available)
Active Port: analog-output-speaker
Formats:
pcm
Sink #4
State: RUNNING
Name: bluez_sink.4C_87_5D_D0_3F_A2.a2dp_sink
Description: Bose QC35 II
Driver: module-bluez5-device.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 28
Mute: no
Volume: front-left: 6553 / 10% / -60.00 dB, front-right: 58982 / 90% / -2.75 dB
balance 0.89
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: bluez_sink.4C_87_5D_D0_3F_A2.a2dp_sink.monitor
Latency: 65021 usec, configured 45317 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
bluetooth.protocol = "a2dp_sink"
bluetooth.codec = "sbc"
device.description = "Bose QC35 II"
device.string = "4C:87:5D:D0:3F:A2"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headphone"
bluez.path = "/org/bluez/hci0/dev_4C_87_5D_D0_3F_A2"
bluez.class = "0x240418"
bluez.alias = "Bose QC35 II"
device.icon_name = "audio-headphones-bluetooth"
Ports:
headphone-output: Headphone (type: Headphones, priority: 0, available)
Active Port: headphone-output
Formats:
pcm
pulseaudio and pulseaudio-bluetooth are up-to-date (version 17.0.3 for both).
Any help is appreciated!
[Edit: Fix typos. Then marked as solved.]
Last edited by hyperbolicblue (2024-03-26 17:51:41)
Offline
This depends on how your headset reacts to the balance change request, and apparently not as you want to. You could try telling pulse not to synchronise volume changes actively with the HW bluetooth device by finding and changing the
load-module module-bluetooth-discover avrcp_absolute_volume=false
line in your /etc/pulse/default.pa (the line without the avrcp_absolute_volume=false should be already present, add that afterwards, and reboot/restart pulseaudio)
Offline
Thanks for your suggestion! My /etc/pulse/default.pa now contains
load-module module-bluetooth-discover avrcp_absolute_volume=false
instead of
load-module module-bluetooth-discover
After rebooting, this solves the problem and I can now balance my headphones!
By the way, I was sure I already tried that before my original post, but apparently I failed to restart pulseaudio properly. Anyway, thanks for your suggestion, V1del! I already ruled out avrcp_absolute_volume=false as a fix, so I probably wouldn't have tried that again. Yay!
Last edited by hyperbolicblue (2024-03-26 17:50:48)
Offline
Fwiw properly restarting pulse without rebooting would be done with
systemctl --user restart pulseaudio
Offline