5 ms·
Stumbled into PipeWire few months ago when trying to setup Bluetooth headset on Ubuntu OS. It's superior to PulseAudio, but... Really unbelievable to comprehen
by jelicicm 4y ago
Stumbled into PipeWire few months ago when trying to setup Bluetooth headset on Ubuntu OS. It's superior to PulseAudio, but...
Really unbelievable to comprehend that Linux distros have such bad support for Bluetooth audio headsets - something very common in today's tech world. Android, Windows and Apple's OS all very efficiently switch from A2DP codec which is excellent for audio playback, but has no possibility for bidirectional communication (so you can't use your microphone) and HSP/HFP coded which provides worse sound, but you can talk. Linux doesn't have this fixed, there were some attempts [0], but nothing great came out of it.
[0] https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1838151 https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/18...
- jchw 4y agoI'm actually confused; The past couple years, PulseAudio has been pretty good at switching between the two for me. Getting stuck in HSP isn't unique to Linux of course; it can happen if anything holds the mic open, there's reports of issues with both macOS and Windows too, for the same reason. Especially common with programs like Discord. PulseAudio absolutely supports it with the Bluetooth module's auto_switch feature. I guess I'm not sure if Pipewire supports it, but it's likely handled by whatever is doing session management. I can only assume it's possible to configure Wireplumber to handle it if it doesn't have native support for it yet.
- jelicicm 4y agoHm, not really sure about `auto_switch`, didn't dig deep enough to find it I guess. PulseAudio only offered HSF/HSP which sounded simply terrible. PipeWire's HSP sounds pretty good (mSBC codec), although it's still obviously worse than A2DP. I'll have to look into auto switching and how to enable on either system.
- jchw 4y agoAre you saying that in pavucontrol, you see no A2DP modes at all? That's very strange, since all Bluetooth certified stuff should at least support A2DP SBC mode. Out of the box, Pipewire should also be able to support LDAC and maybe AptX. PulseAudio can use Gstreamer to support additional codecs, so on PulseAudio with GStreamer 1.20+ you can get better A2DP coverage, assuming you have the right codec packages installed on your distro. In general, Linux Bluetooth support has been a lot better as of late, to the point where I didn't need to mess with much, so most of what I know about it is actually older. (I used to use a third-party PulseAudio module to get better A2DP support for example, but when I looked it up, I found that it was deprecated in favor of just using newer GStreamer.)
- vladvasiliu 4y agojelicicm mentioned ubuntu in the original comment. I seem to remember that as of Ubuntu 20.04, LDAC wasn't supported. I needed to jump through some hoops to get it to work. It was still using full-on pulseaudio, not pipewire, at the time. I wouldn't be surprised for it to still not support non-free codecs out of the box. I've indeed had no issues on my Arch install. Works perfectly with LDAC on my Sony headphones and aptx-hd on my Shure. The mic of the Sony is a bad joke so I never use it, but I've tried it and switching modes worked fine on Linux.
- jchw 4y agoI hear you on that one. I'm patiently awaiting end-to-end support for LE audio with bidirectional audio streams, and maybe, if we're really lucky, Sony will release a pair of headphones that has a better microphone to go with it.
- jelicicm 4y agoSorry, not saying that. I do have an option of either A2DP or HSP. I was not familiar with auto switch. But you kind people have filled me in in this thread. A2DP sounds amazing for listening to music, no problems there. The problem is the hassle of switching between profiles, since I tend to use my headphones in work environment (calls, meetings) - this is the reason I still keep a pair of cabled headphones around.
- jchw 4y agoInteresting. Not sure what the deal is. Someone is suggesting that at least for PulseAudio, it could just be the older version of PulseAudio that shipped with Ubuntu. However, you should be able to get it working on Pipewire just as well. Pipewire stuff is still pretty immature, so your distro may have an older and less stable Wireplumber at the moment. In that case, it might be worth just trying to set the Pipewire Media Session option for this instead. Wireplumber is really powerful, though, so it's a nice tool to have available.
- 4y ago
- viraptor 4y agoNot sure if this is what you were pointing out here, so just in case: Pipewire does allow you to switch BT codecs including the ones which do better bidi quality. Including autoswitching if you want it to happen automatically https://wiki.archlinux.org/title/PipeWire#Automatic_profile_selection https://wiki.archlinux.org/title/PipeWire#Automatic_profile_... (you can switch manually as well)
- thewataccount 4y agoI've personally had a smoother experience on KDE with PipeWire because it seems to switch quicker for my headphones automatically, and worst case I can just right click it in the bottom right and select the correct codec. On Mac OS X however with the same headset, there's no manual switching, and I have to try to "coax" it into switching back by playing media like Spotify and it's not super consistent. Granted I only switch accidentally when I accidentally have my headphones selected as the audio source.
- sph 4y agoAre you complaining that Linux can't handle Bluetooth because PulseAudio breaks your setup, on a Pipewire post? Use Pipewire then. As other have said, this is not a problem anymore with the recommended setup of Pipewire + WirePlumber.
- spion 4y agoWhat is really unbelieveable is that Bluetooth still cannot do high quality full duplex streams in 2022, and that anyone that wants to use wireless has to accept sounding like a telephone line / old radio from the early 90ties in meetings.
- worthless-trash 4y agoWhen I ask sales people "does their bluetooth headset actually do high quality full duplex streams" they give me the strangest look. I am glad to see that I'm not the only one asking for this, i feel like i'm taking crazy pills.
- trifurcate 4y agoMy personal experience is the opposite-- although this behavior perhaps isn't desirable for end users who don't want to fiddle with their codec selection, being able to switch between A2DP and HSP manually in pavucontrol provides me with a much superior experience compared to Windows which would a) keep my headset in HSP because of some rogue application with a stuck open mic and make it really difficult to track it down/undo it and b) (rarely) keep my headset in A2DP while an application is attempting to grab audio or switch it to A2DP in the middle of meetings and break everything until I restart the application trying to use my mic. In my experience, a manual codec switch is a much smoother experience, ironically.
- esaym 4y agoWideband (mSBC) support was added into Pulseaudio 15 btw: https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/15.0/#supportforhfpbluetoothprofiles https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/1... It also added support for using higher bitpools for the SBC codec (sbc, sbc_xq_453, sbc_xq_512, sbc_xq_552) which pushes its quality above APTx and the other proprietary codecs. Info about bitpools and SBC here: https://habr.com/en/post/456182/ https://habr.com/en/post/456182/
- jeppesen-io 4y agoWhen using recent packages (e.g. NixOS) it's become quite good in the last ~6-ish months. It switches automatically when I open zoom, which is very nice