Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.
Bao H.H edited this page Jun 7, 2020 · 34 revisions

Q & A

LDAC receiver?

Not implemented because Sony only open-sourced LDAC encoder.

See https://android.googlesource.com/platform/external/libldac & https://github.com/EHfive/ldacBT

In this module, LDAC only works when you sending audio from PulseAudio (this module as source, Headphone/Speaker as sink).

Which codec currently activated?

answer 1

Simply check your pulseaudio profiles selecting menu.

answer 2

Run pactl list sinks | grep -e bluez -e a2dp_codec or pactl list sources | grep -e bluez -e a2dp_codec .

How to choose codec ?

  1. Install latest pulseaudio-modules-bt.
  2. Install bluez >= 5.51.
  3. Edit bluetooth.service, append -E to /usr/lib/bluetoothd; Run systemctl daemon-reload Step not needed after bluez 5.52
# /usr/lib/systemd/system/bluetooth.service
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/lib/bluetoothd -E
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
ProtectHome=true
ProtectSystem=full

[Install]
WantedBy=bluetooth.target
  1. Restart bluetooth, pulseaudio (pulseaudio -k or systemctl --user restart pulseaudio)
  2. Select codec profile in Pulseaudio device/card profiles menu, or, use command pactl set-card-profile

LDAC Bitrate Table

abrQualityModeID LDAC encoding quality Input PCM frequency Bitrate
0 High Quality 48khz, 96khz 999kbps
44.1khz, 88.2khz 909kbps
1 Standard Quality 48khz, 96khz 660kbps
44.1khz, 88.2khz 606kbps
2 (ABR only) 48khz, 96khz 492kbps
44.1khz, 88.2khz 452kbps
3 (ABR only) 48khz, 96khz 396kbps
44.1khz, 88.2khz 363kbps
4 Mobile use Quality 48khz, 96khz 330kbps
44.1khz, 88.2khz 303kbps

In LDAC Adaptive Bit Rate (ABR) mode, LDAC ABR library would detect transmission quality (mostly related with radio environment) and choosing reasonable LDAC encoding quality profile.

(You can find abrQualityModeID in libldac source code)

Are there any plans to upstream this into PulseAudio?

No. See #1.