easyeffects icon indicating copy to clipboard operation
easyeffects copied to clipboard

Bluetooth Headphone switches away from HFP when input recorder gets enabled

Open florian-mkd opened this issue 11 months ago • 1 comments

EasyEffects Version

7.2.1

What package are you using?

Flatpak (Flathub)

Distribution

Kubuntu 24.10

Describe the bug

Hello, first of all: Thanks for this awesome application. I am so close to what I want to archive and the actual application is indeed very easy to work with! But I am stumbling across an issue with my Bluetooth Headphones (with microphone), input effects and codec switching.

Usually, my headphones are using aptX HD as codec and the microphone is disabled. When an application needs the microphone, my system switches automatically to HFP (handsfree protocol) and the microphone works. When the app does not require the mic anymore, it switches back to apt HD. Works like a charm.

Now I've added two input effects for noise cancellation. When I enable the recorder source (e.g. mic test in browser), my mic switches back to aptX HD after ~2 seconds. When I automatically apply it to all input sources, my system does not even enable HFP. When I switch manually to HFP, the effects are applied and it works as expected. But apparently when I enable the recorder source, the profile switching does not work anymore.

I do not use the source and sink of Easy Effects in my sound settings (as it is not recommended).

My guess is that pipewire/wireplumber does not detect the input stream as used anymore with the recorder source enabled and therefor thinks it can switch back to audio-only codec. Not sure where the issue is located. Easy Effects? pipewire? wireplumber?

Expected Behavior

Even with input recorder enabled in EasyEffects, my system switches profiles automatically when using/not using my microphone.

Debug Log

Debug Log
Log output of Easy Effects. What I did: - Started Easy Effects, no app is using the mic - Mic test in browser, without recorder enabled. Headphone switches to HFP, mic works. - Enabled input recorder, headphones witches back to aptX HD, mic not working

Log file

I've also created three pw-dot files:

  • pw-before.dot: Microphone in use when recorder is not enabled. Mic working.
  • pw-after.dot: Recorder enabled, system switched away from microphone. Mic not working.
  • pw-expected.dot: Recorder enabled, I switched manually to HFP. Mic working, effects as well

pw-dot-files.zip

Additional Information

Output of PipeWire tab in Easy Effects: Core Version: 1.2.4 Header Version: 0.3.69 Library Version: 0.3.69

florian-mkd avatar Jan 02 '25 13:01 florian-mkd

Even with input recorder enabled in EasyEffects, my system switches profiles automatically when using/not using my microphone.

I think that another user faced the same problem. But I do not remember the issue where this was reported before. Honestly the only thing that comes to my mind is that there is some kind of limitation or bug in the logic WirePlumber uses to do this automatic bluetooth profile switching. EasyEffects does not even try to mess with the hardware profile. It just uses the hardware as it is.

The PipeWire's object we use to create the filters (pw_filter) requires manual management of the links. My guess is that the logic used by WirePlumber does not work when manual links are made. Maybe it recognizes just the links it manages itself. Like the one for ordinary playback/recording streams.

wwmm avatar Jan 02 '25 16:01 wwmm

So much has changed that is probably better to close this issue

wwmm avatar Nov 09 '25 02:11 wwmm