summaryrefslogtreecommitdiff
path: root/firmware/pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/pcm.c')
-rw-r--r--firmware/pcm.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/firmware/pcm.c b/firmware/pcm.c
index 7a7043bef8..6fc0b626f7 100644
--- a/firmware/pcm.c
+++ b/firmware/pcm.c
@@ -37,7 +37,6 @@
37 * ==Playback== 37 * ==Playback==
38 * Public - 38 * Public -
39 * pcm_postinit 39 * pcm_postinit
40 * pcm_get_bytes_waiting
41 * pcm_play_lock 40 * pcm_play_lock
42 * pcm_play_unlock 41 * pcm_play_unlock
43 * Semi-private - 42 * Semi-private -
@@ -47,7 +46,6 @@
47 * pcm_play_dma_postinit 46 * pcm_play_dma_postinit
48 * pcm_play_dma_start 47 * pcm_play_dma_start
49 * pcm_play_dma_stop 48 * pcm_play_dma_stop
50 * pcm_play_dma_get_peak_buffer
51 * Data Read/Written within TSP - 49 * Data Read/Written within TSP -
52 * pcm_sampr (R) 50 * pcm_sampr (R)
53 * pcm_fsel (R) 51 * pcm_fsel (R)
@@ -118,11 +116,6 @@ static inline void pcm_play_dma_stop_int(void)
118 pcm_play_dma_stop(); 116 pcm_play_dma_stop();
119} 117}
120 118
121static inline const void * pcm_play_dma_get_peak_buffer_int(int *count)
122{
123 return pcm_play_dma_get_peak_buffer(count);
124}
125
126bool pcm_play_dma_complete_callback(enum pcm_dma_status status, 119bool pcm_play_dma_complete_callback(enum pcm_dma_status status,
127 const void **addr, size_t *size) 120 const void **addr, size_t *size)
128{ 121{
@@ -244,28 +237,6 @@ void pcm_do_peak_calculation(struct pcm_peaks *peaks, bool active,
244 } 237 }
245} 238}
246 239
247void pcm_calculate_peaks(int *left, int *right)
248{
249 /* peak data for the global peak values - i.e. what the final output is */
250 static struct pcm_peaks peaks;
251
252 int count;
253 const void *addr = pcm_play_dma_get_peak_buffer_int(&count);
254
255 pcm_do_peak_calculation(&peaks, pcm_playing, addr, count);
256
257 if (left)
258 *left = peaks.left;
259
260 if (right)
261 *right = peaks.right;
262}
263
264const void * pcm_get_peak_buffer(int *count)
265{
266 return pcm_play_dma_get_peak_buffer_int(count);
267}
268
269bool pcm_is_playing(void) 240bool pcm_is_playing(void)
270{ 241{
271 return pcm_playing; 242 return pcm_playing;