dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Fix HFP (bluetooth handsfree) and pulseaudio

Open alanchrt opened this issue 5 years ago • 9 comments

This one needs some digging. It seems that pulseaudio supports HSP (Headset) headsets just fine, but if a headset only supports the HFP (Handsfree) profile, you're in a pickle, even with oFono installed.

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/84

It seems there may be a patch available in this branch (pretty outdated):

https://git.kernel.org/pub/scm/linux/kernel/git/jejb/pulseaudio.git/log/?h=jejb-v12

It may be worth editing the PKGBUILD of pulseaudio to point to that repo instead (git://git.kernel.org/pub/scm/linux/kernel/git/jejb/pulseaudio#branch=jejb-v12):

https://github.com/archlinuxarm/PKGBUILDs/tree/master/extra/pulseaudio

Getting that to play nicely with aconfmgr is another story, and it also means PA will be missing lots of updates since mid-2018. Maybe even merging the patched branch above and maintaining a fork for the PKGBUILD?

alanchrt avatar Oct 16 '19 20:10 alanchrt

Modified PKGBUILD didn't build cleanly, probably because the branch is so out of date. Might see if I can just whittle it down to a clean patch and add it to the default PKGBUILD source.

alanchrt avatar Oct 17 '19 04:10 alanchrt

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jejb/pulseaudio -b jejb-v12
$ git remote add upstream https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
$ git checkout master
$ git pull upstream master
$ git diff master...jejb-v12 > hfp.patch

In dir with PKGBUILD:

$ cp /path/to/hfp.patch .
$ makepkg -g -f -p PKGBUILD

# add missing sha to PKGBUILD

$ makepkg -si

alanchrt avatar Oct 17 '19 04:10 alanchrt

Still no dice with the above.

alanchrt avatar Oct 17 '19 04:10 alanchrt

Possibly try directly downloading patches mentioned here:

https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#hsphfp

alanchrt avatar Oct 17 '19 04:10 alanchrt

To try next:

$ git clone https://github.com/archlinuxarm/PKGBUILDs.git
$ cd PKGBUILDs/extra/pulseaudio
$ wget https://patchwork.freedesktop.org/patch/178198/raw/ -O 0001-hfp.patch
$ wget https://patchwork.freedesktop.org/patch/178199/raw/ -O 0002-hfp.patch
$ wget https://patchwork.freedesktop.org/patch/178200/raw/ -O 0003-hfp.patch
$ wget https://patchwork.freedesktop.org/patch/178201/raw/ -O 0004-hfp.patch

# modify PKGBUILD to include patches

$ makepkg -g -f -p PKGBUILD

# modify PKGBUILD to include new shas

$ makepkg -si

alanchrt avatar Oct 17 '19 14:10 alanchrt

No go on that attempt either.

alanchrt avatar Oct 17 '19 15:10 alanchrt

More discussion here— https://github.com/EHfive/pulseaudio-modules-bt/issues/51

Includes a link to an updated patchset for v13 (my version)! https://git.kernel.org/pub/scm/linux/kernel/git/jejb/pulseaudio.git/log/?h=jejb-v13

alanchrt avatar Oct 17 '19 18:10 alanchrt

No dice with recent v13 patchset. Maybe I need to build with particular flags that are missing from the PKGBUILD?

alanchrt avatar Oct 17 '19 21:10 alanchrt

There is also some recent HFP work over here: https://github.com/paravoid/pulseaudio/tree/hfp-v7

This is jejb's work, plus patches from the mailing list.

alanchrt avatar Oct 18 '19 20:10 alanchrt