summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-30 20:30:27 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-31 01:18:27 +0000
commitfe2d52cc7d0180acff26349f2904fba854de6fbc (patch)
tree62dbbe9a6e6ebc011e8e02f7428b8f620a83f698 /firmware/target/arm
parent2d85c7215169780168032617603e9e7b06d7ba25 (diff)
downloadrockbox-fe2d52cc7d0180acff26349f2904fba854de6fbc.tar.gz
rockbox-fe2d52cc7d0180acff26349f2904fba854de6fbc.tar.bz2
rockbox-fe2d52cc7d0180acff26349f2904fba854de6fbc.zip
pcm: Get rid of pcm_play_pause() and associated APIs
Nothing in the core has used it for some time. It's exported to the plugin API but the last plugins to use it were switched to the mixer API back in 2011. This allows us to get rid of pcm_play_dma_pause() from all audio drivers Change-Id: Ic3fa02592316f84963e41d792d1cabb436d1ff6b
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c20
-rw-r--r--firmware/target/arm/imx233/pcm-imx233.c6
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c14
-rw-r--r--firmware/target/arm/pcm-telechips.c9
-rw-r--r--firmware/target/arm/pnx0101/pcm-pnx0101.c7
-rw-r--r--firmware/target/arm/pp/pcm-pp.c9
-rw-r--r--firmware/target/arm/rk27xx/pcm-rk27xx.c15
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c18
-rw-r--r--firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c18
-rw-r--r--firmware/target/arm/s5l8700/pcm-s5l8700.c12
-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.c14
-rw-r--r--firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c14
14 files changed, 1 insertions, 167 deletions
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index ddb4d86bd4..90b6aabd7c 100644
--- a/firmware/target/arm/as3525/pcm-as3525.c
+++ b/firmware/target/arm/as3525/pcm-as3525.c
@@ -152,26 +152,6 @@ void pcm_play_dma_stop(void)
play_callback_pending = false;
}
-void pcm_play_dma_pause(bool pause)
-{
- is_playing = !pause;
-
- if(pause)
- {
- dma_pause_channel(0);
-
- /* if producer's buffer finished, upper layer starts anew */
- if (dma_rem_size == 0)
- play_callback_pending = false;
- }
- else
- {
- if (play_sub_size != 0)
- dma_resume_channel(0);
- /* else unlock calls the callback if sub buffers remain */
- }
-}
-
void pcm_play_dma_init(void)
{
bitset32(&CGU_PERI, CGU_I2SOUT_APB_CLOCK_ENABLE);
diff --git a/firmware/target/arm/imx233/pcm-imx233.c b/firmware/target/arm/imx233/pcm-imx233.c
index de0e1aabf5..7e20a7ce68 100644
--- a/firmware/target/arm/imx233/pcm-imx233.c
+++ b/firmware/target/arm/imx233/pcm-imx233.c
@@ -149,12 +149,6 @@ void pcm_play_dma_start(const void *addr, size_t size)
pcm_play_unlock();
}
-void pcm_play_dma_pause(bool pause)
-{
- imx233_dma_freeze_channel(APB_AUDIO_DAC, pause);
- dac_freezed = pause;
-}
-
void pcm_play_dma_init(void)
{
audiohw_preinit();
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 7304bdcff3..72d8e4a021 100644
--- a/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c
+++ b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c
@@ -224,20 +224,6 @@ void pcm_play_dma_stop(void)
play_stop_pcm();
}
-void pcm_play_dma_pause(bool pause)
-{
- if (pause)
- {
- sdma_channel_pause(DMA_PLAY_CH_NUM);
- play_stop_pcm();
- }
- else
- {
- play_start_pcm();
- sdma_channel_run(DMA_PLAY_CH_NUM);
- }
-}
-
/* Return the number of bytes waiting - full L-R sample pairs only */
size_t pcm_get_bytes_waiting(void)
{
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c
index ddd69088cf..9c64b58594 100644
--- a/firmware/target/arm/pcm-telechips.c
+++ b/firmware/target/arm/pcm-telechips.c
@@ -194,15 +194,6 @@ void pcm_play_unlock(void)
restore_fiq(status);
}
-void pcm_play_dma_pause(bool pause)
-{
- if (pause) {
- play_stop_pcm();
- } else {
- play_start_pcm();
- }
-}
-
size_t pcm_get_bytes_waiting(void)
{
return dma_play_data.size & ~3;
diff --git a/firmware/target/arm/pnx0101/pcm-pnx0101.c b/firmware/target/arm/pnx0101/pcm-pnx0101.c
index a2394bc355..01ead4723b 100644
--- a/firmware/target/arm/pnx0101/pcm-pnx0101.c
+++ b/firmware/target/arm/pnx0101/pcm-pnx0101.c
@@ -49,11 +49,6 @@ void pcm_play_dma_stop(void)
{
}
-void pcm_play_dma_pause(bool pause)
-{
- (void)pause;
-}
-
static inline void fill_dma_buf(int offset)
{
short *l, *r, *lend;
@@ -62,7 +57,7 @@ static inline void fill_dma_buf(int offset)
lend = l + DMA_BUF_SAMPLES / 2;
r = dma_buf_right + offset;
- if (pcm_playing && !pcm_paused)
+ if (pcm_playing)
{
bool new_buffer =false;
diff --git a/firmware/target/arm/pp/pcm-pp.c b/firmware/target/arm/pp/pcm-pp.c
index 99d46a6096..91d567ee83 100644
--- a/firmware/target/arm/pp/pcm-pp.c
+++ b/firmware/target/arm/pp/pcm-pp.c
@@ -497,15 +497,6 @@ void pcm_play_dma_stop(void)
#endif
}
-void pcm_play_dma_pause(bool pause)
-{
- if (pause) {
- play_stop_pcm();
- } else {
- play_start_pcm();
- }
-}
-
size_t pcm_get_bytes_waiting(void)
{
return dma_play_data.size & ~3;
diff --git a/firmware/target/arm/rk27xx/pcm-rk27xx.c b/firmware/target/arm/rk27xx/pcm-rk27xx.c
index 21feaf6cc4..5cfe54f9de 100644
--- a/firmware/target/arm/rk27xx/pcm-rk27xx.c
+++ b/firmware/target/arm/rk27xx/pcm-rk27xx.c
@@ -114,21 +114,6 @@ void pcm_play_dma_start(const void *addr, size_t size)
hdma_i2s_transfer(addr, size);
}
-/* pause DMA transfer by disabling clock to DMA module */
-void pcm_play_dma_pause(bool pause)
-{
- if(pause)
- {
- SCU_CLKCFG |= CLKCFG_HDMA;
- locked = 1;
- }
- else
- {
- SCU_CLKCFG &= ~CLKCFG_HDMA;
- locked = 0;
- }
-}
-
static void i2s_init(void)
{
#if defined(HAVE_RK27XX_CODEC)
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 a1c854a0df..da5dc9cdd5 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c
@@ -195,24 +195,6 @@ void pcm_play_dma_stop(void)
bitclr32(&CLKCON, 1<<17);
}
-void pcm_play_dma_pause(bool pause)
-{
- if (pause)
- {
- /* pause playback on current buffer */
- play_stop_pcm();
- }
- else
- {
- /* restart playback on current buffer */
- /* make sure we're aligned on left channel - skip any right
- channel sample left waiting */
- DISRC2 = (DCSRC2 + 2) & ~0x3;
- DCON2 = DMA_CONTROL_SETUP | (DSTAT2 & 0xFFFFE);
- play_start_pcm();
- }
-}
-
void fiq_handler(void)
{
static const void *start;
diff --git a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
index 943cbb2ade..dbb1a06809 100644
--- a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
+++ b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c
@@ -235,24 +235,6 @@ void pcm_play_dma_stop(void)
bitclr32(&CLKCON, 1<<17);
}
-void pcm_play_dma_pause(bool pause)
-{
- if (pause)
- {
- /* pause playback on current buffer */
- play_stop_pcm();
- }
- else
- {
- /* restart playback on current buffer */
- /* make sure we're aligned on left channel - skip any right
- channel sample left waiting */
- DISRC2 = (DCSRC2 + 2) & ~0x3;
- DCON2 = DMA_CONTROL_SETUP | (DSTAT2 & 0xFFFFE);
- play_start_pcm();
- }
-}
-
void fiq_handler(void)
{
static const void *start;
diff --git a/firmware/target/arm/s5l8700/pcm-s5l8700.c b/firmware/target/arm/s5l8700/pcm-s5l8700.c
index d8387c2aa5..47525611ee 100644
--- a/firmware/target/arm/s5l8700/pcm-s5l8700.c
+++ b/firmware/target/arm/s5l8700/pcm-s5l8700.c
@@ -35,7 +35,6 @@
/* Driver for the IIS/PCM part of the s5l8700 using DMA
Notes:
- - pcm_play_dma_pause is untested, not sure if implemented the right way
- pcm_play_dma_stop is untested, not sure if implemented the right way
- recording is not implemented
*/
@@ -173,17 +172,6 @@ void pcm_play_dma_stop(void)
(0 << 0); /* 0 = LRCK on */
}
-/* pause playback by disabling the I2S interface */
-void pcm_play_dma_pause(bool pause)
-{
- if (pause) {
- I2STXCOM |= (1 << 0); /* LRCK off */
- }
- else {
- I2STXCOM &= ~(1 << 0); /* LRCK on */
- }
-}
-
static void pcm_dma_set_freq(enum hw_freq_indexes idx)
{
struct div_entry div = div_table[idx];
diff --git a/firmware/target/arm/s5l8702/pcm-s5l8702.c b/firmware/target/arm/s5l8702/pcm-s5l8702.c
index 86a0edd54a..a62a7243a2 100644
--- a/firmware/target/arm/s5l8702/pcm-s5l8702.c
+++ b/firmware/target/arm/s5l8702/pcm-s5l8702.c
@@ -157,13 +157,6 @@ void pcm_play_dma_stop(void)
I2STXCOM = 0xa;
}
-/* pause playback by disabling LRCK */
-void pcm_play_dma_pause(bool pause)
-{
- if (pause) I2STXCOM |= 1;
- else I2STXCOM &= ~1;
-}
-
/* MCLK = 12MHz (MCLKDIV2=1), [CS42L55 DS, s4.8] */
#define MCLK_FREQ 12000000
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
index 1fda5fe045..f31185c2ea 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c
@@ -85,11 +85,6 @@ void pcm_play_unlock(void)
}
-void pcm_play_dma_pause(bool pause)
-{
- (void) pause;
-}
-
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 d23c93de39..0d7bcbab37 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c
@@ -120,20 +120,6 @@ void pcm_play_unlock(void)
}
-void pcm_play_dma_pause(bool pause)
-{
- if (pause)
- {
- DSP_(_dma0_stopped)=2;
- dsp_wake();
- }
- else
- {
- DSP_(_dma0_stopped)=0;
- dsp_wake();
- }
-}
-
size_t pcm_get_bytes_waiting(void)
{
return DSP_(_sdem_dsp_size)-DSP_(_sdem_level);
diff --git a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
index 6e640bdf12..c2932fd762 100644
--- a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
+++ b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c
@@ -127,20 +127,6 @@ void pcm_play_unlock(void)
}
-void pcm_play_dma_pause(bool pause)
-{
- if (pause)
- {
- DSP_(_dma0_stopped)=2;
- dsp_wake();
- }
- else
- {
- DSP_(_dma0_stopped)=0;
- dsp_wake();
- }
-}
-
size_t pcm_get_bytes_waiting(void)
{
return DSP_(_sdem_dsp_size)-DSP_(_sdem_level);