summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-03-11 06:21:43 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-03-11 06:21:43 +0000
commitc2d2106fd76ae553a9f7b2418265209468cbb9e6 (patch)
treec6cb223091ed8dfeb943ede41a5d3e59efeeeade /firmware/target
parentc5cd27f5d1d601e109d6884fe689ec876fc28561 (diff)
downloadrockbox-c2d2106fd76ae553a9f7b2418265209468cbb9e6.tar.gz
rockbox-c2d2106fd76ae553a9f7b2418265209468cbb9e6.zip
Audio Init: Just can't stand that heirarchy. Add one level of abstraction. Might come in handy anyhow. Use sound.h instead of the conditional includes for audio hardware headers. If someone doesn't like that, yell at my evil twin. :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12718 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/pcm-meg-fx.c7
-rw-r--r--firmware/target/arm/pcm-pp.c17
-rw-r--r--firmware/target/coldfire/pcm-coldfire.c11
3 files changed, 18 insertions, 17 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/pcm-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/pcm-meg-fx.c
index 7e1cebc555..0f22aa5c5c 100644
--- a/firmware/target/arm/gigabeat/meg-fx/pcm-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/pcm-meg-fx.c
@@ -20,7 +20,7 @@
#include "kernel.h"
#include "logf.h"
#include "audio.h"
-#include "wm8975.h"
+#include "sound.h"
#include "file.h"
#include "mmu-meg-fx.h"
@@ -120,7 +120,10 @@ void pcm_init(void)
}
-
+void pcm_postinit(void)
+{
+ audiohw_postinit();
+}
void pcm_play_dma_start(const void *addr, size_t size)
{
diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c
index 0cb029eccb..efe6c9b4e6 100644
--- a/firmware/target/arm/pcm-pp.c
+++ b/firmware/target/arm/pcm-pp.c
@@ -21,15 +21,7 @@
#include "kernel.h"
#include "logf.h"
#include "audio.h"
-#if defined(HAVE_WM8975)
-#include "wm8975.h"
-#elif defined(HAVE_WM8758)
-#include "wm8758.h"
-#elif defined(HAVE_WM8731) || defined(HAVE_WM8721)
-#include "wm8731l.h"
-#endif
-
-
+#include "sound.h"
/* peaks */
#ifdef HAVE_RECORDING
@@ -334,7 +326,7 @@ size_t pcm_get_bytes_waiting(void)
void pcm_init(void)
{
}
-void audiohw_postinit(void)
+void pcm_postinit(void)
{
}
#else
@@ -356,6 +348,11 @@ void pcm_init(void)
/* Call pcm_play_dma_stop to initialize everything. */
pcm_play_dma_stop();
}
+
+void pcm_postinit(void)
+{
+ audiohw_postinit();
+}
#endif /* HAVE_PP5024_CODEC */
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c
index 720c77e434..0662e289a0 100644
--- a/firmware/target/coldfire/pcm-coldfire.c
+++ b/firmware/target/coldfire/pcm-coldfire.c
@@ -21,11 +21,7 @@
#include "kernel.h"
#include "logf.h"
#include "audio.h"
-#if defined(HAVE_UDA1380)
-#include "uda1380.h"
-#elif defined(HAVE_TLV320)
-#include "tlv320.h"
-#endif
+#include "sound.h"
#if defined(HAVE_SPDIF_IN) || defined(HAVE_SPDIF_OUT)
#include "spdif.h"
#endif
@@ -273,6 +269,11 @@ void pcm_init(void)
and_l(~(1 << 14), &IMR); /* bit 14 is DMA0 */
} /* pcm_init */
+void pcm_postinit(void)
+{
+ audiohw_postinit();
+}
+
size_t pcm_get_bytes_waiting(void)
{
return BCR0 & 0xffffff;