summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c
index 72d8e4a021..13dff6ecb5 100644
--- a/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c
+++ b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c
@@ -224,30 +224,6 @@ void pcm_play_dma_stop(void)
224 play_stop_pcm(); 224 play_stop_pcm();
225} 225}
226 226
227/* Return the number of bytes waiting - full L-R sample pairs only */
228size_t pcm_get_bytes_waiting(void)
229{
230 static unsigned long dsa NOCACHEBSS_ATTR;
231 long offs, size;
232 int oldstatus;
233
234 /* read burst dma source address register in channel context */
235 sdma_read_words(&dsa, CHANNEL_CONTEXT_ADDR(DMA_PLAY_CH_NUM)+0x0b, 1);
236
237 oldstatus = disable_irq_save();
238 offs = dsa - (unsigned long)dma_play_bd.buf_addr;
239 size = dma_play_bd.mode.count;
240 restore_irq(oldstatus);
241
242 /* Be addresses are coherent (no buffer change during read) */
243 if (offs >= 0 && offs < size)
244 {
245 return (size - offs) & ~3;
246 }
247
248 return 0;
249}
250
251/* Return a pointer to the samples and the number of them in *count */ 227/* Return a pointer to the samples and the number of them in *count */
252const void * pcm_play_dma_get_peak_buffer(int *count) 228const void * pcm_play_dma_get_peak_buffer(int *count)
253{ 229{