diff options
Diffstat (limited to 'firmware/pcm_playback.c')
-rw-r--r-- | firmware/pcm_playback.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c index 3548caded5..83b7b2fc2e 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c | |||
@@ -116,8 +116,6 @@ void pcm_boost(bool state) | |||
116 | static void dma_stop(void) | 116 | static void dma_stop(void) |
117 | { | 117 | { |
118 | pcm_playing = false; | 118 | pcm_playing = false; |
119 | uda1380_enable_output(false); | ||
120 | pcm_boost(false); | ||
121 | 119 | ||
122 | /* Reset the FIFO */ | 120 | /* Reset the FIFO */ |
123 | IIS2CONFIG = 0x800; | 121 | IIS2CONFIG = 0x800; |
@@ -225,14 +223,17 @@ void pcm_play_data(const unsigned char* start, int size, | |||
225 | get_more(&next_start, &next_size); | 223 | get_more(&next_start, &next_size); |
226 | 224 | ||
227 | /* Sleep a while, then power on audio output */ | 225 | /* Sleep a while, then power on audio output */ |
228 | sleep(HZ/16); | 226 | sleep(HZ/16); |
229 | uda1380_enable_output(true); | 227 | uda1380_enable_output(true); |
230 | } | 228 | } |
231 | 229 | ||
232 | void pcm_play_stop(void) | 230 | void pcm_play_stop(void) |
233 | { | 231 | { |
234 | if (pcm_playing) | 232 | if (pcm_playing) { |
233 | uda1380_enable_output(false); | ||
234 | pcm_boost(false); | ||
235 | dma_stop(); | 235 | dma_stop(); |
236 | } | ||
236 | pcmbuf_unplayed_bytes = 0; | 237 | pcmbuf_unplayed_bytes = 0; |
237 | last_chunksize = 0; | 238 | last_chunksize = 0; |
238 | audiobuffer_pos = 0; | 239 | audiobuffer_pos = 0; |
@@ -245,11 +246,8 @@ void pcm_play_stop(void) | |||
245 | pcm_set_boost_mode(false); | 246 | pcm_set_boost_mode(false); |
246 | } | 247 | } |
247 | 248 | ||
248 | /* Pausing will cause irregular crashes. Should be fixed. */ | ||
249 | void pcm_play_pause(bool play) | 249 | void pcm_play_pause(bool play) |
250 | { | 250 | { |
251 | return ; | ||
252 | |||
253 | if(pcm_paused && play && pcmbuf_unplayed_bytes) | 251 | if(pcm_paused && play && pcmbuf_unplayed_bytes) |
254 | { | 252 | { |
255 | /* Enable the FIFO and force one write to it */ | 253 | /* Enable the FIFO and force one write to it */ |