summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-06-14 09:25:28 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-06-14 09:25:28 +0000
commit58c71e0e366c174fd6f71446758fe311e68f4bee (patch)
tree849ebc9063ca9cc72a3e3c824d00c9024ae60adb
parent6ab53ba458164921361cf6579069b4ebb691f6a7 (diff)
downloadrockbox-58c71e0e366c174fd6f71446758fe311e68f4bee.zip
rockbox-58c71e0e366c174fd6f71446758fe311e68f4bee.tar.gz
rockbox-58c71e0e366c174fd6f71446758fe311e68f4bee.tar.bz2
rockbox-58c71e0e366c174fd6f71446758fe311e68f4bee.tar.xz
Pause and probably some crashes fixed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6706 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/pcm_playback.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c
index 3548cad..83b7b2f 100644
--- a/firmware/pcm_playback.c
+++ b/firmware/pcm_playback.c
@@ -116,8 +116,6 @@ void pcm_boost(bool state)
static void dma_stop(void)
{
pcm_playing = false;
- uda1380_enable_output(false);
- pcm_boost(false);
/* Reset the FIFO */
IIS2CONFIG = 0x800;
@@ -225,14 +223,17 @@ void pcm_play_data(const unsigned char* start, int size,
get_more(&next_start, &next_size);
/* Sleep a while, then power on audio output */
- sleep(HZ/16);
- uda1380_enable_output(true);
+ sleep(HZ/16);
+ uda1380_enable_output(true);
}
void pcm_play_stop(void)
{
- if (pcm_playing)
+ if (pcm_playing) {
+ uda1380_enable_output(false);
+ pcm_boost(false);
dma_stop();
+ }
pcmbuf_unplayed_bytes = 0;
last_chunksize = 0;
audiobuffer_pos = 0;
@@ -245,11 +246,8 @@ void pcm_play_stop(void)
pcm_set_boost_mode(false);
}
-/* Pausing will cause irregular crashes. Should be fixed. */
void pcm_play_pause(bool play)
{
- return ;
-
if(pcm_paused && play && pcmbuf_unplayed_bytes)
{
/* Enable the FIFO and force one write to it */