← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2122640] Re: When switching between the audio profiles of a bluetooth device, a sound glitch can be heard on another device

 

Hello, I just ran the test plan:

```
$ sudo apt policy wireplumber
wireplumber:
  Installed: 0.4.17-1ubuntu4.1
  Candidate: 0.4.17-1ubuntu4.1
  Version table:
 *** 0.4.17-1ubuntu4.1 100
        100 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     0.4.17-1ubuntu4 500
        500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
$ systemctl restart --user wireplumber
```

I stressed my system a lot, with 2 videos streams, 2 bluetooth device
(each has dual profile), one mono-profile bluetooth device, keyboard &
mouse in bluetooth mode.

Everything profile switch runs smoothly and the bug is fixed.

The only limitation (but it's kind of a nitpick): When spamming the
codec switch (not the actual profile switch, so a pretty rare use case),
the switch will sometimes last more than the 2sec delay that is
implemented in this fix. In this situation, the audio glitch can still
occur (after 2sec). The solution would be to increase the 2sec delay,
but I think it's reasonable to keep it like it is and like upstream did
set it.

** Tags removed: verification-needed verification-needed-noble
** Tags added: verification-done verification-done-noble

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to wireplumber in Ubuntu.
https://bugs.launchpad.net/bugs/2122640

Title:
  When switching between the audio profiles of a bluetooth device, a
  sound glitch can be heard on another device

Status in wireplumber package in Ubuntu:
  Invalid
Status in wireplumber source package in Noble:
  Fix Committed

Bug description:
  SRU Justification:

  [ Impact ]

   * When switching between different bluetooth profiles of the same
  device (ex: headphones / handsfree), the sound sometimes goes out from
  the default sound output (USB, HDMI...) for half a second, roughly.

   * After Wireplumber 0.5.6 and this fix:
  https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/655,
  the problem goes away. Plucky and Questing are fine.

   * Noble uses Wireplumber 0.4.17 and suffers from this bug.

  [ Fix ]

   * Upstream wireplumber 0.5.x got a huge refacto compared to what's in
  Noble. The fix I mentioned above does not apply, at all, given the
  architecture changed significantly.

  * I rewrote a patch, taking ideas from the original patch.

  * The idea is to detect these transition of bluetooth devices and,
  when they happen, prevent non-bluetooth devices to be linked with apps
  for a few (2) seconds.

  [ Test Plan ]

   1. Connect at least 3 devices to the system: 2 bluetooth devices
  (with several profiles each) one wired device

  2. Play at least 2 audio streams from different apps. Ex: using
  Youtube from both chromium and firefox.

  3. Switch between devices, switch between profiles. For each switch,
  the audio must transition to the right device without hearing a glitch
  anymore. With all devices and profiles, the transition must be quick.
  One should be able to click somewhere else on the Youtube video
  without causing a lag (it will trigger a transition).

  [ Where problems could occur ]

  Given the nature of the fix, 2 problems could occur

  1. Some unexpected transitions could now take 2 second instead of
  being instant. I tried to cover all the edge case in my patch, and in
  the test cases, to address that.

  2. Some transitions could not happen at all, causing the sound to be
  buffering. Again, the test plan covers that.

  If I forgot about some edge cases in the test plan, I will be happy to
  add some.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wireplumber/+bug/2122640/+subscriptions



References