Skip to contentSkip to conversation

pulseaudio: fix NEON usage

PATCH New Thomas Petazzoni 2 participants 2 messages Aug 22, 2013 – Aug 27, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pulseaudio: fix NEON usage

The NEON intrinsics used by Pulseaudio are only available in either -mfloat-abi=softfp or -mfloat-abi=hard, not in -mfloat-abi=soft. Therefore having NEON support in the processor is not sufficient, we also should *not* be using soft-float.

Moreover, looking at BR2_ARM_ENABLE_NEON to know if the processor has NEON support is incorrect. This option is only here to allow the user to tell whether the processor has NEON support or not, for the ARM cores that only have optional NEON support. Instead, the BR2_ARM_CPU_HAS_NEON option really indicates whether NEON is available or not (it is either set automatically by the ARM cores that always have NEON support, or when BR2_ARM_ENABLE_NEON is enabled by the user to confirm that his ARM processor has NEON support).

This fixes build failures such as
http://autobuild.buildroot.org/results/675/675c96059be348b594cc92980bef391126931c83/build-end.log

---
 package/multimedia/pulseaudio/pulseaudio.mk | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
package/multimedia/pulseaudio/pulseaudio.mk +12 -1
index 910e4a7..ad28ca6 100644
@@ -55,7 +55,18 @@ endef
 PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FORCE_CC
 endif
 
-PULSEAUDIO_CONF_OPT += $(if $(BR2_ARM_ENABLE_NEON),--enable-neon-opt=yes,--enable-neon-opt=no)
+ifeq ($(BR2_ARM_SOFT_FLOAT),)
+ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
+PULSEAUDIO_USE_NEON = y
+endif
+endif
+
+ifeq ($(PULSEAUDIO_USE_NEON),y)
+PULSEAUDIO_CONF_OPT += --enable-neon-opt=yes
+else
+PULSEAUDIO_CONF_OPT += --enable-neon-opt=no
+endif
+
 # pulseaudio alsa backend needs pcm/mixer apis
 ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy)
 PULSEAUDIO_CONF_OPT += --disable-alsa
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 pulseaudio: fix NEON usage

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> The NEON intrinsics used by Pulseaudio are only available in either Thomas> -mfloat-abi=softfp or -mfloat-abi=hard, not in
Thomas> -mfloat-abi=soft. Therefore having NEON support in the processor is Thomas> not sufficient, we also should *not* be using soft-float.

Thomas> Moreover, looking at BR2_ARM_ENABLE_NEON to know if the processor has Thomas> NEON support is incorrect. This option is only here to allow the user Thomas> to tell whether the processor has NEON support or not, for the ARM Thomas> cores that only have optional NEON support. Instead, the Thomas> BR2_ARM_CPU_HAS_NEON option really indicates whether NEON is available Thomas> or not (it is either set automatically by the ARM cores that always Thomas> have NEON support, or when BR2_ARM_ENABLE_NEON is enabled by the user Thomas> to confirm that his ARM processor has NEON support).

Thomas> This fixes build failures such as
Thomas> http://autobuild.buildroot.org/results/675/675c96059be348b594cc92980bef391126931c83/build-end.log

Thomas> Signed-off-by: Thomas Petazzoni <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard