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.zip rockbox-b5a6517e9d8f319d7a965fd5c5751b925efeb064.tar.gz rockbox-b5a6517e9d8f319d7a965fd5c5751b925efeb064.tar.bz2 rockbox-b5a6517e9d8f319d7a965fd5c5751b925efeb064.tar.xz | |
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 2ae2d45..aa92cec 100644 --- a/lib/rbcodec/dsp/channel_mode.c +++ b/lib/rbcodec/dsp/channel_mode.c @@ -19,8 +19,7 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include "system.h" +#include "rbcodecconfig.h" #include "sound.h" #include "fixedpoint.h" #include "fracmul.h" diff --git a/lib/rbcodec/dsp/compressor.c b/lib/rbcodec/dsp/compressor.c index bdcc37b..630672a 100644 --- a/lib/rbcodec/dsp/compressor.c +++ b/lib/rbcodec/dsp/compressor.c @@ -18,7 +18,7 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" +#include "rbcodecconfig.h" #include <stdbool.h> #include <sys/types.h> #include "fixedpoint.h" diff --git a/lib/rbcodec/dsp/crossfeed.c b/lib/rbcodec/dsp/crossfeed.c index bd8ee95..36a98f1 100644 --- a/lib/rbcodec/dsp/crossfeed.c +++ b/lib/rbcodec/dsp/crossfeed.c @@ -20,9 +20,7 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include <stdbool.h> -#include <sys/types.h> +#include "rbcodecconfig.h" #include "fixedpoint.h" #include "fracmul.h" #include "replaygain.h" diff --git a/lib/rbcodec/dsp/dsp_arm.S b/lib/rbcodec/dsp/dsp_arm.S index 5b899fa..ed58bed 100644 --- a/lib/rbcodec/dsp/dsp_arm.S +++ b/lib/rbcodec/dsp/dsp_arm.S @@ -20,7 +20,7 @@ * KIND, either express or implied. * ****************************************************************************/ - #include "config.h" + #include "rbcodecconfig.h" /**************************************************************************** * 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 4b0c627..02db8f6 100644 --- a/lib/rbcodec/dsp/dsp_cf.S +++ b/lib/rbcodec/dsp/dsp_cf.S @@ -20,7 +20,7 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" +#include "rbcodecconfig.h" /**************************************************************************** * 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 5e365eb..871ccbf 100644 --- a/lib/rbcodec/dsp/dsp_core.c +++ b/lib/rbcodec/dsp/dsp_core.c @@ -19,12 +19,10 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include "system.h" +#include "rbcodecconfig.h" #include "platform.h" #include "dsp_core.h" #include "dsp_sample_io.h" -#include <sys/types.h> /* Define LOGF_ENABLE to enable logf output in this file */ /*#define LOGF_ENABLE*/ diff --git a/lib/rbcodec/dsp/dsp_filter.c b/lib/rbcodec/dsp/dsp_filter.c index ee0ce1b..b74d499 100644 --- a/lib/rbcodec/dsp/dsp_filter.c +++ b/lib/rbcodec/dsp/dsp_filter.c @@ -18,13 +18,12 @@ * KIND, either express or implied. * ****************************************************************************/ -#include <stdbool.h> -#include <string.h> -#include "config.h" +#include "rbcodecconfig.h" #include "fixedpoint.h" #include "fracmul.h" #include "dsp_filter.h" #include "replaygain.h" +#include <string.h> enum filter_shift { diff --git a/lib/rbcodec/dsp/dsp_misc.c b/lib/rbcodec/dsp/dsp_misc.c index 40d198f..03c6a70 100644 --- a/lib/rbcodec/dsp/dsp_misc.c +++ b/lib/rbcodec/dsp/dsp_misc.c @@ -21,7 +21,7 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" +#include "rbcodecconfig.h" #include "sound.h" #include "fixedpoint.h" #include "replaygain.h" diff --git a/lib/rbcodec/dsp/dsp_sample_input.c b/lib/rbcodec/dsp/dsp_sample_input.c index 65d2a11..561cb36 100644 --- a/lib/rbcodec/dsp/dsp_sample_input.c +++ b/lib/rbcodec/dsp/dsp_sample_input.c @@ -19,9 +19,10 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include "system.h" +#include "rbcodecconfig.h" +#include "platform.h" #include "fixedpoint.h" +#include "gcc_extensions.h" #include "dsp_core.h" #include "dsp_sample_io.h" #include "dsp_proc_entry.h" diff --git a/lib/rbcodec/dsp/dsp_sample_output.c b/lib/rbcodec/dsp/dsp_sample_output.c index d57d236..65cd7cc 100644 --- a/lib/rbcodec/dsp/dsp_sample_output.c +++ b/lib/rbcodec/dsp/dsp_sample_output.c @@ -19,8 +19,8 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include "system.h" +#include "rbcodecconfig.h" +#include "platform.h" #include "dsp_core.h" #include "dsp_sample_io.h" #include "dsp_proc_entry.h" diff --git a/lib/rbcodec/dsp/eq.c b/lib/rbcodec/dsp/eq.c index 372ef9b..94cb61d 100644 --- a/lib/rbcodec/dsp/eq.c +++ b/lib/rbcodec/dsp/eq.c @@ -19,8 +19,7 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include "system.h" +#include "rbcodecconfig.h" #include "fixedpoint.h" #include "fracmul.h" #include "dsp_filter.h" diff --git a/lib/rbcodec/dsp/pga.c b/lib/rbcodec/dsp/pga.c index 522789f..9d57f4c 100644 --- a/lib/rbcodec/dsp/pga.c +++ b/lib/rbcodec/dsp/pga.c @@ -19,8 +19,8 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include "system.h" +#include "rbcodecconfig.h" +#include "platform.h" #include "dsp-util.h" #include "fixedpoint.h" #include "fracmul.h" diff --git a/lib/rbcodec/dsp/resample.c b/lib/rbcodec/dsp/resample.c index 176fedc..6e7e5b7 100644 --- a/lib/rbcodec/dsp/resample.c +++ b/lib/rbcodec/dsp/resample.c @@ -20,8 +20,8 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include "system.h" +#include "rbcodecconfig.h" +#include "platform.h" #include "fracmul.h" #include "fixedpoint.h" #include "dsp_proc_entry.h" diff --git a/lib/rbcodec/dsp/tdspeed.c b/lib/rbcodec/dsp/tdspeed.c index e668c85..21585eb 100644 --- a/lib/rbcodec/dsp/tdspeed.c +++ b/lib/rbcodec/dsp/tdspeed.c @@ -20,8 +20,8 @@ * KIND, either express or implied. * ****************************************************************************/ +#include "rbcodecconfig.h" #include "platform.h" -#include "config.h" #include "sound.h" #include "core_alloc.h" #include "dsp-util.h" diff --git a/lib/rbcodec/dsp/tone_controls.c b/lib/rbcodec/dsp/tone_controls.c index 01381ea..e636b04 100644 --- a/lib/rbcodec/dsp/tone_controls.c +++ b/lib/rbcodec/dsp/tone_controls.c @@ -19,14 +19,11 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "config.h" -#include <stdbool.h> -#include <sys/types.h> -#include <stdint.h> +#include "rbcodecconfig.h" +#include "platform.h" #include "dsp_proc_entry.h" #include "dsp_filter.h" #include "tone_controls.h" -#include <string.h> /* These apply to all DSP streams to remain as consistant as possible with * the behavior of hardware tone controls */ diff --git a/lib/rbcodec/platform.h b/lib/rbcodec/platform.h index fe79358..be2fd05 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); #ifndef BIT_N # define BIT_N(n) (1U << (n)) #endif + +#ifndef MASK_N +/* Make a mask of n contiguous bits, shifted left by 'shift' */ +# define MASK_N(type, n, shift) \ + ((type)((((type)1 << (n)) - (type)1) << (shift))) +#endif + +#ifndef INIT_ATTR +# define INIT_ATTR +#endif /* #ifdef CODEC @@ -115,4 +125,6 @@ static inline int32_t clip_sample_16(int32_t sample) } #endif */ + +int find_first_set_bit(uint32_t value); #endif /* PLATFORM_H_INCLUDED */ |