ublue-os / bazzite

Bazzite is a cloud native image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
https://bazzite.gg
Apache License 2.0
4.1k stars 250 forks source link

Wrong audio codec being automatically selected for Bluetooth headphones #1243

Open ADewiM opened 5 months ago

ADewiM commented 5 months ago

Describe the bug

My Steam Deck automatically selects the headset codec instead of the headphones codec when connecting to my Bluetooth headphones. This results in my headphones thinking they're taking a phone call and outputting low-quality audio.

This is only a big problem in game mode. In desktop mode, I can go into the system settings and see it's automatically selected "Headset Head Unit (HSP/HFP, codec mSBC)". I can change it manually to one of the high-fidelity codecs (SBC or SBC-XQ).

What did you expect to happen?

A hifi codec to be selected automatically in game mode. Or at least the option to manually select a codec.

Output of rpm-ostree status

State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:a7f60124397217dbc600faac813f33f1ecaf96c1691c718a84420bf6335cfe4a
                  Version: 40.20240618.0 (2024-06-18T17:00:32Z)
                Initramfs: '"-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf"' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:latest
                   Digest: sha256:4f48879928ca295935ae9d4dbdb963c64d6e22a8dbcd05122c764b642bae7d07
                  Version: 40.20240615.0 (2024-06-16T06:19:24Z)
                Initramfs: '"-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf"'

Hardware

Steam Deck 512GB with Jabra Elite 45h.

Extra information or context

No response

morice117 commented 5 months ago

Yeah got the same problem, disabled auto-switching in wireplumber like described here

RodoMa92 commented 4 months ago

Completely forgot about this, but yeah, the new wireplumber configuration from Valve reenabled the HFP automatic switching for bluetooth headphones.

In the past you would be able to switch back to the integrated mic from the options menu in game mode and get back A2DP bluetooth profiles without a mic (so hearable audio and not tin can mode like in HFP), but I think that Valve now has hidden the integrated mic on external audio peripheral connection on the LCD model since you cannot use it with wired headphones.

Problem is that it disappears also on other external audio sources which do not trigger the specific limitation caused by plugging in wired headphones and therefore if you use any source that requires a microphone you just get tin can mode even if the integrated mics are available.

I would love to open an issue on the SteamOS bugtracker, but I don't know if the problem is there on their OS, so I might complain on something that do not behave like Bazzite.

Workaround for now is either @morice117 suggestion or the same that Valve used in the past, which is to change the section below in the file /etc/wireplumber/wireplumber.conf.d/bluez.conf like this:

  ## HFP/HSP backend (default: native).
  ## Available values: any, none, hsphfpd, ofono, native
  ## setting this to "none" disables all headset roles
  bluez5.hfphsp-backend = "none"

This will completely disable any microphone bluetooth source in your bluetooth headphones.

RodoMa92 commented 4 months ago

Aaaand they turned it off again for unrelated reasons: https://gitlab.com/evlaV/valve-hardware-audio-processing/-/blob/main/wireplumber/hardware-profiles/valve-jupiter/wireplumber.conf.d/bluez.conf?ref_type=heads

Luciferscoffin commented 2 months ago

For some reason I got it working by having the mic volume at 0 and muted and setting the mic to the correct codex and I'm not dumb enough to look a gift horse in the mouth