Changing Sample Rate for Bluetooth Headsets?
- PipeWire version: 0.3.51
- Distribution and distribution version: Debian GNU/Linux 11 (bullseye)
- Desktop Environment: NO
- Kernel version: 5.15.32-v8+
- BlueZ version: 5.55
-
lsusb
:
Bus 001 Device 004: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
- Bluetooth devices:
Device <Bluetooth MAC address here> WH-1000XM3
Description of Problem:
Hello everyone, I'm a Linux noob who met some problems with sample rate of Bluetooth headsets.
I have a Sony WH-1000XM3 headset, which support LDAC codec with the highest sample rate of 96KHz. I connected it to a Raspberry Pi 3B+ which runs Raspberry Pi OS Lite with PipeWire and pipewire-pulse installed by myself, using WirePlumber as session manager.
Now I want to increase the sample rate to 96KHz rather than the default 48KHz so I set default.clock.rate = 96000
in ~/.config/pipewire/pipewire.conf
, as this document on Arch Wiki said. But I found it seems only changed the sample rate of the on-board headphone jack, the sample rate of Bluetooth headset is still 48KHz.
Did I missed something to configure, or this is a bug?
Please help me, thanks!
How Reproducible:
Steps to Reproduce:
Install PipeWire, pipewire-pulse and WirePlumber on Raspberry Pi OS Lite, connect the Bluetooth headset, edit ~/.config/pipewire/pipewire.conf
to set default.clock.rate = 96000
, then restart PipeWire and play audio.
Actual Results:
The following is the output of pactl list sinks
, as you could see, the sample specification of the on-board headphone jack(Sink #61) is s16le 2ch 96000Hz
while the Bluetooth headset(Sink #67) is float32le 2ch 48000Hz
:
Sink #61
State: SUSPENDED
Name: alsa_output.platform-bcm2835_audio.stereo-fallback
Description: Built-in Audio Stereo
Driver: PipeWire
Sample Specification: s16le 2ch 96000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 48287 / 74% / -7.96 dB, front-right: 48287 / 74% / -7.96 dB
balance 0.00
Base Volume: 56210 / 86% / -4.00 dB
Monitor Source: alsa_output.platform-bcm2835_audio.stereo-fallback.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "0"
alsa.card_name = "bcm2835 Headphones"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_bcm2835"
alsa.id = "bcm2835 Headphones"
alsa.long_card_name = "bcm2835 Headphones"
alsa.name = "bcm2835 Headphones"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "bcm2835 Headphones"
api.alsa.card.name = "bcm2835 Headphones"
api.alsa.path = "hw:0"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "1"
device.api = "alsa"
device.class = "sound"
device.id = "51"
device.profile.description = "Stereo"
device.profile.name = "stereo-fallback"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Built-in Audio Stereo"
node.name = "alsa_output.platform-bcm2835_audio.stereo-fallback"
node.nick = "bcm2835 Headphones"
node.pause-on-idle = "false"
object.path = "alsa:pcm:0:hw:0:playback"
priority.driver = "1000"
priority.session = "1000"
factory.id = "18"
client.id = "32"
clock.quantum-limit = "8192"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "61"
object.serial = "61"
Ports:
analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability unknown)
Active Port: analog-output-headphones
Formats:
pcm
Sink #67
State: RUNNING
Name: bluez_output.<Bluetooth MAC address here>.a2dp-sink
Description: WH-1000XM3
Driver: PipeWire
Sample Specification: float32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 18577 / 28% / -32.85 dB, front-right: 18577 / 28% / -32.85 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: bluez_output.<Bluetooth MAC address here>.a2dp-sink.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
api.bluez5.address = "<Bluetooth MAC address here>"
api.bluez5.codec = "ldac"
api.bluez5.profile = "a2dp-sink"
api.bluez5.transport = ""
card.profile.device = "1"
device.id = "66"
device.routes = "1"
factory.name = "api.bluez5.a2dp.sink"
device.description = "WH-1000XM3"
node.name = "bluez_output.<Bluetooth MAC address here>.a2dp-sink"
node.pause-on-idle = "false"
priority.driver = "1010"
priority.session = "1010"
factory.id = "8"
clock.quantum-limit = "8192"
device.api = "bluez5"
media.class = "Audio/Sink"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "67"
object.serial = "67"
client.id = "32"
Ports:
headset-output: Headset (type: Headset, priority: 0, available)
Active Port: headset-output
Formats:
pcm
Expected Results:
The sample rate in sample specification of the Bluetooth headset(Sink #67) should be 96000Hz.
Additional Info (as attachments):
(All Bluetooth MAC address in this file has been redacted with <Bluetooth MAC address here>
)