summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-05-27 03:23:33 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-05-27 03:23:33 -0400
commitb5a6517e9d8f319d7a965fd5c5751b925efeb064 (patch)
tree3d4f548f85fa87a736b72eef237fb6fbd44d16af /lib
parent30fe6eb66c59f8c2b0b16ef305a9ab3742595115 (diff)
downloadrockbox-b5a6517e9d8f319d7a965fd5c5751b925efeb064.tar.gz
rockbox-b5a6517e9d8f319d7a965fd5c5751b925efeb064.tar.bz2
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.c3
-rw-r--r--lib/rbcodec/dsp/compressor.c2
-rw-r--r--lib/rbcodec/dsp/crossfeed.c4
-rw-r--r--lib/rbcodec/dsp/dsp_arm.S2
-rw-r--r--lib/rbcodec/dsp/dsp_cf.S2
-rw-r--r--lib/rbcodec/dsp/dsp_core.c4
-rw-r--r--lib/rbcodec/dsp/dsp_filter.c5
-rw-r--r--lib/rbcodec/dsp/dsp_misc.c2
-rw-r--r--lib/rbcodec/dsp/dsp_sample_input.c5
-rw-r--r--lib/rbcodec/dsp/dsp_sample_output.c4
-rw-r--r--lib/rbcodec/dsp/eq.c3
-rw-r--r--lib/rbcodec/dsp/pga.c4
-rw-r--r--lib/rbcodec/dsp/resample.c4
-rw-r--r--lib/rbcodec/dsp/tdspeed.c2
-rw-r--r--lib/rbcodec/dsp/tone_controls.c7
-rw-r--r--lib/rbcodec/platform.h12
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 @@
* 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 bdcc37be91..630672a343 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 bd8ee95042..36a98f1f33 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 5b899fa718..ed58bed340 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 4b0c6276e1..02db8f61b6 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 5e365eb08d..871ccbfd23 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 ee0ce1b18f..b74d499e51 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 40d198ff50..03c6a70052 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 65d2a110e1..561cb36d9e 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 d57d236cbb..65cd7ccf15 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 372ef9bbad..94cb61deec 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 522789fcf2..9d57f4c2cb 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 176fedc742..6e7e5b7b45 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 e668c85032..21585eb78e 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 01381ea330..e636b04b9a 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 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);
#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 */