forked from len0rd/rockbox
pcm: Remove unused function pcm_play_dma_get_peak_buffer()
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
This commit is contained in:
parent
77ec752248
commit
e532714d1f
23 changed files with 0 additions and 269 deletions
|
|
@ -200,18 +200,6 @@ void pcm_dma_apply_settings(void)
|
|||
0x01ffffff);
|
||||
}
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
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);
|
||||
|
||||
*count = (start_size - addr + start_addr) >> 2;
|
||||
return (void*)AS3525_UNCACHED_ADDR(addr);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PCM_DMA_ADDRESS
|
||||
void * pcm_dma_addr(void *addr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,17 +175,6 @@ void pcm_dma_apply_settings(void)
|
|||
pcm_play_unlock();
|
||||
}
|
||||
|
||||
const void *pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
if(!dac_freezed)
|
||||
imx233_dma_freeze_channel(APB_AUDIO_DAC, true);
|
||||
struct imx233_dma_info_t info = imx233_dma_get_info(APB_AUDIO_DAC, DMA_INFO_AHB_BYTES | DMA_INFO_BAR);
|
||||
if(!dac_freezed)
|
||||
imx233_dma_freeze_channel(APB_AUDIO_DAC, false);
|
||||
*count = info.ahb_bytes;
|
||||
return (void *)info.bar;
|
||||
}
|
||||
|
||||
/*
|
||||
* Recording
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -224,34 +224,6 @@ void pcm_play_dma_stop(void)
|
|||
play_stop_pcm();
|
||||
}
|
||||
|
||||
/* Return a pointer to the samples and the number of them in *count */
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
static unsigned long dsa NOCACHEBSS_ATTR;
|
||||
unsigned long addr;
|
||||
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();
|
||||
addr = dsa;
|
||||
offs = addr - (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)
|
||||
{
|
||||
*count = (size - offs) >> 2;
|
||||
return (void *)((addr + 2) & ~3);
|
||||
}
|
||||
|
||||
*count = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * pcm_dma_addr(void *addr)
|
||||
{
|
||||
return (void *)addr_virt_to_phys((unsigned long)addr);
|
||||
|
|
|
|||
|
|
@ -62,14 +62,6 @@ struct dma_data dma_play_data SHAREDBSS_ATTR =
|
|||
.state = 0
|
||||
};
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
unsigned long addr = (unsigned long)dma_play_data.p;
|
||||
size_t cnt = dma_play_data.size;
|
||||
*count = cnt >> 2;
|
||||
return (void *)((addr + 2) & ~3);
|
||||
}
|
||||
|
||||
void pcm_play_dma_init(void)
|
||||
{
|
||||
DAVC = 0x0; /* Digital Volume = max */
|
||||
|
|
|
|||
|
|
@ -512,19 +512,6 @@ void pcm_play_dma_postinit(void)
|
|||
audiohw_postinit();
|
||||
}
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
unsigned long addr, size;
|
||||
|
||||
int status = disable_fiq_save();
|
||||
addr = dma_play_data.addr;
|
||||
size = dma_play_data.size;
|
||||
restore_fiq(status);
|
||||
|
||||
*count = size >> 2;
|
||||
return (void *)((addr + 2) & ~3);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
** Recording DMA transfer
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -263,18 +263,6 @@ void INT_HDMA(void)
|
|||
}
|
||||
}
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
uint32_t addr;
|
||||
|
||||
int old = disable_irq_save();
|
||||
addr = HDMA_CSRC0;
|
||||
*count = ((HDMA_CCNT0 & 0xffff)<<2);
|
||||
restore_interrupt(old);
|
||||
|
||||
return (void*)addr;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
** Recording DMA transfer
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -219,11 +219,3 @@ void fiq_handler(void)
|
|||
|
||||
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
|
||||
}
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
unsigned long addr = DCSRC2;
|
||||
int cnt = DSTAT2;
|
||||
*count = (cnt & 0xFFFFF) >> 1;
|
||||
return (void *)((addr + 2) & ~3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,11 +259,3 @@ void fiq_handler(void)
|
|||
|
||||
pcm_play_dma_status_callback(PCM_DMAST_STARTED);
|
||||
}
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
unsigned long addr = DCSRC2;
|
||||
int cnt = DSTAT2;
|
||||
*count = (cnt & 0xFFFFF) >> 1;
|
||||
return (void *)((addr + 2) & ~3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,12 +262,6 @@ void pcm_dma_apply_settings(void)
|
|||
pcm_dma_set_freq(pcm_fsel);
|
||||
}
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
*count = DMACTCNT0 >> 1;
|
||||
return (void *)(((DMACADDR0 + 2) & ~3) | 0x40000000);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PCM_DMA_ADDRESS
|
||||
void * pcm_dma_addr(void *addr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -216,13 +216,6 @@ void pcm_play_dma_postinit(void)
|
|||
audiohw_postinit();
|
||||
}
|
||||
|
||||
const void* pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
void *addr = dmac_ch_get_info(&dma_play_ch, count, NULL);
|
||||
*count >>= 2; /* bytes to samples */
|
||||
return addr; /* aligned to dest burst */
|
||||
}
|
||||
|
||||
#ifdef HAVE_PCM_DMA_ADDRESS
|
||||
void * pcm_dma_addr(void *addr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,12 +52,6 @@ void pcm_play_dma_postinit(void)
|
|||
// dsp_wake();
|
||||
}
|
||||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
(void) count;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pcm_dma_apply_settings(void)
|
||||
{
|
||||
audiohw_set_frequency(pcm_fsel);
|
||||
|
|
|
|||
|
|
@ -46,22 +46,6 @@ void pcm_play_dma_postinit(void)
|
|||
audiohw_postinit();
|
||||
}
|
||||
|
||||
/* Return the current location in the SDRAM to SARAM transfer along with the
|
||||
* number of bytes read in the current buffer (count). There is latency with
|
||||
* this method equivalent to ~ the size of the SARAM buffer since there is
|
||||
* another buffer between your ears and this calculation, but this works for
|
||||
* key clicks and an approximate peak meter.
|
||||
*/
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
int cnt = DSP_(_sdem_level);
|
||||
|
||||
unsigned long addr = (unsigned long) start + cnt;
|
||||
|
||||
*count = (cnt & 0xFFFFF) >> 1;
|
||||
return (void *)((addr + 2) & ~3);
|
||||
}
|
||||
|
||||
void pcm_play_dma_init(void)
|
||||
{
|
||||
IO_INTC_IRQ0 = INTR_IRQ0_IMGBUF;
|
||||
|
|
|
|||
|
|
@ -42,22 +42,6 @@ void pcm_play_dma_postinit(void)
|
|||
audiohw_postinit();
|
||||
}
|
||||
|
||||
/* Return the current location in the SDRAM to SARAM transfer along with the
|
||||
* number of bytes read in the current buffer (count). There is latency with
|
||||
* this method equivalent to ~ the size of the SARAM buffer since there is
|
||||
* another buffer between your ears and this calculation, but this works for
|
||||
* key clicks and an approximate peak meter.
|
||||
*/
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
int cnt = DSP_(_sdem_level);
|
||||
|
||||
unsigned long addr = (unsigned long) start + cnt;
|
||||
|
||||
*count = (cnt & 0xFFFFF) >> 1;
|
||||
return (void *)((addr + 2) & ~3);
|
||||
}
|
||||
|
||||
void pcm_play_dma_init(void)
|
||||
{
|
||||
/* GIO16 is DSP/AIC3X CLK */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue