summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-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
5 files changed, 26 insertions, 25 deletions
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,
27typedef int (*pcm_more_callback_type2)(int status); 27typedef int (*pcm_more_callback_type2)(int status);
28 28
29void pcm_init(void); 29void pcm_init(void);
30void pcm_postinit(void);
30 31
31/* set the pcm frequency - use values in hw_sampr_list 32/* set the pcm frequency - use values in hw_sampr_list
32 * use -1 for the default frequency 33 * 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 @@
20#include "kernel.h" 20#include "kernel.h"
21#include "logf.h" 21#include "logf.h"
22#include "audio.h" 22#include "audio.h"
23#if defined(HAVE_WM8975) 23#include "sound.h"
24#include "wm8975.h" 24#if CONFIG_CPU == PNX0101
25#elif defined(HAVE_WM8758)
26#include "wm8758.h"
27#elif defined(HAVE_WM8731) || defined(HAVE_WM8721)
28#include "wm8731l.h"
29#elif CONFIG_CPU == PNX0101
30#include "string.h" 25#include "string.h"
31#include "pnx0101.h"
32#endif 26#endif
33 27
34/** 28/**
@@ -224,6 +218,11 @@ void pcm_init(void)
224 DMAR10(1) |= 1; 218 DMAR10(1) |= 1;
225} 219}
226 220
221void pcm_postinit(void)
222{
223 audiohw_postinit();
224}
225
227void pcm_set_frequency(unsigned int frequency) 226void pcm_set_frequency(unsigned int frequency)
228{ 227{
229 (void)frequency; 228 (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 @@
20#include "kernel.h" 20#include "kernel.h"
21#include "logf.h" 21#include "logf.h"
22#include "audio.h" 22#include "audio.h"
23#include "wm8975.h" 23#include "sound.h"
24#include "file.h" 24#include "file.h"
25#include "mmu-meg-fx.h" 25#include "mmu-meg-fx.h"
26 26
@@ -120,7 +120,10 @@ void pcm_init(void)
120 120
121} 121}
122 122
123 123void pcm_postinit(void)
124{
125 audiohw_postinit();
126}
124 127
125void pcm_play_dma_start(const void *addr, size_t size) 128void pcm_play_dma_start(const void *addr, size_t size)
126{ 129{
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 @@
21#include "kernel.h" 21#include "kernel.h"
22#include "logf.h" 22#include "logf.h"
23#include "audio.h" 23#include "audio.h"
24#if defined(HAVE_WM8975) 24#include "sound.h"
25#include "wm8975.h"
26#elif defined(HAVE_WM8758)
27#include "wm8758.h"
28#elif defined(HAVE_WM8731) || defined(HAVE_WM8721)
29#include "wm8731l.h"
30#endif
31
32
33 25
34/* peaks */ 26/* peaks */
35#ifdef HAVE_RECORDING 27#ifdef HAVE_RECORDING
@@ -334,7 +326,7 @@ size_t pcm_get_bytes_waiting(void)
334void pcm_init(void) 326void pcm_init(void)
335{ 327{
336} 328}
337void audiohw_postinit(void) 329void pcm_postinit(void)
338{ 330{
339} 331}
340#else 332#else
@@ -356,6 +348,11 @@ void pcm_init(void)
356 /* Call pcm_play_dma_stop to initialize everything. */ 348 /* Call pcm_play_dma_stop to initialize everything. */
357 pcm_play_dma_stop(); 349 pcm_play_dma_stop();
358} 350}
351
352void pcm_postinit(void)
353{
354 audiohw_postinit();
355}
359#endif /* HAVE_PP5024_CODEC */ 356#endif /* HAVE_PP5024_CODEC */
360 357
361 358
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 @@
21#include "kernel.h" 21#include "kernel.h"
22#include "logf.h" 22#include "logf.h"
23#include "audio.h" 23#include "audio.h"
24#if defined(HAVE_UDA1380) 24#include "sound.h"
25#include "uda1380.h"
26#elif defined(HAVE_TLV320)
27#include "tlv320.h"
28#endif
29#if defined(HAVE_SPDIF_IN) || defined(HAVE_SPDIF_OUT) 25#if defined(HAVE_SPDIF_IN) || defined(HAVE_SPDIF_OUT)
30#include "spdif.h" 26#include "spdif.h"
31#endif 27#endif
@@ -273,6 +269,11 @@ void pcm_init(void)
273 and_l(~(1 << 14), &IMR); /* bit 14 is DMA0 */ 269 and_l(~(1 << 14), &IMR); /* bit 14 is DMA0 */
274} /* pcm_init */ 270} /* pcm_init */
275 271
272void pcm_postinit(void)
273{
274 audiohw_postinit();
275}
276
276size_t pcm_get_bytes_waiting(void) 277size_t pcm_get_bytes_waiting(void)
277{ 278{
278 return BCR0 & 0xffffff; 279 return BCR0 & 0xffffff;