summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-03-11 05:04:48 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-03-11 05:04:48 +0000
commit5d63776a24cb3de9f5ddbfbfb13ce03e50264c03 (patch)
tree9f8665f020b326e9ffc24799579240a044e35d3c /firmware/target
parenta1a4034b82630bc94bfd37dac4e1c3f30afaccd5 (diff)
downloadrockbox-5d63776a24cb3de9f5ddbfbfb13ce03e50264c03.tar.gz
rockbox-5d63776a24cb3de9f5ddbfbfb13ce03e50264c03.zip
Reenable aynchronous audio init stage. Really just single stage with aynchronous enabling of outputs. Keeps audio_init last so prior init steps can use the audiobuffer in any desired way. Audio will be fully initialized by the time the UI is entered. Playback of voice or audio will be delayed properly until audio hardware is ready.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12714 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/wmcodec-meg-fx.c4
-rw-r--r--firmware/target/arm/wmcodec-pp.c4
-rw-r--r--firmware/target/coldfire/pcm-coldfire.c22
3 files changed, 12 insertions, 18 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/wmcodec-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/wmcodec-meg-fx.c
index fd023e1be0..fe42b7527a 100644
--- a/firmware/target/arm/gigabeat/meg-fx/wmcodec-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/wmcodec-meg-fx.c
@@ -61,6 +61,10 @@ int audiohw_init(void) {
return 0;
}
+void audiohw_postinit(void)
+{
+}
+
void wmcodec_write(int reg, int data)
{
i2c_send(0x34, (reg<<1) | ((data&0x100)>>8), data&0xff);
diff --git a/firmware/target/arm/wmcodec-pp.c b/firmware/target/arm/wmcodec-pp.c
index e252cf0ac1..505a31deb4 100644
--- a/firmware/target/arm/wmcodec-pp.c
+++ b/firmware/target/arm/wmcodec-pp.c
@@ -92,6 +92,10 @@ int audiohw_init(void) {
return 0;
}
+void audiohw_postinit(void)
+{
+}
+
void wmcodec_write(int reg, int data)
{
pp_i2c_send(I2C_AUDIO_ADDRESS, (reg<<1) | ((data&0x100)>>8),data&0xff);
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c
index ef847004ce..720c77e434 100644
--- a/firmware/target/coldfire/pcm-coldfire.c
+++ b/firmware/target/coldfire/pcm-coldfire.c
@@ -255,6 +255,10 @@ void pcm_init(void)
pcm_play_dma_stop();
/* Call pcm_close_recording to put in closed state */
pcm_close_recording();
+
+ /* Initialize default register values. */
+ audiohw_init();
+
audio_set_output_source(AUDIO_SRC_PLAYBACK);
audio_set_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK);
pcm_set_frequency(HW_FREQ_DEFAULT);
@@ -264,24 +268,6 @@ void pcm_init(void)
#if defined(HAVE_SPDIF_IN) || defined(HAVE_SPDIF_OUT)
spdif_init();
#endif
-
- /* Initialize default register values. */
- audiohw_init();
-
-#if defined(HAVE_UDA1380)
- /* Sleep a while so the power can stabilize (especially a long
- delay is needed for the line out connector). */
- sleep(HZ);
- /* Power on FSDAC and HP amp. */
- audiohw_enable_output(true);
-#elif defined(HAVE_TLV320)
- sleep(HZ/4);
-#endif
-
- /* UDA1380: Unmute the master channel
- (DAC should be at zero point now). */
- audiohw_mute(false);
-
/* Enable interrupt at level 6, priority 0 */
ICR6 = (6 << 2);
and_l(~(1 << 14), &IMR); /* bit 14 is DMA0 */