From e532714d1f76ccdbd1dcfeb3b4579d324cb519c1 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 25 Jul 2021 14:03:44 +0100 Subject: pcm: Remove unused function pcm_play_dma_get_peak_buffer() Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5 --- .../target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c | 28 ---------------------- 1 file changed, 28 deletions(-) (limited to 'firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c') 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 13dff6ecb5..955301b4da 100644 --- a/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c @@ -224,34 +224,6 @@ void pcm_play_dma_stop(void) play_stop_pcm(); } -/* Return a pointer to the samples and the number of them in *count */ -const void * pcm_play_dma_get_peak_buffer(int *count) -{ - static unsigned long dsa NOCACHEBSS_ATTR; - unsigned long addr; - long offs, size; - int oldstatus; - - /* read burst dma source address register in channel context */ - sdma_read_words(&dsa, CHANNEL_CONTEXT_ADDR(DMA_PLAY_CH_NUM)+0x0b, 1); - - oldstatus = disable_irq_save(); - addr = dsa; - offs = addr - (unsigned long)dma_play_bd.buf_addr; - size = dma_play_bd.mode.count; - restore_irq(oldstatus); - - /* Be addresses are coherent (no buffer change during read) */ - if (offs >= 0 && offs < size) - { - *count = (size - offs) >> 2; - return (void *)((addr + 2) & ~3); - } - - *count = 0; - return NULL; -} - void * pcm_dma_addr(void *addr) { return (void *)addr_virt_to_phys((unsigned long)addr); -- cgit v1.2.3