[pulseaudio-discuss] detection of SSE3 support in configure.ac

Arun Raghavan arun.raghavan at collabora.co.uk
Mon Dec 5 09:54:02 PST 2011

On Mon, 2011-12-05 at 11:17 -0600, Pierre-Louis Bossart wrote:
> I have an optimized SSE-based resampling library that I bolted in
> PulseAudio. It was measured to bring a 2x speed-up over speex, mainly
> because it uses fixed-tables instead of interpolations, the price being that
> it can only be used for fixed-rate sinks/sources.
> Since it's hardware-specific, I'd need a means to enable/disable it at
> compile time, using some kind of voodoo magic in configure.ac. Does anyone
> have pointers on SSE detection logic? To make things safe, I also detect SSE
> at run time but would like to disable it completely for other non-x86 or
> older platforms.

The run-time detection is already available in the pa_cpu_info structure
in pa_core.

At compile-time, you could follow something similar to what we've done
for some ARM instructions in configure.ac for the ssat and pkhbt
instructions -- just a small assembly fragment in a C program that can
be run through the compiler to make sure the assembler accepts it.


More information about the pulseaudio-discuss mailing list