diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/pcm.c | 25 | ||||
-rw-r--r-- | firmware/target/arm/as3525/pcm-as3525.c | 1 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/pcm-pp.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/pcm-telechips.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/pnx0101/pcm-pnx0101.c | 7 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c | 1 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c | 2 |
9 files changed, 11 insertions, 37 deletions
diff --git a/firmware/pcm.c b/firmware/pcm.c index ea451a0b9f..0b5b49ebab 100644 --- a/firmware/pcm.c +++ b/firmware/pcm.c @@ -213,6 +213,7 @@ static void pcm_play_data_start(unsigned char *start, size_t size) if (start && size) { logf(" pcm_play_dma_start"); + pcm_apply_settings(); pcm_play_dma_start(start, size); pcm_playing = true; pcm_paused = false; @@ -234,8 +235,6 @@ void pcm_play_data(pcm_more_callback_type get_more, pcm_callback_for_more = get_more; - pcm_apply_settings(); - logf(" pcm_play_data_start"); pcm_play_data_start(start, size); @@ -256,21 +255,17 @@ void pcm_play_pause(bool play) pcm_play_dma_pause(true); pcm_paused = true; } - else + else if (pcm_get_bytes_waiting() > 0) { + logf(" pcm_play_dma_pause"); pcm_apply_settings(); - - if (pcm_get_bytes_waiting() > 0) - { - logf(" pcm_play_dma_pause"); - pcm_play_dma_pause(false); - pcm_paused = false; - } - else - { - logf(" pcm_play_dma_start: no data"); - pcm_play_data_start(NULL, 0); - } + pcm_play_dma_pause(false); + pcm_paused = false; + } + else + { + logf(" pcm_play_dma_start: no data"); + pcm_play_data_start(NULL, 0); } } else diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c index fe694e0967..4df31db376 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c @@ -135,7 +135,6 @@ void pcm_play_dma_init(void) void pcm_postinit(void) { audiohw_postinit(); - pcm_apply_settings(); } void pcm_dma_apply_settings(void) diff --git a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c b/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c index 48f7f608d9..d0f93eedd5 100644 --- a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c @@ -206,9 +206,6 @@ static void play_start_pcm(void) /* Stop transmission (if in progress) */ SSI_SCR1 &= ~SSI_SCR_TE; - /* Apply new settings */ - pcm_apply_settings(); - /* Enable interrupt on unlock */ dma_play_data.state = 1; diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c index e00b1d7e75..0f87a74d1c 100644 --- a/firmware/target/arm/pcm-pp.c +++ b/firmware/target/arm/pcm-pp.c @@ -272,8 +272,6 @@ static void play_start_pcm(void) { fiq_function = fiq_playback; - pcm_apply_settings(); - IISCONFIG &= ~IIS_TXFIFOEN; /* Stop transmitting */ dma_play_data.state = 1; @@ -379,7 +377,6 @@ void pcm_play_dma_init(void) void pcm_postinit(void) { audiohw_postinit(); - pcm_apply_settings(); } 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 823eb3a3a5..06f6638e54 100644 --- a/firmware/target/arm/pcm-telechips.c +++ b/firmware/target/arm/pcm-telechips.c @@ -61,7 +61,6 @@ struct dma_data dma_play_data SHAREDBSS_ATTR = void pcm_postinit(void) { audiohw_postinit(); - pcm_apply_settings(); } const void * pcm_play_dma_get_peak_buffer(int *count) @@ -115,8 +114,6 @@ void pcm_dma_apply_settings(void) static void play_start_pcm(void) { - pcm_apply_settings(); - DAMR &= ~(1<<14); /* disable tx */ dma_play_data.state = 1; diff --git a/firmware/target/arm/pnx0101/pcm-pnx0101.c b/firmware/target/arm/pnx0101/pcm-pnx0101.c index 20fca48039..9d0f76b0a3 100644 --- a/firmware/target/arm/pnx0101/pcm-pnx0101.c +++ b/firmware/target/arm/pnx0101/pcm-pnx0101.c @@ -27,8 +27,6 @@ short __attribute__((section(".dmabuf"))) dma_buf_left[DMA_BUF_SAMPLES]; short __attribute__((section(".dmabuf"))) dma_buf_right[DMA_BUF_SAMPLES]; -static int pcm_sampr = HW_SAMPR_DEFAULT; /* 44.1 is default */ - unsigned short* p IBSS_ATTR; size_t p_size IBSS_ATTR; @@ -42,8 +40,6 @@ void pcm_play_unlock(void) void pcm_play_dma_start(const void *addr, size_t size) { - pcm_apply_settings(); - p = (unsigned short*)addr; p_size = size; } @@ -54,8 +50,7 @@ void pcm_play_dma_stop(void) void pcm_play_dma_pause(bool pause) { - if (!pause) - pcm_apply_settings(); + (void)pause; } static inline void fill_dma_buf(int offset) 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 315fc3bf0f..fbf4547e53 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c @@ -96,7 +96,6 @@ void pcm_play_dma_init(void) void pcm_postinit(void) { audiohw_postinit(); - pcm_apply_settings(); } void pcm_dma_apply_settings(void) @@ -110,8 +109,6 @@ static void play_start_pcm(void) /* clear pending DMA interrupt */ SRCPND = DMA2_MASK; - pcm_apply_settings(); - /* Flush any pending writes */ clean_dcache_range((void*)DISRC2, (DCON2 & 0xFFFFF) * 2); diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c index 9e2e73e0fc..b51139e7e6 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c @@ -46,7 +46,6 @@ void pcm_play_dma_init(void) void pcm_postinit(void) { audiohw_postinit(); - pcm_apply_settings(); /* wake DSP */ dsp_wake(); diff --git a/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c b/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c index 2d3aa45d08..dce989d81f 100644 --- a/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c @@ -39,8 +39,6 @@ void pcm_postinit(void) /* playback sample:16 bits, burst:16 bytes */ __i2s_set_transmit_trigger(4); __i2s_set_oss_sample_size(16); - - pcm_apply_settings(); } const void * pcm_play_dma_get_peak_buffer(int *count) |