diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-05-27 03:23:33 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-05-27 03:23:33 -0400 |
commit | b5a6517e9d8f319d7a965fd5c5751b925efeb064 (patch) | |
tree | 3d4f548f85fa87a736b72eef237fb6fbd44d16af /lib | |
parent | 30fe6eb66c59f8c2b0b16ef305a9ab3742595115 (diff) | |
download | rockbox-b5a6517e9d8f319d7a965fd5c5751b925efeb064.tar.gz rockbox-b5a6517e9d8f319d7a965fd5c5751b925efeb064.zip |
Remove explicit config.h and system.h includes from DSP code.
Replace with rbcodecconfig.h and platform.h includes. Remove now-
unneeded ones as well.
Change-Id: I6111b71e90bf86d9fe272a7916f2d34a5c6dd724
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbcodec/dsp/channel_mode.c | 3 | ||||
-rw-r--r-- | lib/rbcodec/dsp/compressor.c | 2 | ||||
-rw-r--r-- | lib/rbcodec/dsp/crossfeed.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_arm.S | 2 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_cf.S | 2 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_core.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_filter.c | 5 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_misc.c | 2 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_sample_input.c | 5 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_sample_output.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/dsp/eq.c | 3 | ||||
-rw-r--r-- | lib/rbcodec/dsp/pga.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/dsp/resample.c | 4 | ||||
-rw-r--r-- | lib/rbcodec/dsp/tdspeed.c | 2 | ||||
-rw-r--r-- | lib/rbcodec/dsp/tone_controls.c | 7 | ||||
-rw-r--r-- | lib/rbcodec/platform.h | 12 |
16 files changed, 34 insertions, 31 deletions
diff --git a/lib/rbcodec/dsp/channel_mode.c b/lib/rbcodec/dsp/channel_mode.c index 2ae2d45fd3..aa92cec412 100644 --- a/lib/rbcodec/dsp/channel_mode.c +++ b/lib/rbcodec/dsp/channel_mode.c | |||
@@ -19,8 +19,7 @@ | |||
19 | * KIND, either express or implied. | 19 | * KIND, either express or implied. |
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "config.h" | 22 | #include "rbcodecconfig.h" |
23 | #include "system.h" | ||
24 | #include "sound.h" | 23 | #include "sound.h" |
25 | #include "fixedpoint.h" | 24 | #include "fixedpoint.h" |
26 | #include "fracmul.h" | 25 | #include "fracmul.h" |
diff --git a/lib/rbcodec/dsp/compressor.c b/lib/rbcodec/dsp/compressor.c index bdcc37be91..630672a343 100644 --- a/lib/rbcodec/dsp/compressor.c +++ b/lib/rbcodec/dsp/compressor.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "config.h" | 21 | #include "rbcodecconfig.h" |
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | #include <sys/types.h> | 23 | #include <sys/types.h> |
24 | #include "fixedpoint.h" | 24 | #include "fixedpoint.h" |
diff --git a/lib/rbcodec/dsp/crossfeed.c b/lib/rbcodec/dsp/crossfeed.c index bd8ee95042..36a98f1f33 100644 --- a/lib/rbcodec/dsp/crossfeed.c +++ b/lib/rbcodec/dsp/crossfeed.c | |||
@@ -20,9 +20,7 @@ | |||
20 | * KIND, either express or implied. | 20 | * KIND, either express or implied. |
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "config.h" | 23 | #include "rbcodecconfig.h" |
24 | #include <stdbool.h> | ||
25 | #include <sys/types.h> | ||
26 | #include "fixedpoint.h" | 24 | #include "fixedpoint.h" |
27 | #include "fracmul.h" | 25 | #include "fracmul.h" |
28 | #include "replaygain.h" | 26 | #include "replaygain.h" |
diff --git a/lib/rbcodec/dsp/dsp_arm.S b/lib/rbcodec/dsp/dsp_arm.S index 5b899fa718..ed58bed340 100644 --- a/lib/rbcodec/dsp/dsp_arm.S +++ b/lib/rbcodec/dsp/dsp_arm.S | |||
@@ -20,7 +20,7 @@ | |||
20 | * KIND, either express or implied. | 20 | * KIND, either express or implied. |
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "config.h" | 23 | #include "rbcodecconfig.h" |
24 | 24 | ||
25 | /**************************************************************************** | 25 | /**************************************************************************** |
26 | * void channel_mode_proc_mono(struct dsp_proc_entry *this, | 26 | * void channel_mode_proc_mono(struct dsp_proc_entry *this, |
diff --git a/lib/rbcodec/dsp/dsp_cf.S b/lib/rbcodec/dsp/dsp_cf.S index 4b0c6276e1..02db8f61b6 100644 --- a/lib/rbcodec/dsp/dsp_cf.S +++ b/lib/rbcodec/dsp/dsp_cf.S | |||
@@ -20,7 +20,7 @@ | |||
20 | * KIND, either express or implied. | 20 | * KIND, either express or implied. |
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "config.h" | 23 | #include "rbcodecconfig.h" |
24 | 24 | ||
25 | /**************************************************************************** | 25 | /**************************************************************************** |
26 | * void pga_process(struct dsp_proc_entry *this, struct dsp_buffer **buf_p) | 26 | * void pga_process(struct dsp_proc_entry *this, struct dsp_buffer **buf_p) |
diff --git a/lib/rbcodec/dsp/dsp_core.c b/lib/rbcodec/dsp/dsp_core.c index 5e365eb08d..871ccbfd23 100644 --- a/lib/rbcodec/dsp/dsp_core.c +++ b/lib/rbcodec/dsp/dsp_core.c | |||
@@ -19,12 +19,10 @@ | |||
19 | * KIND, either express or implied. | 19 | * KIND, either express or implied. |
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "config.h" | 22 | #include "rbcodecconfig.h" |
23 | #include "system.h" | ||
24 | #include "platform.h" | 23 | #include "platform.h" |
25 | #include "dsp_core.h" | 24 | #include "dsp_core.h" |
26 | #include "dsp_sample_io.h" | 25 | #include "dsp_sample_io.h" |
27 | #include <sys/types.h> | ||
28 | 26 | ||
29 | /* Define LOGF_ENABLE to enable logf output in this file */ | 27 | /* Define LOGF_ENABLE to enable logf output in this file */ |
30 | /*#define LOGF_ENABLE*/ | 28 | /*#define LOGF_ENABLE*/ |
diff --git a/lib/rbcodec/dsp/dsp_filter.c b/lib/rbcodec/dsp/dsp_filter.c index ee0ce1b18f..b74d499e51 100644 --- a/lib/rbcodec/dsp/dsp_filter.c +++ b/lib/rbcodec/dsp/dsp_filter.c | |||
@@ -18,13 +18,12 @@ | |||
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include <stdbool.h> | 21 | #include "rbcodecconfig.h" |
22 | #include <string.h> | ||
23 | #include "config.h" | ||
24 | #include "fixedpoint.h" | 22 | #include "fixedpoint.h" |
25 | #include "fracmul.h" | 23 | #include "fracmul.h" |
26 | #include "dsp_filter.h" | 24 | #include "dsp_filter.h" |
27 | #include "replaygain.h" | 25 | #include "replaygain.h" |
26 | #include <string.h> | ||
28 | 27 | ||
29 | enum filter_shift | 28 | enum filter_shift |
30 | { | 29 | { |
diff --git a/lib/rbcodec/dsp/dsp_misc.c b/lib/rbcodec/dsp/dsp_misc.c index 40d198ff50..03c6a70052 100644 --- a/lib/rbcodec/dsp/dsp_misc.c +++ b/lib/rbcodec/dsp/dsp_misc.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * KIND, either express or implied. | 21 | * KIND, either express or implied. |
22 | * | 22 | * |
23 | ****************************************************************************/ | 23 | ****************************************************************************/ |
24 | #include "config.h" | 24 | #include "rbcodecconfig.h" |
25 | #include "sound.h" | 25 | #include "sound.h" |
26 | #include "fixedpoint.h" | 26 | #include "fixedpoint.h" |
27 | #include "replaygain.h" | 27 | #include "replaygain.h" |
diff --git a/lib/rbcodec/dsp/dsp_sample_input.c b/lib/rbcodec/dsp/dsp_sample_input.c index 65d2a110e1..561cb36d9e 100644 --- a/lib/rbcodec/dsp/dsp_sample_input.c +++ b/lib/rbcodec/dsp/dsp_sample_input.c | |||
@@ -19,9 +19,10 @@ | |||
19 | * KIND, either express or implied. | 19 | * KIND, either express or implied. |
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "config.h" | 22 | #include "rbcodecconfig.h" |
23 | #include "system.h" | 23 | #include "platform.h" |
24 | #include "fixedpoint.h" | 24 | #include "fixedpoint.h" |
25 | #include "gcc_extensions.h" | ||
25 | #include "dsp_core.h" | 26 | #include "dsp_core.h" |
26 | #include "dsp_sample_io.h" | 27 | #include "dsp_sample_io.h" |
27 | #include "dsp_proc_entry.h" | 28 | #include "dsp_proc_entry.h" |
diff --git a/lib/rbcodec/dsp/dsp_sample_output.c b/lib/rbcodec/dsp/dsp_sample_output.c index d57d236cbb..65cd7ccf15 100644 --- a/lib/rbcodec/dsp/dsp_sample_output.c +++ b/lib/rbcodec/dsp/dsp_sample_output.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * KIND, either express or implied. | 19 | * KIND, either express or implied. |
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "config.h" | 22 | #include "rbcodecconfig.h" |
23 | #include "system.h" | 23 | #include "platform.h" |
24 | #include "dsp_core.h" | 24 | #include "dsp_core.h" |
25 | #include "dsp_sample_io.h" | 25 | #include "dsp_sample_io.h" |
26 | #include "dsp_proc_entry.h" | 26 | #include "dsp_proc_entry.h" |
diff --git a/lib/rbcodec/dsp/eq.c b/lib/rbcodec/dsp/eq.c index 372ef9bbad..94cb61deec 100644 --- a/lib/rbcodec/dsp/eq.c +++ b/lib/rbcodec/dsp/eq.c | |||
@@ -19,8 +19,7 @@ | |||
19 | * KIND, either express or implied. | 19 | * KIND, either express or implied. |
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "config.h" | 22 | #include "rbcodecconfig.h" |
23 | #include "system.h" | ||
24 | #include "fixedpoint.h" | 23 | #include "fixedpoint.h" |
25 | #include "fracmul.h" | 24 | #include "fracmul.h" |
26 | #include "dsp_filter.h" | 25 | #include "dsp_filter.h" |
diff --git a/lib/rbcodec/dsp/pga.c b/lib/rbcodec/dsp/pga.c index 522789fcf2..9d57f4c2cb 100644 --- a/lib/rbcodec/dsp/pga.c +++ b/lib/rbcodec/dsp/pga.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * KIND, either express or implied. | 19 | * KIND, either express or implied. |
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "config.h" | 22 | #include "rbcodecconfig.h" |
23 | #include "system.h" | 23 | #include "platform.h" |
24 | #include "dsp-util.h" | 24 | #include "dsp-util.h" |
25 | #include "fixedpoint.h" | 25 | #include "fixedpoint.h" |
26 | #include "fracmul.h" | 26 | #include "fracmul.h" |
diff --git a/lib/rbcodec/dsp/resample.c b/lib/rbcodec/dsp/resample.c index 176fedc742..6e7e5b7b45 100644 --- a/lib/rbcodec/dsp/resample.c +++ b/lib/rbcodec/dsp/resample.c | |||
@@ -20,8 +20,8 @@ | |||
20 | * KIND, either express or implied. | 20 | * KIND, either express or implied. |
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "config.h" | 23 | #include "rbcodecconfig.h" |
24 | #include "system.h" | 24 | #include "platform.h" |
25 | #include "fracmul.h" | 25 | #include "fracmul.h" |
26 | #include "fixedpoint.h" | 26 | #include "fixedpoint.h" |
27 | #include "dsp_proc_entry.h" | 27 | #include "dsp_proc_entry.h" |
diff --git a/lib/rbcodec/dsp/tdspeed.c b/lib/rbcodec/dsp/tdspeed.c index e668c85032..21585eb78e 100644 --- a/lib/rbcodec/dsp/tdspeed.c +++ b/lib/rbcodec/dsp/tdspeed.c | |||
@@ -20,8 +20,8 @@ | |||
20 | * KIND, either express or implied. | 20 | * KIND, either express or implied. |
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "rbcodecconfig.h" | ||
23 | #include "platform.h" | 24 | #include "platform.h" |
24 | #include "config.h" | ||
25 | #include "sound.h" | 25 | #include "sound.h" |
26 | #include "core_alloc.h" | 26 | #include "core_alloc.h" |
27 | #include "dsp-util.h" | 27 | #include "dsp-util.h" |
diff --git a/lib/rbcodec/dsp/tone_controls.c b/lib/rbcodec/dsp/tone_controls.c index 01381ea330..e636b04b9a 100644 --- a/lib/rbcodec/dsp/tone_controls.c +++ b/lib/rbcodec/dsp/tone_controls.c | |||
@@ -19,14 +19,11 @@ | |||
19 | * KIND, either express or implied. | 19 | * KIND, either express or implied. |
20 | * | 20 | * |
21 | ****************************************************************************/ | 21 | ****************************************************************************/ |
22 | #include "config.h" | 22 | #include "rbcodecconfig.h" |
23 | #include <stdbool.h> | 23 | #include "platform.h" |
24 | #include <sys/types.h> | ||
25 | #include <stdint.h> | ||
26 | #include "dsp_proc_entry.h" | 24 | #include "dsp_proc_entry.h" |
27 | #include "dsp_filter.h" | 25 | #include "dsp_filter.h" |
28 | #include "tone_controls.h" | 26 | #include "tone_controls.h" |
29 | #include <string.h> | ||
30 | 27 | ||
31 | /* These apply to all DSP streams to remain as consistant as possible with | 28 | /* These apply to all DSP streams to remain as consistant as possible with |
32 | * the behavior of hardware tone controls */ | 29 | * the behavior of hardware tone controls */ |
diff --git a/lib/rbcodec/platform.h b/lib/rbcodec/platform.h index fe79358b21..be2fd059d9 100644 --- a/lib/rbcodec/platform.h +++ b/lib/rbcodec/platform.h | |||
@@ -31,6 +31,16 @@ size_t strlcpy(char *dst, const char *src, size_t siz); | |||
31 | #ifndef BIT_N | 31 | #ifndef BIT_N |
32 | # define BIT_N(n) (1U << (n)) | 32 | # define BIT_N(n) (1U << (n)) |
33 | #endif | 33 | #endif |
34 | |||
35 | #ifndef MASK_N | ||
36 | /* Make a mask of n contiguous bits, shifted left by 'shift' */ | ||
37 | # define MASK_N(type, n, shift) \ | ||
38 | ((type)((((type)1 << (n)) - (type)1) << (shift))) | ||
39 | #endif | ||
40 | |||
41 | #ifndef INIT_ATTR | ||
42 | # define INIT_ATTR | ||
43 | #endif | ||
34 | /* | 44 | /* |
35 | #ifdef CODEC | 45 | #ifdef CODEC |
36 | 46 | ||
@@ -115,4 +125,6 @@ static inline int32_t clip_sample_16(int32_t sample) | |||
115 | } | 125 | } |
116 | #endif | 126 | #endif |
117 | */ | 127 | */ |
128 | |||
129 | int find_first_set_bit(uint32_t value); | ||
118 | #endif /* PLATFORM_H_INCLUDED */ | 130 | #endif /* PLATFORM_H_INCLUDED */ |