summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c11
-rw-r--r--firmware/target/arm/imx233/pcm-imx233.c6
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c24
-rw-r--r--firmware/target/arm/pcm-telechips.c5
-rw-r--r--firmware/target/arm/pnx0101/pcm-pnx0101.c5
-rw-r--r--firmware/target/arm/pp/pcm-pp.c5
-rw-r--r--firmware/target/arm/rk27xx/pcm-rk27xx.c6
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c6
-rw-r--r--firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c6
-rw-r--r--firmware/target/arm/s5l8700/pcm-s5l8700.c7
-rw-r--r--firmware/target/arm/s5l8702/pcm-s5l8702.c7
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c5
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c5
-rw-r--r--firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c5
14 files changed, 1 insertions, 102 deletions
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index 90b6aabd7c..dfbda388be 100644
--- a/firmware/target/arm/as3525/pcm-as3525.c
+++ b/firmware/target/arm/as3525/pcm-as3525.c
@@ -200,17 +200,6 @@ void pcm_dma_apply_settings(void)
0x01ffffff);
}
-size_t pcm_get_bytes_waiting(void)
-{
- 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);
-
- return start_size - addr + start_addr;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
int oldstatus = disable_irq_save();
diff --git a/firmware/target/arm/imx233/pcm-imx233.c b/firmware/target/arm/imx233/pcm-imx233.c
index 7e20a7ce68..c06120e4aa 100644
--- a/firmware/target/arm/imx233/pcm-imx233.c
+++ b/firmware/target/arm/imx233/pcm-imx233.c
@@ -175,12 +175,6 @@ void pcm_dma_apply_settings(void)
pcm_play_unlock();
}
-size_t pcm_get_bytes_waiting(void)
-{
- struct imx233_dma_info_t info = imx233_dma_get_info(APB_AUDIO_DAC, DMA_INFO_AHB_BYTES);
- return info.ahb_bytes;
-}
-
const void *pcm_play_dma_get_peak_buffer(int *count)
{
if(!dac_freezed)
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)
{
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c
index 9c64b58594..68bae1b0a9 100644
--- a/firmware/target/arm/pcm-telechips.c
+++ b/firmware/target/arm/pcm-telechips.c
@@ -194,11 +194,6 @@ void pcm_play_unlock(void)
restore_fiq(status);
}
-size_t pcm_get_bytes_waiting(void)
-{
- return dma_play_data.size & ~3;
-}
-
#ifdef HAVE_RECORDING
/* TODO: implement */
void pcm_rec_dma_init(void)
diff --git a/firmware/target/arm/pnx0101/pcm-pnx0101.c b/firmware/target/arm/pnx0101/pcm-pnx0101.c
index 01ead4723b..6099dcb7ef 100644
--- a/firmware/target/arm/pnx0101/pcm-pnx0101.c
+++ b/firmware/target/arm/pnx0101/pcm-pnx0101.c
@@ -192,11 +192,6 @@ void pcm_dma_apply_settings(void)
{
}
-size_t pcm_get_bytes_waiting(void)
-{
- return p_size & ~3;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
unsigned long addr = (unsigned long)p;
diff --git a/firmware/target/arm/pp/pcm-pp.c b/firmware/target/arm/pp/pcm-pp.c
index 91d567ee83..8434123a92 100644
--- a/firmware/target/arm/pp/pcm-pp.c
+++ b/firmware/target/arm/pp/pcm-pp.c
@@ -497,11 +497,6 @@ void pcm_play_dma_stop(void)
#endif
}
-size_t pcm_get_bytes_waiting(void)
-{
- return dma_play_data.size & ~3;
-}
-
void pcm_play_dma_init(void)
{
/* Initialize default register values. */
diff --git a/firmware/target/arm/rk27xx/pcm-rk27xx.c b/firmware/target/arm/rk27xx/pcm-rk27xx.c
index 5cfe54f9de..c0b4c45805 100644
--- a/firmware/target/arm/rk27xx/pcm-rk27xx.c
+++ b/firmware/target/arm/rk27xx/pcm-rk27xx.c
@@ -250,12 +250,6 @@ void pcm_dma_apply_settings(void)
audiohw_set_frequency(pcm_fsel);
}
-size_t pcm_get_bytes_waiting(void)
-{
- /* current terminate count is in transfer size units (4bytes here) */
- return (HDMA_CCNT0 & 0xffff)<<2;
-}
-
/* audio DMA ISR called when chunk from callers buffer has been transfered */
void INT_HDMA(void)
{
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 da5dc9cdd5..d784180e77 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
@@ -220,12 +220,6 @@ void fiq_handler(void)
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
}
-size_t pcm_get_bytes_waiting(void)
-{
- /* lie a little and only return full pairs */
- return (DSTAT2 & 0xFFFFE) * 2;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
unsigned long addr = DCSRC2;
diff --git a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
index dbb1a06809..9574522586 100644
--- a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
+++ b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
@@ -260,12 +260,6 @@ void fiq_handler(void)
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
}
-size_t pcm_get_bytes_waiting(void)
-{
- /* lie a little and only return full pairs */
- return (DSTAT2 & 0xFFFFE) * 2;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
unsigned long addr = DCSRC2;
diff --git a/firmware/target/arm/s5l8700/pcm-s5l8700.c b/firmware/target/arm/s5l8700/pcm-s5l8700.c
index 47525611ee..050e14451d 100644
--- a/firmware/target/arm/s5l8700/pcm-s5l8700.c
+++ b/firmware/target/arm/s5l8700/pcm-s5l8700.c
@@ -259,12 +259,7 @@ void pcm_play_dma_postinit(void)
/* set the configured PCM frequency */
void pcm_dma_apply_settings(void)
{
- pcm_dma_set_freq(pcm_fsel);
-}
-
-size_t pcm_get_bytes_waiting(void)
-{
- return (nextsize + DMACTCNT0 + 2) << 1;
+ pcm_dma_set_freq(pcm_fsel);
}
const void * pcm_play_dma_get_peak_buffer(int *count)
diff --git a/firmware/target/arm/s5l8702/pcm-s5l8702.c b/firmware/target/arm/s5l8702/pcm-s5l8702.c
index a62a7243a2..33fe637770 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();
}
-size_t pcm_get_bytes_waiting(void)
-{
- size_t total_bytes;
- dmac_ch_get_info(&dma_play_ch, NULL, &total_bytes);
- return total_bytes;
-}
-
const void* pcm_play_dma_get_peak_buffer(int *count)
{
void *addr = dmac_ch_get_info(&dma_play_ch, count, NULL);
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
index f31185c2ea..d5e30ad73b 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
@@ -84,8 +84,3 @@ void pcm_play_unlock(void)
{
}
-
-size_t pcm_get_bytes_waiting(void)
-{
- return 0;
-}
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
index 0d7bcbab37..5ce5a8f399 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
@@ -120,11 +120,6 @@ void pcm_play_unlock(void)
}
-size_t pcm_get_bytes_waiting(void)
-{
- return DSP_(_sdem_dsp_size)-DSP_(_sdem_level);
-}
-
/* Only used when debugging */
static char buffer[80];
diff --git a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
index c2932fd762..f9f19a8045 100644
--- a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
+++ b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
@@ -127,11 +127,6 @@ void pcm_play_unlock(void)
}
-size_t pcm_get_bytes_waiting(void)
-{
- return DSP_(_sdem_dsp_size)-DSP_(_sdem_level);
-}
-
/* Only used when debugging */
static char buffer[80];