Skip to content

feat(pipewire): pin aptX HD, disable BT autoswitch - #375

Merged
odsod merged 1 commit into
mainfrom
wireplumber-aptx-hd
Oct 27, 2026
Merged

odsod merged 1 commit into
mainfrom
wireplumber-aptx-hd

Conversation

@odsod

@odsod odsod commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Why

WirePlumber moves a Bluetooth card to HSP/HFP (mono, narrowband) as soon as
any app opens the headset microphone. It restores the stereo profile only
after the last capture stream closes, and on this machine it does not come
back. The Px8 had to be moved from the mono headset profile back to aptX HD by
hand after every call.

What

  • Add wireplumber/51-bluez-aptx-hd.conf and link it to
    ~/.config/wireplumber/wireplumber.conf.d/.
  • Set bluetooth.autoswitch-to-headset-profile = false. This also stops the
    headset microphone node from being published, so no app can pull the card out
    of A2DP.
  • Set bluez5.codecs = [ aptx_hd msbc ]: A2DP offers aptX HD only, never AAC
    or plain aptX, with SBC as the mandatory fallback. HFP keeps mSBC for when the
    headset profile is selected by hand.

Test plan

  • mise run check passes.
  • After a WirePlumber restart and a Px8 reconnect, the active profile is a2dp-sink and api.bluez5.codec is aptx_hd.
  • wpctl status shows no bluez_input source and no loopback filter for the Px8.
  • The A2DP profile list has aptX HD and SBC only; HFP has CVSD and MSBC.
  • The Px8 is still the default sink and keeps its volume.

WirePlumber's autoswitch moves a Bluetooth card to HSP/HFP (mono,
narrowband) whenever an app opens the headset microphone, and does not
reliably switch back, so the Px8 had to be moved back to aptX HD by hand
after every call.

- Disable bluetooth.autoswitch-to-headset-profile, which also stops
  publishing a headset microphone node.
- Restrict A2DP to aptx_hd so nothing negotiates down to AAC or plain
  aptX; SBC stays as the mandatory fallback.
- Keep msbc in the codec list so the headset profile stays usable when
  selected by hand.
@odsod
odsod merged commit e34fb91 into main Oct 27, 2026
1 check passed
@odsod
odsod deleted the wireplumber-aptx-hd branch October 27, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant