summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/playback.c2
-rw-r--r--firmware/export/pcm_playback.h1
-rw-r--r--firmware/pcm_playback.c15
-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
-rw-r--r--uisimulator/common/stubs.c6
-rw-r--r--uisimulator/sdl/sound.c4
8 files changed, 31 insertions, 32 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 739d3fa850..0f69398600 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -3444,7 +3444,7 @@ static void audio_thread(void)
{
struct event ev;
- audiohw_postinit();
+ pcm_postinit();
#ifdef PLAYBACK_VOICE
/* Unlock mutex that init stage locks before creating this thread */
diff --git a/firmware/export/pcm_playback.h b/firmware/export/pcm_playback.h
index 28409c01d9..351b1fa23f 100644
--- a/firmware/export/pcm_playback.h
+++ b/firmware/export/pcm_playback.h
@@ -27,6 +27,7 @@ typedef void (*pcm_more_callback_type)(unsigned char **start,
typedef int (*pcm_more_callback_type2)(int status);
void pcm_init(void);
+void pcm_postinit(void);
/* set the pcm frequency - use values in hw_sampr_list
* use -1 for the default frequency
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c
index eb5404c1a8..66a6fdc957 100644
--- a/firmware/pcm_playback.c
+++ b/firmware/pcm_playback.c
@@ -20,15 +20,9 @@
#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"
-#elif CONFIG_CPU == PNX0101
+#include "sound.h"
+#if CONFIG_CPU == PNX0101
#include "string.h"
-#include "pnx0101.h"
#endif
/**
@@ -224,6 +218,11 @@ void pcm_init(void)
DMAR10(1) |= 1;
}
+void pcm_postinit(void)
+{
+ audiohw_postinit();
+}
+
void pcm_set_frequency(unsigned int frequency)
{
(void)frequency;
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;
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 3680183e22..8ea46824ce 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -262,9 +262,3 @@ void remove_thread(int threadnum)
#define VIRT_SIZE 0xFFFF /* more than enough for our string ID range */
unsigned char vp_dummy[VIRT_SIZE];
-
-void audiohw_postinit(void)
-{
-}
-
-
diff --git a/uisimulator/sdl/sound.c b/uisimulator/sdl/sound.c
index d7e3cbd89d..96cb9874f5 100644
--- a/uisimulator/sdl/sound.c
+++ b/uisimulator/sdl/sound.c
@@ -316,5 +316,9 @@ int pcm_init(void)
return 0;
}
+void pcm_postinit(void)
+{
+}
+
#endif /* ROCKBOX_HAS_SIMSOUND */