From 388adff3cc4ab8584c2c99f9bc5ad7e309281d5e Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 11 Nov 2020 23:20:19 -0500 Subject: pcm: Further cleanup of unused bits of the PCM ACPI: * pcm_get_bytes_remaining() * pcm_calculate_peaks() * pcm_get_peak_buffer() Nothing in-tree uses these at all (except for the lua plugin wrapper) Change-Id: I971b7beed6760250c8b1ce58f401a601e1e2d585 --- .../target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c | 24 ---------------------- 1 file changed, 24 deletions(-) (limited to 'firmware/target/arm/imx31/gigabeat-s') 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) play_stop_pcm(); } -/* Return the number of bytes waiting - full L-R sample pairs only */ -size_t pcm_get_bytes_waiting(void) -{ - static unsigned long dsa NOCACHEBSS_ATTR; - 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(); - offs = dsa - (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) - { - return (size - offs) & ~3; - } - - return 0; -} - /* Return a pointer to the samples and the number of them in *count */ const void * pcm_play_dma_get_peak_buffer(int *count) { -- cgit v1.2.3