Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipewire 0.3.53: Bluetooth input sound distorted #14

Closed
macfusbluer opened this issue Jul 6, 2022 · 7 comments · Fixed by #15
Closed

Pipewire 0.3.53: Bluetooth input sound distorted #14

macfusbluer opened this issue Jul 6, 2022 · 7 comments · Fixed by #15

Comments

@macfusbluer
Copy link

Distribution (run cat /etc/os-release):
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

pipewire-pulse:
Installed: 0.3.53-1pop1165668873322.0408a96e8
Candidate: 0.3.53-1pop1
165668873322.0408a96e8
Version table:
*** 0.3.53-1pop1165668873322.04~08a96e8 1001
1001 http://apt.pop-os.org/release jammy/main amd64 Packages
100 /var/lib/dpkg/status
0.3.48-1ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

Issue/Bug Description:

Input sound (microphone) using a bluetooth headset (JLab GoWork) sounds distorted after updated pipewire-pulse from version 0.3.52 to 0.3.53 today. Can't rollback using apt/apt-get as previous version was not found on repositories.

Steps to reproduce (if you know):

1- Connect headset to bluetooth
2- Start any audio application (i.e. Microsoft Teams)
3- Make a test call

Expected behavior:

Sound from mic should be natural.

Other Notes:

@murilosr
Copy link

murilosr commented Jul 6, 2022

Same here. I was on version 0.3.52-1pop1~1654797379~22.04~457334a running ok and after the update to 0.3.53-1pop1~1656688733~22.04~08a96e8 the problem started.

I'm using an HyperX Cloud Mix bluetooth headset, with HSP/HFP, codec mSBC. The voice is totally chopped, distorted, sounds like a robot.

It's sad that the previous version is not on the repository anymore.

@jacobgkau jacobgkau transferred this issue from pop-os/pop Jul 6, 2022
@jacobgkau jacobgkau changed the title PopOS 22.04, pipewire, bluetooth input sound distorted after updating pipewire-pulse Pipewire 0.3.53: Bluetooth input sound distorted Jul 6, 2022
@jacobgkau
Copy link
Member

jacobgkau commented Jul 6, 2022

Taking a quick look upstream, https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2492 sounds similar to this issue, and https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1305 (merged, but not yet included in a release) may help with it.

@macfusbluer
Copy link
Author

Taking a quick look upstream, https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2492 sounds similar to this issue, and https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1305 (merged, but not ye included in a release) may help with it.

Yep, it could help, unfortunately previous version (the pop1) was removed from repositories, so there's no way to go back as users from Arch or Fedora did. Hope it might be uploaded again to do the downgrade without breaking anything, as it's pretty linked with pop-shell.

@jacobgkau
Copy link
Member

The fix has been confirmed and is now released.

mmstick pushed a commit that referenced this issue Dec 30, 2022
It is not enough for `buffer` to be alive in its current
scope because when execution enters that branch, `format`
will be set to `fmt`, which points inside `buffer`. And
since `format` is used outside that scope, `buffer` must
live longer.

This was detected by ASAN when Audacity was starting up.

  ==25007==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffdbcfef560 at pc 0x7fe44ca95db3 bp 0x7ffdbcfeeda0 sp 0x7ffdbcfeed90
  READ of size 4 at 0x7ffdbcfef560 thread T0
      #0 0x7fe44ca95db2 in spa_pod_parser_pod ../spa/include/spa/pod/parser.h:67
      #1 0x7fe44ca9a805 in spa_format_parse ../spa/include/spa/param/format-utils.h:44
      #2 0x7fe44cad293a in port_set_format ../spa/plugins/audioconvert/audioconvert.c:1934
      #3 0x7fe44cadad14 in impl_node_port_set_param ../spa/plugins/audioconvert/audioconvert.c:2038
      #4 0x7fe44ca587e2 in configure_format ../spa/plugins/audioconvert/audioadapter.c:509
      #5 0x7fe44ca60dff in negotiate_format ../spa/plugins/audioconvert/audioadapter.c:822
      #6 0x7fe44ca62bbf in impl_node_send_command ../spa/plugins/audioconvert/audioadapter.c:846
      #7 0x7fe45ea1c2f1 in node_update_state ../src/pipewire/impl-node.c:407
      #8 0x7fe45ea5137e in pw_impl_node_set_state ../src/pipewire/impl-node.c:2251
      #9 0x7fe45eb3355f in pw_work_queue_destroy ../src/pipewire/work-queue.c:142
      #10 0x7fe45b2cd6f4 in source_event_func ../spa/plugins/support/loop.c:615
      #11 0x7fe45b2c634f in loop_iterate ../spa/plugins/support/loop.c:452
      #12 0x7fe45e9ebebc in spa_hook_list_clean ../spa/include/spa/utils/hook.h:395
      #13 0x5561e03dc722 in main ../src/daemon/pipewire.c:131
      #14 0x7fe45da3c28f  (/usr/lib/libc.so.6+0x2328f)
      #15 0x7fe45da3c349 in __libc_start_main (/usr/lib/libc.so.6+0x23349)
      #16 0x5561e03db2a4 in _start ../sysdeps/x86_64/start.S:115

  Address 0x7ffdbcfef560 is located in stack of thread T0 at offset 160 in frame
      #0 0x7fe44ca56fa9 in configure_format ../spa/plugins/audioconvert/audioadapter.c:475

    This frame has 4 object(s):
      [32, 36) 'state' (line 493)
      [48, 56) 'fmt' (line 494)
      [80, 128) 'b' (line 492)
      [160, 4256) 'buffer' (line 491) <== Memory access at offset 160 is inside this variable
@ghost
Copy link

ghost commented May 10, 2024

The fix has been confirmed and is now released.

sometimes my codec for my BT headsets get to mSBC automatically and the audio afterwards is distorted and muffled and unless I disconnect and reconnect the headset to my pc AAC Codec is unavailable.

Distro: Arch

@jacobgkau
Copy link
Member

Distro: Arch

@Subhashis2007 This is a repository for the PipeWire package in Pop!_OS. Unless you're going out of your way, I don't think this repository would be relevant to you on Arch.

@ghost
Copy link

ghost commented May 10, 2024

sorry for that, I thought this issue is somewhat general.

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 a pull request may close this issue.

3 participants