Skip to content

temp/pulseaudio: Refresh and enable webrtc

Administrator requested to merge alistair/pulse-webrtc into master

This MR fixes echo cancellation and fix #2268 (closed). I think this is a critical fix as without it it's very difficult to have a usable phone call as the echo for the other side is so bad. For more background see below

~~pmOS currently uses a package fork of Pulseaudio

This is to provide enhanced HFP support in backend-native with ModemManager. The upstream Pulse MR for support is here: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/693 and the original package fork for pmOS is here: !3080 (merged)

Bluetooth HFP/HSP support is useful, which is why pmOS has the fork. It does seem like upstreaming efforts have stalled though, which means if we want to support it we will need to continue carrying the patches.

pmbootstrap doesn't support variable makedepends (see https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2215). So in the Pulse fork we disable echo cancellation as it depends on webrtc which isn't supported on all platforms. You can see where that happens here: https://gitlab.postmarketos.org/postmarketos/pmaports/-/blob/master/temp/pulseaudio/APKBUILD?ref_type=heads#L110

We have a few options

  1. Drop the pmOS fork of Pulse. This just uses upstream Alpine instead which does support echo cancellation, but not Bluetooth HFP/HSP
  2. Fix (not with this MR) https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2215 and then have runtime variable makedepdns. This is the best option, but might take some time and currently echo cancellation isn't working
  3. Merge this MR, which enables echo cancellation for the pmOS fork all of the time. This means Pulse is only supported on a few platforms though

The main part of this MR is these lines:

# webrtc-audio-processing depends
arch="x86 x86_64 aarch64"
_webrtc_aec="enabled"

which just always enabled echo cancellation and hence only supports a few targets. You can see how Alpine does it dynamically here: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/pulseaudio/APKBUILD#L74

All of the other changes in this patch are just updating based on upstream Alpine changes. Those really should go in anyway and I can create a separate MR if requested.~~

EDIT by ollieparanoid: changed the fix pmbootstrap issue line so gitlab doesn't auto-close it

Edited by Administrator

Merge request reports

Loading