diff options
Diffstat (limited to 'lib/rbcodec/dsp/dsp_asm.h')
-rw-r--r-- | lib/rbcodec/dsp/dsp_asm.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/lib/rbcodec/dsp/dsp_asm.h b/lib/rbcodec/dsp/dsp_asm.h new file mode 100644 index 0000000000..7bf18370a3 --- /dev/null +++ b/lib/rbcodec/dsp/dsp_asm.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 Thom Johansen | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include <config.h> | ||
23 | |||
24 | #ifndef _DSP_ASM_H | ||
25 | #define _DSP_ASM_H | ||
26 | |||
27 | /* Set the appropriate #defines based on CPU or whatever matters */ | ||
28 | #if defined(CPU_ARM) | ||
29 | #define DSP_HAVE_ASM_APPLY_GAIN | ||
30 | #define DSP_HAVE_ASM_RESAMPLING | ||
31 | #define DSP_HAVE_ASM_CROSSFEED | ||
32 | #define DSP_HAVE_ASM_SOUND_CHAN_MONO | ||
33 | #define DSP_HAVE_ASM_SOUND_CHAN_CUSTOM | ||
34 | #define DSP_HAVE_ASM_SOUND_CHAN_KARAOKE | ||
35 | #define DSP_HAVE_ASM_SAMPLE_OUTPUT_MONO | ||
36 | #define DSP_HAVE_ASM_SAMPLE_OUTPUT_STEREO | ||
37 | #elif defined (CPU_COLDFIRE) | ||
38 | #define DSP_HAVE_ASM_APPLY_GAIN | ||
39 | #define DSP_HAVE_ASM_RESAMPLING | ||
40 | #define DSP_HAVE_ASM_CROSSFEED | ||
41 | #define DSP_HAVE_ASM_SOUND_CHAN_MONO | ||
42 | #define DSP_HAVE_ASM_SOUND_CHAN_CUSTOM | ||
43 | #define DSP_HAVE_ASM_SOUND_CHAN_KARAOKE | ||
44 | #define DSP_HAVE_ASM_SAMPLE_OUTPUT_MONO | ||
45 | #define DSP_HAVE_ASM_SAMPLE_OUTPUT_STEREO | ||
46 | #endif /* CPU_COLDFIRE */ | ||
47 | |||
48 | /* Declare prototypes based upon what's #defined above */ | ||
49 | #ifdef DSP_HAVE_ASM_CROSSFEED | ||
50 | void apply_crossfeed(int count, int32_t *buf[]); | ||
51 | #endif | ||
52 | |||
53 | #ifdef DSP_HAVE_ASM_APPLY_GAIN | ||
54 | void dsp_apply_gain(int count, struct dsp_data *data, int32_t *buf[]); | ||
55 | #endif /* DSP_HAVE_ASM_APPLY_GAIN* */ | ||
56 | |||
57 | #ifdef DSP_HAVE_ASM_RESAMPLING | ||
58 | int dsp_upsample(int count, struct dsp_data *data, | ||
59 | const int32_t *src[], int32_t *dst[]); | ||
60 | int dsp_downsample(int count, struct dsp_data *data, | ||
61 | const int32_t *src[], int32_t *dst[]); | ||
62 | #endif /* DSP_HAVE_ASM_RESAMPLING */ | ||
63 | |||
64 | #ifdef DSP_HAVE_ASM_SOUND_CHAN_MONO | ||
65 | void channels_process_sound_chan_mono(int count, int32_t *buf[]); | ||
66 | #endif | ||
67 | |||
68 | #ifdef DSP_HAVE_ASM_SOUND_CHAN_CUSTOM | ||
69 | void channels_process_sound_chan_custom(int count, int32_t *buf[]); | ||
70 | #endif | ||
71 | |||
72 | #ifdef DSP_HAVE_ASM_SOUND_CHAN_KARAOKE | ||
73 | void channels_process_sound_chan_karaoke(int count, int32_t *buf[]); | ||
74 | #endif | ||
75 | |||
76 | #ifdef DSP_HAVE_ASM_SAMPLE_OUTPUT_STEREO | ||
77 | void sample_output_stereo(int count, struct dsp_data *data, | ||
78 | const int32_t *src[], int16_t *dst); | ||
79 | #endif | ||
80 | |||
81 | #ifdef DSP_HAVE_ASM_SAMPLE_OUTPUT_MONO | ||
82 | void sample_output_mono(int count, struct dsp_data *data, | ||
83 | const int32_t *src[], int16_t *dst); | ||
84 | #endif | ||
85 | |||
86 | #endif /* _DSP_ASM_H */ | ||