Created attachment 228187 [details]
Patch for soundtouch
Simplify and move build to CMake
I'll try to upstream as many build fixes as possible (INTEGER_SAMPLES is already in)
We don't guarantee NEON availaility on ARMv7 so disable it for now
Compile tested on FreeBSD 13.0-STABLE #0 stable/13-n246086-a20c597c6d7 (amd64) (make, make check-plist, make test)
Compile tested on FreeBSD 13.0-STABLE #0 stable/13-n246453-06887e06864-dirty (arm64) (make, make check-plist, make test)
Poudriere testport OK 12.2-RELEASE
Upstream doesn't host changelog in a "readable" format but here goes:
Created attachment 228188 [details]
Patch for soundtouch v2
Attached wrong patch, sorry
...and no make test, copy n paste error
This just isn't my day ;)
Created attachment 228422 [details]
Patch for soundtouch v3
Add options for OpenMP and OPTIMIZED_CFLAGS
Slightly rearrage Makefile
As for the CFLAGS option it's what upstream sets and there is a quite a difference in performance on my aarch64 SBC (RockPro64).
15.48s real 15.29s user 0.18s sys
12.77s real 12.48s user 0.28s sys
6.57s real 6.37s user 0.19s sys
-O2 + OpenMP
6.64s real 37.11s user 1.37s sys
-O3 + OpenMP
6.38s real 36.96s user 1.17s sys
-Ofast + OpenMP
2.40s real 13.62s user 0.76s sys
Thanks! Please feel free to take this one on if you like too.
Do you see any downside/issues with enabling OpenMP on amd64 and aarch64 by default?
Absolutely none at all. We can always make a FLAVOUR out of it if anyone complains.
I've also submitted the changes upstream
A commit in branch main references this bug:
Author: Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2021-10-04 21:38:42 +0000
Commit: Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2021-10-04 21:43:54 +0000
audio/soundtouch: Update to 2.3.1
Switch to CMake
Enable OpenMP on aarch64 and amd64 by default
Enable OPTIMIZED_CFLAGS by default
Approved by: port maintainer, arrowd (mentor)
Differential Revision: https://reviews.freebsd.org/D32288
audio/soundtouch/Makefile | 46 +++++++++--------------
audio/soundtouch/distinfo | 6 +--
audio/soundtouch/files/patch-CMakeLists.txt (new) | 46 +++++++++++++++++++++++
audio/soundtouch/pkg-plist | 10 +++--
4 files changed, 72 insertions(+), 36 deletions(-)
Is there any reason why OPENMP is enabled only for aarch64 and amd64?
(In reply to Piotr Kubaj from comment #11)
They're the only platforms I have available for testing
(In reply to Daniel Engberg from comment #12)
Do you mind if I test on powerpc64 and powerpc64le and enable it there if it works?
I could also test on riscv64, but since the board is quite slow, it will take some time.
Not at all, go ahead! :)