[enh] pipewire-pulse: user-friendly icon and name for bluez sinks
Bluetooth Radio, Bluetooth Headset, Desktop Environment, Distribution, Version (Bluez, Kernel, and PipeWire):
% bluetoothctl --version
bluetoothctl: 5.55
% pipewire --version
pipewire
Compiled with libpipewire 0.3.25
Linked with libpipewire 0.3.25
% uname -r
5.10.0-6-amd64
% grep D /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION_CODENAME=bullseye
ID=debian
Description of Problem:
When PulseAudio is used with a Bluetooth headset:
- it sets the
device.icon_name
property toaudio-headphones-bluetooth
, which looks more fitting in e. g.pavucontrol
; - (more importantly) it sets the properties
device.description
andbluez.alias
to the bluez alias (effectively a user-settable nickname for the device, visible/settable as a dbus property and via bluetoothctl) if one exists.
PipeWire does not, so bluez a2dp sinks are displayed differently.
With PulseAudio (expected results):
The bluez alias is exposed as the device.description
.
% pactl list sinks
<...>
Sink #3
State: RUNNING
Name: bluez_sink.<...>.headset_head_unit
Description: ar-jbl-t215bt
Driver: module-bluez5-device.c
Sample Specification: s16le 1ch 8000Hz
Channel Map: mono
Owner Module: 22
Mute: no
Volume: mono: 26215 / 40%
balance 0,00
Base Volume: 65536 / 100%
Monitor Source: bluez_sink.<...>.headset_head_unit.monitor
Latency: 33362 usec, configured 28000 usec
Flags: HARDWARE HW_VOLUME_CTRL LATENCY
Properties:
bluetooth.protocol = "headset_head_unit"
device.intended_roles = "phone"
device.description = "ar-jbl-t215bt"
device.string = "08:EB:ED:F4:CD:24"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headphone"
bluez.path = "/org/bluez/hci0/dev_<...>"
bluez.class = "0x240418"
bluez.alias = "ar-jbl-t215bt"
device.icon_name = "audio-headphones-bluetooth"
Ports:
headphone-output: Headphone (type: Headphones, priority: 0, available)
Active Port: headphone-output
Formats:
pcm
With PipeWire (actual results):
The bluez alias is unused and not exposed in PA-style sink properties.
% pactl list sinks
<...>
Sink #53
State: RUNNING
Name: bluez_output.<...>.a2dp-sink
Description: JBL TUNE215BT
Driver: PipeWire
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 65522 / 100% / -0,01 dB, front-right: 65522 / 100% / -0,01 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor Source: bluez_output.<...>.a2dp-sink.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
api.bluez5.transport = ""
api.bluez5.profile = "a2dp-sink"
api.bluez5.codec = "sbc"
api.bluez5.address = "<...>"
device.routes = "1"
card.profile.device = "1"
device.id = "56"
device.description = "JBL TUNE215BT"
node.name = "bluez_output.<...>.a2dp-sink"
factory.name = "api.bluez5.a2dp.sink"
priority.driver = "1010"
priority.session = "1010"
node.pause-on-idle = "false"
factory.id = "8"
device.api = "bluez5"
media.class = "Audio/Sink"
node.driver = "true"
node.latency = "512/48000"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "53"
client.id = "29"
Ports:
headphone-output: Headphone (type: Headphones, priority: 0, available)
Active Port: headphone-output
Formats:
pcm
Additional Info Eg. Additional Kernel Patches, pw-dump -N > file
(As Attachment Please): none required? I can provide if needed.
I couldn't make PulseAudio use A2DP (for me, that was the main motivation to move to pw-pulse right now, as opposed to a more distant option like "around this summer"), so I can't confirm if PA behaves the same way in that case.