summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-07-25 14:03:44 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-07-25 14:07:41 +0000
commite532714d1f76ccdbd1dcfeb3b4579d324cb519c1 (patch)
tree588252314fd7910c49b60cece106d2c23e6fcef6 /firmware/target/arm
parent77ec7522485c0bf1f48669d6eca0d09366c3bbd7 (diff)
downloadrockbox-e532714d1f76ccdbd1dcfeb3b4579d324cb519c1.tar.gz
rockbox-e532714d1f76ccdbd1dcfeb3b4579d324cb519c1.zip
pcm: Remove unused function pcm_play_dma_get_peak_buffer()
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c12
-rw-r--r--firmware/target/arm/imx233/pcm-imx233.c11
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c28
-rw-r--r--firmware/target/arm/pcm-telechips.c8
-rw-r--r--firmware/target/arm/pp/pcm-pp.c13
-rw-r--r--firmware/target/arm/rk27xx/pcm-rk27xx.c12
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c8
-rw-r--r--firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c8
-rw-r--r--firmware/target/arm/s5l8700/pcm-s5l8700.c6
-rw-r--r--firmware/target/arm/s5l8702/pcm-s5l8702.c7
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c6
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c16
-rw-r--r--firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c16
13 files changed, 0 insertions, 151 deletions
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index dfbda388be..e480140497 100644
--- a/firmware/target/arm/as3525/pcm-as3525.c
+++ b/firmware/target/arm/as3525/pcm-as3525.c
@@ -200,18 +200,6 @@ void pcm_dma_apply_settings(void)
0x01ffffff);
}
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- int oldstatus = disable_irq_save();
- size_t addr = DMAC_CH_SRC_ADDR(0);
- size_t start_addr = (size_t)dma_start_addr;
- size_t start_size = dma_start_size;
- restore_interrupt(oldstatus);
-
- *count = (start_size - addr + start_addr) >> 2;
- return (void*)AS3525_UNCACHED_ADDR(addr);
-}
-
#ifdef HAVE_PCM_DMA_ADDRESS
void * pcm_dma_addr(void *addr)
{
diff --git a/firmware/target/arm/imx233/pcm-imx233.c b/firmware/target/arm/imx233/pcm-imx233.c
index c06120e4aa..4738485b3d 100644
--- a/firmware/target/arm/imx233/pcm-imx233.c
+++ b/firmware/target/arm/imx233/pcm-imx233.c
@@ -175,17 +175,6 @@ void pcm_dma_apply_settings(void)
pcm_play_unlock();
}
-const void *pcm_play_dma_get_peak_buffer(int *count)
-{
- if(!dac_freezed)
- imx233_dma_freeze_channel(APB_AUDIO_DAC, true);
- struct imx233_dma_info_t info = imx233_dma_get_info(APB_AUDIO_DAC, DMA_INFO_AHB_BYTES | DMA_INFO_BAR);
- if(!dac_freezed)
- imx233_dma_freeze_channel(APB_AUDIO_DAC, false);
- *count = info.ahb_bytes;
- return (void *)info.bar;
-}
-
/*
* Recording
*/
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);
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c
index ff550b14d6..336b5626ca 100644
--- a/firmware/target/arm/pcm-telechips.c
+++ b/firmware/target/arm/pcm-telechips.c
@@ -62,14 +62,6 @@ struct dma_data dma_play_data SHAREDBSS_ATTR =
.state = 0
};
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- unsigned long addr = (unsigned long)dma_play_data.p;
- size_t cnt = dma_play_data.size;
- *count = cnt >> 2;
- return (void *)((addr + 2) & ~3);
-}
-
void pcm_play_dma_init(void)
{
DAVC = 0x0; /* Digital Volume = max */
diff --git a/firmware/target/arm/pp/pcm-pp.c b/firmware/target/arm/pp/pcm-pp.c
index 8434123a92..0d61eb44ff 100644
--- a/firmware/target/arm/pp/pcm-pp.c
+++ b/firmware/target/arm/pp/pcm-pp.c
@@ -512,19 +512,6 @@ void pcm_play_dma_postinit(void)
audiohw_postinit();
}
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- unsigned long addr, size;
-
- int status = disable_fiq_save();
- addr = dma_play_data.addr;
- size = dma_play_data.size;
- restore_fiq(status);
-
- *count = size >> 2;
- return (void *)((addr + 2) & ~3);
-}
-
/****************************************************************************
** Recording DMA transfer
**/
diff --git a/firmware/target/arm/rk27xx/pcm-rk27xx.c b/firmware/target/arm/rk27xx/pcm-rk27xx.c
index c0b4c45805..26e3ad87ba 100644
--- a/firmware/target/arm/rk27xx/pcm-rk27xx.c
+++ b/firmware/target/arm/rk27xx/pcm-rk27xx.c
@@ -263,18 +263,6 @@ void INT_HDMA(void)
}
}
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- uint32_t addr;
-
- int old = disable_irq_save();
- addr = HDMA_CSRC0;
- *count = ((HDMA_CCNT0 & 0xffff)<<2);
- restore_interrupt(old);
-
- return (void*)addr;
-}
-
/****************************************************************************
** Recording DMA transfer
**/
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
index d784180e77..e75c3fe7c6 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
@@ -219,11 +219,3 @@ void fiq_handler(void)
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
}
-
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- unsigned long addr = DCSRC2;
- int cnt = DSTAT2;
- *count = (cnt & 0xFFFFF) >> 1;
- return (void *)((addr + 2) & ~3);
-}
diff --git a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
index 9574522586..999a53e3f9 100644
--- a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
+++ b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
@@ -259,11 +259,3 @@ void fiq_handler(void)
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
}
-
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- unsigned long addr = DCSRC2;
- int cnt = DSTAT2;
- *count = (cnt & 0xFFFFF) >> 1;
- return (void *)((addr + 2) & ~3);
-}
diff --git a/firmware/target/arm/s5l8700/pcm-s5l8700.c b/firmware/target/arm/s5l8700/pcm-s5l8700.c
index 050e14451d..c7b6ed9a03 100644
--- a/firmware/target/arm/s5l8700/pcm-s5l8700.c
+++ b/firmware/target/arm/s5l8700/pcm-s5l8700.c
@@ -262,12 +262,6 @@ void pcm_dma_apply_settings(void)
pcm_dma_set_freq(pcm_fsel);
}
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- *count = DMACTCNT0 >> 1;
- return (void *)(((DMACADDR0 + 2) & ~3) | 0x40000000);
-}
-
#ifdef HAVE_PCM_DMA_ADDRESS
void * pcm_dma_addr(void *addr)
{
diff --git a/firmware/target/arm/s5l8702/pcm-s5l8702.c b/firmware/target/arm/s5l8702/pcm-s5l8702.c
index 33fe637770..d4570f3a7f 100644
--- a/firmware/target/arm/s5l8702/pcm-s5l8702.c
+++ b/firmware/target/arm/s5l8702/pcm-s5l8702.c
@@ -216,13 +216,6 @@ void pcm_play_dma_postinit(void)
audiohw_postinit();
}
-const void* pcm_play_dma_get_peak_buffer(int *count)
-{
- void *addr = dmac_ch_get_info(&dma_play_ch, count, NULL);
- *count >>= 2; /* bytes to samples */
- return addr; /* aligned to dest burst */
-}
-
#ifdef HAVE_PCM_DMA_ADDRESS
void * pcm_dma_addr(void *addr)
{
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
index d5e30ad73b..fa1eb2481f 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
@@ -52,12 +52,6 @@ void pcm_play_dma_postinit(void)
// dsp_wake();
}
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- (void) count;
- return 0;
-}
-
void pcm_dma_apply_settings(void)
{
audiohw_set_frequency(pcm_fsel);
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
index 5ce5a8f399..fda8615e5a 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
@@ -46,22 +46,6 @@ void pcm_play_dma_postinit(void)
audiohw_postinit();
}
-/* Return the current location in the SDRAM to SARAM transfer along with the
- * number of bytes read in the current buffer (count). There is latency with
- * this method equivalent to ~ the size of the SARAM buffer since there is
- * another buffer between your ears and this calculation, but this works for
- * key clicks and an approximate peak meter.
- */
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- int cnt = DSP_(_sdem_level);
-
- unsigned long addr = (unsigned long) start + cnt;
-
- *count = (cnt & 0xFFFFF) >> 1;
- return (void *)((addr + 2) & ~3);
-}
-
void pcm_play_dma_init(void)
{
IO_INTC_IRQ0 = INTR_IRQ0_IMGBUF;
diff --git a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
index f9f19a8045..bda000e68f 100644
--- a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
+++ b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
@@ -42,22 +42,6 @@ void pcm_play_dma_postinit(void)
audiohw_postinit();
}
-/* Return the current location in the SDRAM to SARAM transfer along with the
- * number of bytes read in the current buffer (count). There is latency with
- * this method equivalent to ~ the size of the SARAM buffer since there is
- * another buffer between your ears and this calculation, but this works for
- * key clicks and an approximate peak meter.
- */
-const void * pcm_play_dma_get_peak_buffer(int *count)
-{
- int cnt = DSP_(_sdem_level);
-
- unsigned long addr = (unsigned long) start + cnt;
-
- *count = (cnt & 0xFFFFF) >> 1;
- return (void *)((addr + 2) & ~3);
-}
-
void pcm_play_dma_init(void)
{
/* GIO16 is DSP/AIC3X CLK */