summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-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
-rw-r--r--firmware/target/coldfire/pcm-coldfire.c5
-rw-r--r--firmware/target/hosted/android/pcm-android.c5
-rw-r--r--firmware/target/hosted/ibasso/pcm-ibasso.c9
-rw-r--r--firmware/target/hosted/maemo/pcm-gstreamer.c5
-rw-r--r--firmware/target/hosted/pcm-alsa.c5
-rw-r--r--firmware/target/hosted/sdl/pcm-sdl.c5
-rw-r--r--firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c14
-rw-r--r--firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c14
22 files changed, 1 insertions, 164 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];
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c
index 10f9ea931f..c45219297c 100644
--- a/firmware/target/coldfire/pcm-coldfire.c
+++ b/firmware/target/coldfire/pcm-coldfire.c
@@ -264,11 +264,6 @@ void pcm_play_dma_stop(void)
dma_play_lock.state = (1 << 14);
} /* pcm_play_dma_stop */
-size_t pcm_get_bytes_waiting(void)
-{
- return BCR0 & 0xffffff;
-} /* pcm_get_bytes_waiting */
-
/* DMA0 Interrupt is called when the DMA has finished transfering a chunk
from the caller's buffer */
void DMA0(void) __attribute__ ((interrupt_handler, section(".icode")));
diff --git a/firmware/target/hosted/android/pcm-android.c b/firmware/target/hosted/android/pcm-android.c
index 4577c8078a..b078f92698 100644
--- a/firmware/target/hosted/android/pcm-android.c
+++ b/firmware/target/hosted/android/pcm-android.c
@@ -171,11 +171,6 @@ void pcm_play_dma_stop(void)
stop_method);
}
-size_t pcm_get_bytes_waiting(void)
-{
- return pcm_data_size;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
uintptr_t addr = (uintptr_t)pcm_data_start;
diff --git a/firmware/target/hosted/ibasso/pcm-ibasso.c b/firmware/target/hosted/ibasso/pcm-ibasso.c
index edfdc6d592..e31732431b 100644
--- a/firmware/target/hosted/ibasso/pcm-ibasso.c
+++ b/firmware/target/hosted/ibasso/pcm-ibasso.c
@@ -439,15 +439,6 @@ void pcm_dma_apply_settings(void)
}
}
-
-size_t pcm_get_bytes_waiting(void)
-{
- TRACE;
-
- return _pcm_buffer_size;
-}
-
-
/* TODO: WTF */
const void* pcm_play_dma_get_peak_buffer(int* count)
{
diff --git a/firmware/target/hosted/maemo/pcm-gstreamer.c b/firmware/target/hosted/maemo/pcm-gstreamer.c
index 7c864738ef..e2d57f9fab 100644
--- a/firmware/target/hosted/maemo/pcm-gstreamer.c
+++ b/firmware/target/hosted/maemo/pcm-gstreamer.c
@@ -154,11 +154,6 @@ void pcm_play_dma_stop(void)
gst_element_set_state (GST_ELEMENT(gst_pipeline), GST_STATE_NULL);
}
-size_t pcm_get_bytes_waiting(void)
-{
- return pcm_data_size;
-}
-
static void feed_data(GstElement * appsrc, guint size_hint, void *unused)
{
(void)size_hint;
diff --git a/firmware/target/hosted/pcm-alsa.c b/firmware/target/hosted/pcm-alsa.c
index 970abc78cf..14e1c4cd3e 100644
--- a/firmware/target/hosted/pcm-alsa.c
+++ b/firmware/target/hosted/pcm-alsa.c
@@ -735,11 +735,6 @@ void pcm_play_dma_start(const void *addr, size_t size)
}
}
-size_t pcm_get_bytes_waiting(void)
-{
- return pcm_size;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
uintptr_t addr = (uintptr_t)pcm_data;
diff --git a/firmware/target/hosted/sdl/pcm-sdl.c b/firmware/target/hosted/sdl/pcm-sdl.c
index ba43ece543..7297e94340 100644
--- a/firmware/target/hosted/sdl/pcm-sdl.c
+++ b/firmware/target/hosted/sdl/pcm-sdl.c
@@ -124,11 +124,6 @@ void pcm_play_dma_stop(void)
#endif
}
-size_t pcm_get_bytes_waiting(void)
-{
- return pcm_data_size;
-}
-
static void write_to_soundcard(struct pcm_udata *udata)
{
#ifdef DEBUG
diff --git a/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c b/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c
index 1ce0b5ad5f..83325e09ef 100644
--- a/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c
@@ -203,20 +203,6 @@ static int get_dma_count(void)
return count;
}
-size_t pcm_get_bytes_waiting(void)
-{
- int bytes, flags = disable_irq_save();
-
- if(REG_DMAC_DCCSR(DMA_AIC_TX_CHANNEL) & DMAC_DCCSR_EN)
- bytes = get_dma_count() & ~3;
- else
- bytes = 0;
-
- restore_irq(flags);
-
- return bytes;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
int flags = disable_irq_save();
diff --git a/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c b/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c
index 4a4f3020bb..401d568a97 100644
--- a/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c
+++ b/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c
@@ -192,20 +192,6 @@ static int get_dma_count(void)
return count;
}
-size_t pcm_get_bytes_waiting(void)
-{
- int bytes, flags = disable_irq_save();
-
- if(REG_DMAC_DCCSR(DMA_AIC_TX_CHANNEL) & DMAC_DCCSR_EN)
- bytes = get_dma_count() & ~3;
- else
- bytes = 0;
-
- restore_irq(flags);
-
- return bytes;
-}
-
const void * pcm_play_dma_get_peak_buffer(int *count)
{
int flags = disable_irq_save();