]> code.delx.au - pulseaudio/blob - src/pulsecore/cpu-arm.h
core: Initialize ARM NEON remapping code if available
[pulseaudio] / src / pulsecore / cpu-arm.h
1 #ifndef foocpuarmhfoo
2 #define foocpuarmhfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 Copyright 2004-2006 Lennart Poettering
8 Copyright 2009 Wim Taymans <wim.taymans@collabora.co.uk>
9
10 PulseAudio is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published
12 by the Free Software Foundation; either version 2.1 of the License,
13 or (at your option) any later version.
14
15 PulseAudio is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with PulseAudio; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 USA.
24 ***/
25
26 #include <stdint.h>
27 #include <pulsecore/macro.h>
28
29 #ifndef PACKAGE
30 #error "Please include config.h before including this file!"
31 #endif
32
33 typedef enum pa_cpu_arm_flag {
34 PA_CPU_ARM_V6 = (1 << 0),
35 PA_CPU_ARM_V7 = (1 << 1),
36 PA_CPU_ARM_VFP = (1 << 2),
37 PA_CPU_ARM_EDSP = (1 << 3),
38 PA_CPU_ARM_NEON = (1 << 4),
39 PA_CPU_ARM_VFPV3 = (1 << 5),
40 PA_CPU_ARM_CORTEX_A8 = (1 << 6),
41 } pa_cpu_arm_flag_t;
42
43 void pa_cpu_get_arm_flags(pa_cpu_arm_flag_t *flags);
44 bool pa_cpu_init_arm(pa_cpu_arm_flag_t *flags);
45
46 /* some optimized functions */
47 void pa_volume_func_init_arm(pa_cpu_arm_flag_t flags);
48
49 #ifdef HAVE_NEON
50 void pa_convert_func_init_neon(pa_cpu_arm_flag_t flags);
51 void pa_mix_func_init_neon(pa_cpu_arm_flag_t flags);
52 void pa_remap_func_init_neon(pa_cpu_arm_flag_t flags);
53 #endif
54
55 #endif /* foocpuarmhfoo */