Skip to contentSkip to conversation

mpg123: Add support for FPU-less targets

PATCH In review [email protected] 2 participants 4 messages Feb 9, 2021 – Feb 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpg123: Add support for FPU-less targets

From: Robert Rosengren <[email protected]>

Support added to configure mpg123 for FPU-less targets. Building for fixed-point arithmetic increases performance on such devices.

---
 meta/recipes-multimedia/mpg123/mpg123_1.26.4.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-multimedia/mpg123/mpg123_1.26.4.bb +1 -0
index c9bbcd30ff..35cad6ffc4 100644
@@ -40,6 +40,7 @@ EXTRA_OECONF = " \
     --with-audio='${AUDIOMODS}' \
     ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
     ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
+    ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-cpu=generic_nofpu', '', d)} \
 "
 # Fails to build with thumb-1 (qemuarm)
 #| {standard input}: Assembler messages:
Signature · 1 line
2.20.1
#1 lore raw

is --with-cpu=generic_nofpu applicable for all soft fpu machines or just arm ? I wonder if it will improve or regress other nofpu machines. Do you have any data

Quoted 29 lines · On Tue, Feb 9, 2021 at 6:16 AM <[email protected]> wrote:

From: Robert Rosengren <[email protected]>

Support added to configure mpg123 for FPU-less targets. Building for fixed-point arithmetic increases performance on such devices.

---
 meta/recipes-multimedia/mpg123/mpg123_1.26.4.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-multimedia/mpg123/mpg123_1.26.4.bb +1 -1
index c9bbcd30ff..35cad6ffc4 100644
@@ -40,6 +40,7 @@ EXTRA_OECONF = " \
     --with-audio='${AUDIOMODS}' \
     ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
     ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
+    ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-cpu=generic_nofpu', '', d)} \
 "
 # Fails to build with thumb-1 (qemuarm)
 #| {standard input}: Assembler messages:
--

2.20.1

#2 lore raw

Actually, I used a MIPS-based device lacking FPU and ran simple gstreamer/gst-play to test a mp3. A very non-scientific measurement on that device using nmon moved from roughly 100% CPU load and stuttering audio to a doable ~15-20% CPU load with the fixed point configuration. (of course all such measurements depends heavily on audio latency, queues and so on of a device hardware.)

Quoted 4 lines · Khem Raj

is --with-cpu=generic_nofpu applicable for all soft fpu machines or just arm ? I wonder if it will improve or regress other nofpu machines. Do you have any data

#3 lore raw
Quoted 3 lines · Robert Rosengren

Actually, I used a MIPS-based device lacking FPU and ran simple gstreamer/gst-play to test a mp3. A very non-scientific measurement on that device using nmon moved from roughly 100% CPU load and stuttering audio to a doable ~15-20% CPU load with the fixed point configuration. (of course all such measurements depends heavily on audio latency, queues and so on of a device hardware.)

OK thanks, this makes sense.

Quoted 5 lines · Khem Raj
Quoted 4 lines

is --with-cpu=generic_nofpu applicable for all soft fpu machines or just arm ? I wonder if it will improve or regress other nofpu machines. Do you have any data