summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/pcm-coldfire.c
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2006-12-06 10:24:59 +0000
committerMarcoen Hirschberg <marcoen@gmail.com>2006-12-06 10:24:59 +0000
commit77d039bab8591e991001bf8680f9915854483809 (patch)
treecf45a738b7c68e2fac18513965027901a4240787 /firmware/target/coldfire/pcm-coldfire.c
parent46a608bf07ec9d40bdd151e3283646682bb9e9bd (diff)
downloadrockbox-77d039bab8591e991001bf8680f9915854483809.tar.gz
rockbox-77d039bab8591e991001bf8680f9915854483809.zip
first step in audio driver unification: renaming the functions to audio_*
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11670 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/pcm-coldfire.c')
-rw-r--r--firmware/target/coldfire/pcm-coldfire.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c
index 4e4e557d9b..6db3e943dc 100644
--- a/firmware/target/coldfire/pcm-coldfire.c
+++ b/firmware/target/coldfire/pcm-coldfire.c
@@ -30,17 +30,6 @@
30#include "spdif.h" 30#include "spdif.h"
31#endif 31#endif
32 32
33/* Avoid further #ifdef's for some codec functions */
34#if defined(HAVE_UDA1380)
35#define ac_init uda1380_init
36#define ac_mute uda1380_mute
37#define ac_set_frequency uda1380_set_frequency
38#elif defined(HAVE_TLV320)
39#define ac_init tlv320_init
40#define ac_mute tlv320_mute
41#define ac_set_frequency tlv320_set_frequency
42#endif
43
44/* peaks */ 33/* peaks */
45static int play_peak_left, play_peak_right; 34static int play_peak_left, play_peak_right;
46static unsigned long *rec_peak_addr; 35static unsigned long *rec_peak_addr;
@@ -136,7 +125,7 @@ void pcm_apply_settings(bool reset)
136 if (pcm_freq != last_pcm_freq) 125 if (pcm_freq != last_pcm_freq)
137 { 126 {
138 last_pcm_freq = pcm_freq; 127 last_pcm_freq = pcm_freq;
139 ac_set_frequency(freq_ent[FPARM_FSEL]); 128 audiohw_set_frequency(freq_ent[FPARM_FSEL]);
140 coldfire_set_pllcr_audio_bits(PLLCR_SET_AUDIO_BITS_DEFPARM); 129 coldfire_set_pllcr_audio_bits(PLLCR_SET_AUDIO_BITS_DEFPARM);
141 } 130 }
142 131
@@ -211,7 +200,7 @@ void pcm_init(void)
211#endif 200#endif
212 201
213 /* Initialize default register values. */ 202 /* Initialize default register values. */
214 ac_init(); 203 audiohw_init();
215 204
216#if defined(HAVE_UDA1380) 205#if defined(HAVE_UDA1380)
217 /* Sleep a while so the power can stabilize (especially a long 206 /* Sleep a while so the power can stabilize (especially a long
@@ -225,7 +214,7 @@ void pcm_init(void)
225 214
226 /* UDA1380: Unmute the master channel 215 /* UDA1380: Unmute the master channel
227 (DAC should be at zero point now). */ 216 (DAC should be at zero point now). */
228 ac_mute(false); 217 audiohw_mute(false);
229 218
230 /* Call pcm_play_dma_stop to initialize everything. */ 219 /* Call pcm_play_dma_stop to initialize everything. */
231 pcm_play_dma_stop(); 220 pcm_play_dma_stop();
@@ -402,7 +391,7 @@ void pcm_record_more(void *start, size_t size)
402 391
403void pcm_mute(bool mute) 392void pcm_mute(bool mute)
404{ 393{
405 ac_mute(mute); 394 audiohw_mute(mute);
406 if (mute) 395 if (mute)
407 sleep(HZ/16); 396 sleep(HZ/16);
408} /* pcm_mute */ 397} /* pcm_mute */