diff options
23 files changed, 0 insertions, 269 deletions
diff --git a/firmware/export/pcm-internal.h b/firmware/export/pcm-internal.h index d5d46c33e1..e6400004a0 100644 --- a/firmware/export/pcm-internal.h +++ b/firmware/export/pcm-internal.h | |||
@@ -121,7 +121,6 @@ pcm_play_dma_status_callback(enum pcm_dma_status status) | |||
121 | void pcm_play_dma_start_int(const void *addr, size_t size); | 121 | void pcm_play_dma_start_int(const void *addr, size_t size); |
122 | void pcm_play_dma_stop_int(void); | 122 | void pcm_play_dma_stop_int(void); |
123 | void pcm_play_stop_int(void); | 123 | void pcm_play_stop_int(void); |
124 | const void *pcm_play_dma_get_peak_buffer_int(int *count); | ||
125 | #endif /* HAVE_SW_VOLUME_CONTROL && !PCM_SW_VOLUME_UNBUFFERED */ | 124 | #endif /* HAVE_SW_VOLUME_CONTROL && !PCM_SW_VOLUME_UNBUFFERED */ |
126 | 125 | ||
127 | /* Called by the bottom layer ISR when more data is needed. Returns true | 126 | /* Called by the bottom layer ISR when more data is needed. Returns true |
@@ -145,7 +144,6 @@ void pcm_play_dma_init(void) INIT_ATTR; | |||
145 | void pcm_play_dma_postinit(void); | 144 | void pcm_play_dma_postinit(void); |
146 | void pcm_play_dma_start(const void *addr, size_t size); | 145 | void pcm_play_dma_start(const void *addr, size_t size); |
147 | void pcm_play_dma_stop(void); | 146 | void pcm_play_dma_stop(void); |
148 | const void * pcm_play_dma_get_peak_buffer(int *count); | ||
149 | 147 | ||
150 | void pcm_dma_apply_settings(void); | 148 | void pcm_dma_apply_settings(void); |
151 | 149 | ||
diff --git a/firmware/pcm_sw_volume.c b/firmware/pcm_sw_volume.c index e972896321..29049059e6 100644 --- a/firmware/pcm_sw_volume.c +++ b/firmware/pcm_sw_volume.c | |||
@@ -285,23 +285,6 @@ void pcm_play_dma_stop_int(void) | |||
285 | src_buf_rem = 0; | 285 | src_buf_rem = 0; |
286 | } | 286 | } |
287 | 287 | ||
288 | /* Return playing buffer from the source buffer */ | ||
289 | const void * pcm_play_dma_get_peak_buffer_int(int *count) | ||
290 | { | ||
291 | const void *addr = src_buf_addr; | ||
292 | size_t size = src_buf_rem; | ||
293 | const void *addr2 = src_buf_addr; | ||
294 | |||
295 | if (addr == addr2 && size) | ||
296 | { | ||
297 | *count = size / PCM_SAMPLE_SIZE; | ||
298 | return addr; | ||
299 | } | ||
300 | |||
301 | *count = 0; | ||
302 | return NULL; | ||
303 | } | ||
304 | |||
305 | #endif /* PCM_SW_VOLUME_UNBUFFERED */ | 288 | #endif /* PCM_SW_VOLUME_UNBUFFERED */ |
306 | 289 | ||
307 | 290 | ||
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c index dfbda388be..e480140497 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c | |||
@@ -200,18 +200,6 @@ void pcm_dma_apply_settings(void) | |||
200 | 0x01ffffff); | 200 | 0x01ffffff); |
201 | } | 201 | } |
202 | 202 | ||
203 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
204 | { | ||
205 | int oldstatus = disable_irq_save(); | ||
206 | size_t addr = DMAC_CH_SRC_ADDR(0); | ||
207 | size_t start_addr = (size_t)dma_start_addr; | ||
208 | size_t start_size = dma_start_size; | ||
209 | restore_interrupt(oldstatus); | ||
210 | |||
211 | *count = (start_size - addr + start_addr) >> 2; | ||
212 | return (void*)AS3525_UNCACHED_ADDR(addr); | ||
213 | } | ||
214 | |||
215 | #ifdef HAVE_PCM_DMA_ADDRESS | 203 | #ifdef HAVE_PCM_DMA_ADDRESS |
216 | void * pcm_dma_addr(void *addr) | 204 | void * pcm_dma_addr(void *addr) |
217 | { | 205 | { |
diff --git a/firmware/target/arm/imx233/pcm-imx233.c b/firmware/target/arm/imx233/pcm-imx233.c index c06120e4aa..4738485b3d 100644 --- a/firmware/target/arm/imx233/pcm-imx233.c +++ b/firmware/target/arm/imx233/pcm-imx233.c | |||
@@ -175,17 +175,6 @@ void pcm_dma_apply_settings(void) | |||
175 | pcm_play_unlock(); | 175 | pcm_play_unlock(); |
176 | } | 176 | } |
177 | 177 | ||
178 | const void *pcm_play_dma_get_peak_buffer(int *count) | ||
179 | { | ||
180 | if(!dac_freezed) | ||
181 | imx233_dma_freeze_channel(APB_AUDIO_DAC, true); | ||
182 | struct imx233_dma_info_t info = imx233_dma_get_info(APB_AUDIO_DAC, DMA_INFO_AHB_BYTES | DMA_INFO_BAR); | ||
183 | if(!dac_freezed) | ||
184 | imx233_dma_freeze_channel(APB_AUDIO_DAC, false); | ||
185 | *count = info.ahb_bytes; | ||
186 | return (void *)info.bar; | ||
187 | } | ||
188 | |||
189 | /* | 178 | /* |
190 | * Recording | 179 | * Recording |
191 | */ | 180 | */ |
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 13dff6ecb5..955301b4da 100644 --- a/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c | |||
@@ -224,34 +224,6 @@ void pcm_play_dma_stop(void) | |||
224 | play_stop_pcm(); | 224 | play_stop_pcm(); |
225 | } | 225 | } |
226 | 226 | ||
227 | /* Return a pointer to the samples and the number of them in *count */ | ||
228 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
229 | { | ||
230 | static unsigned long dsa NOCACHEBSS_ATTR; | ||
231 | unsigned long addr; | ||
232 | long offs, size; | ||
233 | int oldstatus; | ||
234 | |||
235 | /* read burst dma source address register in channel context */ | ||
236 | sdma_read_words(&dsa, CHANNEL_CONTEXT_ADDR(DMA_PLAY_CH_NUM)+0x0b, 1); | ||
237 | |||
238 | oldstatus = disable_irq_save(); | ||
239 | addr = dsa; | ||
240 | offs = addr - (unsigned long)dma_play_bd.buf_addr; | ||
241 | size = dma_play_bd.mode.count; | ||
242 | restore_irq(oldstatus); | ||
243 | |||
244 | /* Be addresses are coherent (no buffer change during read) */ | ||
245 | if (offs >= 0 && offs < size) | ||
246 | { | ||
247 | *count = (size - offs) >> 2; | ||
248 | return (void *)((addr + 2) & ~3); | ||
249 | } | ||
250 | |||
251 | *count = 0; | ||
252 | return NULL; | ||
253 | } | ||
254 | |||
255 | void * pcm_dma_addr(void *addr) | 227 | void * pcm_dma_addr(void *addr) |
256 | { | 228 | { |
257 | return (void *)addr_virt_to_phys((unsigned long)addr); | 229 | return (void *)addr_virt_to_phys((unsigned long)addr); |
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c index ff550b14d6..336b5626ca 100644 --- a/firmware/target/arm/pcm-telechips.c +++ b/firmware/target/arm/pcm-telechips.c | |||
@@ -62,14 +62,6 @@ struct dma_data dma_play_data SHAREDBSS_ATTR = | |||
62 | .state = 0 | 62 | .state = 0 |
63 | }; | 63 | }; |
64 | 64 | ||
65 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
66 | { | ||
67 | unsigned long addr = (unsigned long)dma_play_data.p; | ||
68 | size_t cnt = dma_play_data.size; | ||
69 | *count = cnt >> 2; | ||
70 | return (void *)((addr + 2) & ~3); | ||
71 | } | ||
72 | |||
73 | void pcm_play_dma_init(void) | 65 | void pcm_play_dma_init(void) |
74 | { | 66 | { |
75 | DAVC = 0x0; /* Digital Volume = max */ | 67 | DAVC = 0x0; /* Digital Volume = max */ |
diff --git a/firmware/target/arm/pp/pcm-pp.c b/firmware/target/arm/pp/pcm-pp.c index 8434123a92..0d61eb44ff 100644 --- a/firmware/target/arm/pp/pcm-pp.c +++ b/firmware/target/arm/pp/pcm-pp.c | |||
@@ -512,19 +512,6 @@ void pcm_play_dma_postinit(void) | |||
512 | audiohw_postinit(); | 512 | audiohw_postinit(); |
513 | } | 513 | } |
514 | 514 | ||
515 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
516 | { | ||
517 | unsigned long addr, size; | ||
518 | |||
519 | int status = disable_fiq_save(); | ||
520 | addr = dma_play_data.addr; | ||
521 | size = dma_play_data.size; | ||
522 | restore_fiq(status); | ||
523 | |||
524 | *count = size >> 2; | ||
525 | return (void *)((addr + 2) & ~3); | ||
526 | } | ||
527 | |||
528 | /**************************************************************************** | 515 | /**************************************************************************** |
529 | ** Recording DMA transfer | 516 | ** Recording DMA transfer |
530 | **/ | 517 | **/ |
diff --git a/firmware/target/arm/rk27xx/pcm-rk27xx.c b/firmware/target/arm/rk27xx/pcm-rk27xx.c index c0b4c45805..26e3ad87ba 100644 --- a/firmware/target/arm/rk27xx/pcm-rk27xx.c +++ b/firmware/target/arm/rk27xx/pcm-rk27xx.c | |||
@@ -263,18 +263,6 @@ void INT_HDMA(void) | |||
263 | } | 263 | } |
264 | } | 264 | } |
265 | 265 | ||
266 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
267 | { | ||
268 | uint32_t addr; | ||
269 | |||
270 | int old = disable_irq_save(); | ||
271 | addr = HDMA_CSRC0; | ||
272 | *count = ((HDMA_CCNT0 & 0xffff)<<2); | ||
273 | restore_interrupt(old); | ||
274 | |||
275 | return (void*)addr; | ||
276 | } | ||
277 | |||
278 | /**************************************************************************** | 266 | /**************************************************************************** |
279 | ** Recording DMA transfer | 267 | ** Recording DMA transfer |
280 | **/ | 268 | **/ |
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 d784180e77..e75c3fe7c6 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/pcm-meg-fx.c | |||
@@ -219,11 +219,3 @@ void fiq_handler(void) | |||
219 | 219 | ||
220 | pcm_play_dma_status_callback(PCM_DMAST_STARTED); | 220 | pcm_play_dma_status_callback(PCM_DMAST_STARTED); |
221 | } | 221 | } |
222 | |||
223 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
224 | { | ||
225 | unsigned long addr = DCSRC2; | ||
226 | int cnt = DSTAT2; | ||
227 | *count = (cnt & 0xFFFFF) >> 1; | ||
228 | return (void *)((addr + 2) & ~3); | ||
229 | } | ||
diff --git a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c index 9574522586..999a53e3f9 100644 --- a/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c +++ b/firmware/target/arm/s3c2440/mini2440/pcm-mini2440.c | |||
@@ -259,11 +259,3 @@ void fiq_handler(void) | |||
259 | 259 | ||
260 | pcm_play_dma_status_callback(PCM_DMAST_STARTED); | 260 | pcm_play_dma_status_callback(PCM_DMAST_STARTED); |
261 | } | 261 | } |
262 | |||
263 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
264 | { | ||
265 | unsigned long addr = DCSRC2; | ||
266 | int cnt = DSTAT2; | ||
267 | *count = (cnt & 0xFFFFF) >> 1; | ||
268 | return (void *)((addr + 2) & ~3); | ||
269 | } | ||
diff --git a/firmware/target/arm/s5l8700/pcm-s5l8700.c b/firmware/target/arm/s5l8700/pcm-s5l8700.c index 050e14451d..c7b6ed9a03 100644 --- a/firmware/target/arm/s5l8700/pcm-s5l8700.c +++ b/firmware/target/arm/s5l8700/pcm-s5l8700.c | |||
@@ -262,12 +262,6 @@ void pcm_dma_apply_settings(void) | |||
262 | pcm_dma_set_freq(pcm_fsel); | 262 | pcm_dma_set_freq(pcm_fsel); |
263 | } | 263 | } |
264 | 264 | ||
265 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
266 | { | ||
267 | *count = DMACTCNT0 >> 1; | ||
268 | return (void *)(((DMACADDR0 + 2) & ~3) | 0x40000000); | ||
269 | } | ||
270 | |||
271 | #ifdef HAVE_PCM_DMA_ADDRESS | 265 | #ifdef HAVE_PCM_DMA_ADDRESS |
272 | void * pcm_dma_addr(void *addr) | 266 | void * pcm_dma_addr(void *addr) |
273 | { | 267 | { |
diff --git a/firmware/target/arm/s5l8702/pcm-s5l8702.c b/firmware/target/arm/s5l8702/pcm-s5l8702.c index 33fe637770..d4570f3a7f 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) | |||
216 | audiohw_postinit(); | 216 | audiohw_postinit(); |
217 | } | 217 | } |
218 | 218 | ||
219 | const void* pcm_play_dma_get_peak_buffer(int *count) | ||
220 | { | ||
221 | void *addr = dmac_ch_get_info(&dma_play_ch, count, NULL); | ||
222 | *count >>= 2; /* bytes to samples */ | ||
223 | return addr; /* aligned to dest burst */ | ||
224 | } | ||
225 | |||
226 | #ifdef HAVE_PCM_DMA_ADDRESS | 219 | #ifdef HAVE_PCM_DMA_ADDRESS |
227 | void * pcm_dma_addr(void *addr) | 220 | void * pcm_dma_addr(void *addr) |
228 | { | 221 | { |
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c index d5e30ad73b..fa1eb2481f 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c | |||
@@ -52,12 +52,6 @@ void pcm_play_dma_postinit(void) | |||
52 | // dsp_wake(); | 52 | // dsp_wake(); |
53 | } | 53 | } |
54 | 54 | ||
55 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
56 | { | ||
57 | (void) count; | ||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | void pcm_dma_apply_settings(void) | 55 | void pcm_dma_apply_settings(void) |
62 | { | 56 | { |
63 | audiohw_set_frequency(pcm_fsel); | 57 | audiohw_set_frequency(pcm_fsel); |
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c index 5ce5a8f399..fda8615e5a 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/pcm-mr500.c | |||
@@ -46,22 +46,6 @@ void pcm_play_dma_postinit(void) | |||
46 | audiohw_postinit(); | 46 | audiohw_postinit(); |
47 | } | 47 | } |
48 | 48 | ||
49 | /* Return the current location in the SDRAM to SARAM transfer along with the | ||
50 | * number of bytes read in the current buffer (count). There is latency with | ||
51 | * this method equivalent to ~ the size of the SARAM buffer since there is | ||
52 | * another buffer between your ears and this calculation, but this works for | ||
53 | * key clicks and an approximate peak meter. | ||
54 | */ | ||
55 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
56 | { | ||
57 | int cnt = DSP_(_sdem_level); | ||
58 | |||
59 | unsigned long addr = (unsigned long) start + cnt; | ||
60 | |||
61 | *count = (cnt & 0xFFFFF) >> 1; | ||
62 | return (void *)((addr + 2) & ~3); | ||
63 | } | ||
64 | |||
65 | void pcm_play_dma_init(void) | 49 | void pcm_play_dma_init(void) |
66 | { | 50 | { |
67 | IO_INTC_IRQ0 = INTR_IRQ0_IMGBUF; | 51 | IO_INTC_IRQ0 = INTR_IRQ0_IMGBUF; |
diff --git a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c index f9f19a8045..bda000e68f 100644 --- a/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c +++ b/firmware/target/arm/tms320dm320/sansa-connect/pcm-sansaconnect.c | |||
@@ -42,22 +42,6 @@ void pcm_play_dma_postinit(void) | |||
42 | audiohw_postinit(); | 42 | audiohw_postinit(); |
43 | } | 43 | } |
44 | 44 | ||
45 | /* Return the current location in the SDRAM to SARAM transfer along with the | ||
46 | * number of bytes read in the current buffer (count). There is latency with | ||
47 | * this method equivalent to ~ the size of the SARAM buffer since there is | ||
48 | * another buffer between your ears and this calculation, but this works for | ||
49 | * key clicks and an approximate peak meter. | ||
50 | */ | ||
51 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
52 | { | ||
53 | int cnt = DSP_(_sdem_level); | ||
54 | |||
55 | unsigned long addr = (unsigned long) start + cnt; | ||
56 | |||
57 | *count = (cnt & 0xFFFFF) >> 1; | ||
58 | return (void *)((addr + 2) & ~3); | ||
59 | } | ||
60 | |||
61 | void pcm_play_dma_init(void) | 45 | void pcm_play_dma_init(void) |
62 | { | 46 | { |
63 | /* GIO16 is DSP/AIC3X CLK */ | 47 | /* GIO16 is DSP/AIC3X CLK */ |
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c index c45219297c..36eb00c31b 100644 --- a/firmware/target/coldfire/pcm-coldfire.c +++ b/firmware/target/coldfire/pcm-coldfire.c | |||
@@ -301,21 +301,6 @@ void DMA0(void) | |||
301 | /* else inished playing */ | 301 | /* else inished playing */ |
302 | } /* DMA0 */ | 302 | } /* DMA0 */ |
303 | 303 | ||
304 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
305 | { | ||
306 | unsigned long addr, cnt; | ||
307 | |||
308 | /* Make sure interrupt doesn't change the second value after we read the | ||
309 | * first value. */ | ||
310 | int level = set_irq_level(DMA_IRQ_LEVEL); | ||
311 | addr = SAR0; | ||
312 | cnt = BCR0; | ||
313 | restore_irq(level); | ||
314 | |||
315 | *count = (cnt & 0xffffff) >> 2; | ||
316 | return (void *)((addr + 2) & ~3); | ||
317 | } /* pcm_play_dma_get_peak_buffer */ | ||
318 | |||
319 | #ifdef HAVE_RECORDING | 304 | #ifdef HAVE_RECORDING |
320 | /**************************************************************************** | 305 | /**************************************************************************** |
321 | ** Recording DMA transfer | 306 | ** Recording DMA transfer |
diff --git a/firmware/target/hosted/android/pcm-android.c b/firmware/target/hosted/android/pcm-android.c index b078f92698..c23b802b2d 100644 --- a/firmware/target/hosted/android/pcm-android.c +++ b/firmware/target/hosted/android/pcm-android.c | |||
@@ -171,13 +171,6 @@ void pcm_play_dma_stop(void) | |||
171 | stop_method); | 171 | stop_method); |
172 | } | 172 | } |
173 | 173 | ||
174 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
175 | { | ||
176 | uintptr_t addr = (uintptr_t)pcm_data_start; | ||
177 | *count = pcm_data_size / 4; | ||
178 | return (void *)((addr + 3) & ~3); | ||
179 | } | ||
180 | |||
181 | void pcm_play_dma_init(void) | 174 | void pcm_play_dma_init(void) |
182 | { | 175 | { |
183 | /* in order to have background music playing after leaving the activity, | 176 | /* in order to have background music playing after leaving the activity, |
diff --git a/firmware/target/hosted/ibasso/pcm-ibasso.c b/firmware/target/hosted/ibasso/pcm-ibasso.c index e31732431b..5c68ded3e1 100644 --- a/firmware/target/hosted/ibasso/pcm-ibasso.c +++ b/firmware/target/hosted/ibasso/pcm-ibasso.c | |||
@@ -439,17 +439,6 @@ void pcm_dma_apply_settings(void) | |||
439 | } | 439 | } |
440 | } | 440 | } |
441 | 441 | ||
442 | /* TODO: WTF */ | ||
443 | const void* pcm_play_dma_get_peak_buffer(int* count) | ||
444 | { | ||
445 | TRACE; | ||
446 | |||
447 | uintptr_t addr = (uintptr_t) _pcm_buffer; | ||
448 | *count = _pcm_buffer_size / 4; | ||
449 | return (void*) ((addr + 3) & ~3); | ||
450 | } | ||
451 | |||
452 | |||
453 | void pcm_close_device(void) | 442 | void pcm_close_device(void) |
454 | { | 443 | { |
455 | TRACE; | 444 | TRACE; |
diff --git a/firmware/target/hosted/maemo/pcm-gstreamer.c b/firmware/target/hosted/maemo/pcm-gstreamer.c index e2d57f9fab..33fa6d343f 100644 --- a/firmware/target/hosted/maemo/pcm-gstreamer.c +++ b/firmware/target/hosted/maemo/pcm-gstreamer.c | |||
@@ -191,14 +191,6 @@ static void feed_data(GstElement * appsrc, guint size_hint, void *unused) | |||
191 | unlock_audio(); | 191 | unlock_audio(); |
192 | } | 192 | } |
193 | 193 | ||
194 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
195 | { | ||
196 | uintptr_t addr = (uintptr_t)pcm_data; | ||
197 | *count = pcm_data_size / 4; | ||
198 | return (void *)((addr + 2) & ~3); | ||
199 | } | ||
200 | |||
201 | |||
202 | static gboolean | 194 | static gboolean |
203 | gst_bus_message (GstBus * bus, GstMessage * message, void *unused) | 195 | gst_bus_message (GstBus * bus, GstMessage * message, void *unused) |
204 | { | 196 | { |
diff --git a/firmware/target/hosted/pcm-alsa.c b/firmware/target/hosted/pcm-alsa.c index 81c0a19a45..13ebbbcbeb 100644 --- a/firmware/target/hosted/pcm-alsa.c +++ b/firmware/target/hosted/pcm-alsa.c | |||
@@ -775,13 +775,6 @@ void pcm_play_dma_start(const void *addr, size_t size) | |||
775 | } | 775 | } |
776 | } | 776 | } |
777 | 777 | ||
778 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
779 | { | ||
780 | uintptr_t addr = (uintptr_t)pcm_data; | ||
781 | *count = pcm_size / 4; | ||
782 | return (void *)((addr + 3) & ~3); | ||
783 | } | ||
784 | |||
785 | void pcm_play_dma_postinit(void) | 778 | void pcm_play_dma_postinit(void) |
786 | { | 779 | { |
787 | audiohw_postinit(); | 780 | audiohw_postinit(); |
diff --git a/firmware/target/hosted/sdl/pcm-sdl.c b/firmware/target/hosted/sdl/pcm-sdl.c index 7297e94340..940403002f 100644 --- a/firmware/target/hosted/sdl/pcm-sdl.c +++ b/firmware/target/hosted/sdl/pcm-sdl.c | |||
@@ -276,13 +276,6 @@ static void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len) | |||
276 | SDL_UnlockMutex(audio_lock); | 276 | SDL_UnlockMutex(audio_lock); |
277 | } | 277 | } |
278 | 278 | ||
279 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
280 | { | ||
281 | uintptr_t addr = (uintptr_t)pcm_data; | ||
282 | *count = pcm_data_size / 4; | ||
283 | return (void *)((addr + 2) & ~3); | ||
284 | } | ||
285 | |||
286 | #ifdef HAVE_RECORDING | 279 | #ifdef HAVE_RECORDING |
287 | void pcm_rec_lock(void) | 280 | void pcm_rec_lock(void) |
288 | { | 281 | { |
diff --git a/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c b/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c index 83325e09ef..a56214f84b 100644 --- a/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/pcm-jz4740.c | |||
@@ -203,28 +203,6 @@ static int get_dma_count(void) | |||
203 | return count; | 203 | return count; |
204 | } | 204 | } |
205 | 205 | ||
206 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
207 | { | ||
208 | int flags = disable_irq_save(); | ||
209 | |||
210 | const void* addr; | ||
211 | if(REG_DMAC_DCCSR(DMA_AIC_TX_CHANNEL) & DMAC_DCCSR_EN) | ||
212 | { | ||
213 | int bytes = get_dma_count(); | ||
214 | *count = bytes >> 2; | ||
215 | addr = (const void*)((int)(playback_address + bytes + 2) & ~3); | ||
216 | } | ||
217 | else | ||
218 | { | ||
219 | *count = 0; | ||
220 | addr = NULL; | ||
221 | } | ||
222 | |||
223 | restore_irq(flags); | ||
224 | |||
225 | return addr; | ||
226 | } | ||
227 | |||
228 | void audiohw_close(void) | 206 | void audiohw_close(void) |
229 | { | 207 | { |
230 | /* TODO: prevent pop */ | 208 | /* TODO: prevent pop */ |
diff --git a/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c b/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c index 401d568a97..8c70e68b64 100644 --- a/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c +++ b/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c | |||
@@ -191,25 +191,3 @@ static int get_dma_count(void) | |||
191 | 191 | ||
192 | return count; | 192 | return count; |
193 | } | 193 | } |
194 | |||
195 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
196 | { | ||
197 | int flags = disable_irq_save(); | ||
198 | |||
199 | const void* addr; | ||
200 | if(REG_DMAC_DCCSR(DMA_AIC_TX_CHANNEL) & DMAC_DCCSR_EN) | ||
201 | { | ||
202 | int bytes = get_dma_count(); | ||
203 | *count = bytes >> 2; | ||
204 | addr = (const void*)((int)(playback_address + bytes + 2) & ~3); | ||
205 | } | ||
206 | else | ||
207 | { | ||
208 | *count = 0; | ||
209 | addr = NULL; | ||
210 | } | ||
211 | |||
212 | restore_irq(flags); | ||
213 | |||
214 | return addr; | ||
215 | } | ||