pipewire: enable aptX Bluetooth codec support

Enable aptX/aptX-HD codec support in PipeWire's Bluetooth A2DP codec.
This allows A2DP streaming with aptX-capable headsets when libfreeaptx
is available.

Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Shuai Zhang 2026-03-06 18:31:50 +08:00 committed by Khem Raj
parent d44ea32dba
commit 786f3323d7
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -49,6 +49,9 @@ SYSTEMD_PACKAGES = "${PN}"
# AptX and LDAC are not available in OE. Currently, neither
# are lv2, ROC, and libmysofa.
#
# AptX support is only available via freeaptx (libfreeaptx)
# for Bluetooth audio (A2DP).
#
# The RTKit module is deprecated in favor of the newer RT module.
# It still exists for legacy setups that still include it in
# their PipeWire configuration files.
@ -62,7 +65,6 @@ EXTRA_OEMESON += " \
-Dsession-managers='[]' \
-Dlv2=disabled \
-Droc=disabled \
-Dbluez5-codec-aptx=disabled \
-Dbluez5-codec-ldac=disabled \
-Dlegacy-rtkit=false \
-Dlibmysofa=disabled \
@ -86,7 +88,7 @@ BLUETOOTH_AAC = "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'b
PACKAGECONFIG:class-target ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC}', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez bluez-opus ${BLUETOOTH_AAC} bluez-aptx', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service systemd-user-service', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa vulkan pulseaudio', d)} \
${PIPEWIRE_SESSION_MANAGER} \
@ -104,6 +106,8 @@ PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc glib-2.0-n
PACKAGECONFIG[bluez-aac] = "-Dbluez5-codec-aac=enabled,-Dbluez5-codec-aac=disabled,fdk-aac"
PACKAGECONFIG[bluez-opus] = "-Dbluez5-codec-opus=enabled,-Dbluez5-codec-opus=disabled,libopus"
PACKAGECONFIG[bluez-lc3] = "-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-lc3=disabled,liblc3"
# Eneble libfreeaptx to support bluetooth audio codec
PACKAGECONFIG[bluez-aptx] = "-Dbluez5-codec-aptx=enabled,-Dbluez5-codec-aptx=disabled,libfreeaptx"
# From the pipewire git log:
# "Some Linux phones doesn't use oFono but ModemManager to control the modem."
# This packageconfig enables modemmanager specific code in the BlueZ backend.