mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
jz47xx: Audio path tweaks:
* Increase audio buffer size to better handle IRQ latency (256->2048) * Ensure DMA engine is idle prior to starting transfers * Set AIC to repeat last sample in case of underflows Change-Id: I9c45c20481ee072e5882b7586fb7d50bd8ef2f35
This commit is contained in:
parent
5f5e44f593
commit
90a4f28c27
5 changed files with 10 additions and 0 deletions
|
|
@ -267,6 +267,7 @@ void audiohw_postinit(void)
|
|||
|
||||
void audiohw_init(void)
|
||||
{
|
||||
__aic_play_lastsample(); /* on FIFO underflow */
|
||||
i2s_codec_init();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ void audiohw_init(void)
|
|||
__cpm_start_aic();
|
||||
|
||||
/* Init AIC */
|
||||
__aic_play_lastsample(); /* on FIFO underflow. Versus 0.. */
|
||||
__i2s_enable_sclk();
|
||||
__i2s_external_codec();
|
||||
__i2s_select_msbjustified();
|
||||
|
|
|
|||
|
|
@ -137,6 +137,8 @@ void DMA_CALLBACK(DMA_AIC_TX_CHANNEL)(void)
|
|||
|
||||
void pcm_play_dma_start(const void *addr, size_t size)
|
||||
{
|
||||
pcm_play_dma_stop();
|
||||
|
||||
dma_enable();
|
||||
|
||||
set_dma(addr, size);
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@ void DMA_CALLBACK(DMA_AIC_TX_CHANNEL)(void)
|
|||
|
||||
void pcm_play_dma_start(const void *addr, size_t size)
|
||||
{
|
||||
pcm_play_dma_stop();
|
||||
|
||||
__dmac_channel_enable_clk(DMA_AIC_TX_CHANNEL);
|
||||
|
||||
set_dma(addr, size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue