summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-11-11 23:20:19 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-11-12 15:59:09 +0000
commit388adff3cc4ab8584c2c99f9bc5ad7e309281d5e (patch)
tree8b05c374e6ace0ebf7c51641eff56e941de27df4
parent1a68856f52f1b6dc89863758404e54c744fcf53a (diff)
downloadrockbox-388adff3cc.tar.gz
rockbox-388adff3cc.tar.bz2
rockbox-388adff3cc.zip
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
-rw-r--r--apps/plugin.c3
-rw-r--r--apps/plugin.h7
-rw-r--r--apps/plugins/lua/include_lua/pcm.lua2
-rw-r--r--apps/plugins/lua/rocklib.c15
-rw-r--r--docs/PLUGIN_API11
-rw-r--r--firmware/export/pcm.h4
-rw-r--r--firmware/pcm.c29
-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
29 files changed, 5 insertions, 231 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 584fbf1ab3..ee58c870e1 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -602,9 +602,6 @@ static const struct plugin_api rockbox_api = {
pcm_play_stop,
pcm_set_frequency,
pcm_is_playing,
- pcm_get_bytes_waiting,
- pcm_calculate_peaks,
- pcm_get_peak_buffer,
pcm_play_lock,
pcm_play_unlock,
beep_play,
diff --git a/apps/plugin.h b/apps/plugin.h
index 226a084f35..98be645134 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -155,12 +155,12 @@ int plugin_open(char *plugin, char *parameter);
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 243
+#define PLUGIN_API_VERSION 244
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define PLUGIN_MIN_API_VERSION 243
+#define PLUGIN_MIN_API_VERSION 244
/* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */
@@ -677,9 +677,6 @@ struct plugin_api {
void (*pcm_play_stop)(void);
void (*pcm_set_frequency)(unsigned int frequency);
bool (*pcm_is_playing)(void);
- size_t (*pcm_get_bytes_waiting)(void);
- void (*pcm_calculate_peaks)(int *left, int *right);
- const void* (*pcm_get_peak_buffer)(int *count);
void (*pcm_play_lock)(void);
void (*pcm_play_unlock)(void);
void (*beep_play)(unsigned int frequency, unsigned int duration,
diff --git a/apps/plugins/lua/include_lua/pcm.lua b/apps/plugins/lua/include_lua/pcm.lua
index 46cc5b0720..299f7730e9 100644
--- a/apps/plugins/lua/include_lua/pcm.lua
+++ b/apps/plugins/lua/include_lua/pcm.lua
@@ -30,5 +30,3 @@ rb.pcm_play_stop = function() rb.pcm("play_stop") end
rb.pcm_play_lock = function() rb.pcm("play_lock") end
rb.pcm_play_unlock = function() rb.pcm("play_unlock") end
rb.pcm_is_playing = function() return rb.pcm("is_playing") end
-rb.pcm_calculate_peaks = function() return rb.pcm("calculate_peaks") end
-rb.pcm_get_bytes_waiting = function() return rb.pcm("get_bytes_waiting") end
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 6219bb2e5a..81b6f4ce2a 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -521,14 +521,12 @@ RB_WRAP(pcm)
{
enum e_pcm {PCM_APPLYSETTINGS = 0, PCM_ISPLAYING,
PCM_PLAYSTOP, PCM_PLAYLOCK, PCM_PLAYUNLOCK,
- PCM_CALCULATEPEAKS, PCM_SETFREQUENCY, PCM_GETBYTESWAITING, PCM_ECOUNT};
+ PCM_SETFREQUENCY, PCM_ECOUNT};
const char *pcm_option[] = {"apply_settings", "is_playing",
"play_stop", "play_lock", "play_unlock",
- "calculate_peaks", "set_frequency", "get_bytes_waiting", NULL};
+ "set_frequency", NULL};
bool b_result;
- int left, right;
- size_t byteswait;
lua_pushnil(L); /*push nil so options w/o return have something to return */
@@ -551,18 +549,9 @@ RB_WRAP(pcm)
case PCM_PLAYUNLOCK:
rb->pcm_play_unlock();
break;
- case PCM_CALCULATEPEAKS:
- rb->pcm_calculate_peaks(&left, &right);
- lua_pushinteger(L, left);
- lua_pushinteger(L, right);
- return 2;
case PCM_SETFREQUENCY:
rb->pcm_set_frequency((unsigned int) luaL_checkint(L, 2));
break;
- case PCM_GETBYTESWAITING:
- byteswait = rb->pcm_get_bytes_waiting();
- lua_pushinteger(L, byteswait);
- break;
}
yield();
diff --git a/docs/PLUGIN_API b/docs/PLUGIN_API
index b77d25a4b9..364044ab12 100644
--- a/docs/PLUGIN_API
+++ b/docs/PLUGIN_API
@@ -1402,12 +1402,6 @@ void pcm_apply_settings(void)
\group sound
\description
-void pcm_calculate_peaks(int *left, int *right)
- \group sound
- \param left
- \param right
- \description
-
void pcm_calculate_rec_peaks(int *left, int *right)
\group sound
\conditions defined(HAVE_RECORDING)
@@ -1420,11 +1414,6 @@ void pcm_close_recording(void)
\conditions defined(HAVE_RECORDING)
\description
-size_t pcm_get_bytes_waiting(void)
- \group sound
- \return
- \description
-
void pcm_init_recording(void)
\group sound
\conditions defined(HAVE_RECORDING)
diff --git a/firmware/export/pcm.h b/firmware/export/pcm.h
index 61e11ef801..36a752352a 100644
--- a/firmware/export/pcm.h
+++ b/firmware/export/pcm.h
@@ -85,10 +85,6 @@ struct pcm_peaks
long tick; /* Last tick called */
};
-void pcm_calculate_peaks(int *left, int *right);
-const void* pcm_get_peak_buffer(int* count);
-size_t pcm_get_bytes_waiting(void);
-
void pcm_play_stop(void);
bool pcm_is_playing(void);
diff --git a/firmware/pcm.c b/firmware/pcm.c
index 7a7043bef8..6fc0b626f7 100644
--- a/firmware/pcm.c
+++ b/firmware/pcm.c
@@ -37,7 +37,6 @@
* ==Playback==
* Public -
* pcm_postinit
- * pcm_get_bytes_waiting
* pcm_play_lock
* pcm_play_unlock
* Semi-private -
@@ -47,7 +46,6 @@
* pcm_play_dma_postinit
* pcm_play_dma_start
* pcm_play_dma_stop
- * pcm_play_dma_get_peak_buffer
* Data Read/Written within TSP -
* pcm_sampr (R)
* pcm_fsel (R)
@@ -118,11 +116,6 @@ static inline void pcm_play_dma_stop_int(void)
pcm_play_dma_stop();
}
-static inline const void * pcm_play_dma_get_peak_buffer_int(int *count)
-{
- return pcm_play_dma_get_peak_buffer(count);
-}
-
bool pcm_play_dma_complete_callback(enum pcm_dma_status status,
const void **addr, size_t *size)
{
@@ -244,28 +237,6 @@ void pcm_do_peak_calculation(struct pcm_peaks *peaks, bool active,
}
}
-void pcm_calculate_peaks(int *left, int *right)
-{
- /* peak data for the global peak values - i.e. what the final output is */
- static struct pcm_peaks peaks;
-
- int count;
- const void *addr = pcm_play_dma_get_peak_buffer_int(&count);
-
- pcm_do_peak_calculation(&peaks, pcm_playing, addr, count);
-
- if (left)
- *left = peaks.left;
-
- if (right)
- *right = peaks.right;
-}
-
-const void * pcm_get_peak_buffer(int *count)
-{
- return pcm_play_dma_get_peak_buffer_int(count);
-}
-
bool pcm_is_playing(void)
{
return pcm_playing;
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();