forked from len0rd/rockbox
imx233: increase audio DAC IRQ priority
This should hopefully fix some audio glitches Change-Id: Ic9701d281e7559c9d93fcb8dad9373caaad9bfb6
This commit is contained in:
parent
91a8cd1ae9
commit
1a06292e41
4 changed files with 14 additions and 0 deletions
|
@ -78,6 +78,12 @@
|
||||||
#define BM_ICOLL_PRIORITYn_SOFTIRQx(x) (1 << (3 + 8 * (x)))
|
#define BM_ICOLL_PRIORITYn_SOFTIRQx(x) (1 << (3 + 8 * (x)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Interrupt priorities for typical tasks */
|
||||||
|
#define ICOLL_PRIO_NORMAL 0
|
||||||
|
#define ICOLL_PRIO_AUDIO 1
|
||||||
|
#define ICOLL_PRIO_DPC 2
|
||||||
|
#define ICOLL_PRIO_WATCHDOG 3
|
||||||
|
|
||||||
struct imx233_icoll_irq_info_t
|
struct imx233_icoll_irq_info_t
|
||||||
{
|
{
|
||||||
bool enabled;
|
bool enabled;
|
||||||
|
|
|
@ -165,6 +165,7 @@ void pcm_play_dma_postinit(void)
|
||||||
audiohw_postinit();
|
audiohw_postinit();
|
||||||
imx233_icoll_enable_interrupt(INT_SRC_DAC_DMA, true);
|
imx233_icoll_enable_interrupt(INT_SRC_DAC_DMA, true);
|
||||||
imx233_icoll_enable_interrupt(INT_SRC_DAC_ERROR, true);
|
imx233_icoll_enable_interrupt(INT_SRC_DAC_ERROR, true);
|
||||||
|
imx233_icoll_set_priority(INT_SRC_DAC_DMA, ICOLL_PRIO_AUDIO);
|
||||||
imx233_dma_enable_channel_interrupt(APB_AUDIO_DAC, true);
|
imx233_dma_enable_channel_interrupt(APB_AUDIO_DAC, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,11 @@ void imx233_timrot_setup(unsigned timer_nr, bool reload, unsigned count,
|
||||||
restore_interrupt(oldstatus);
|
restore_interrupt(oldstatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void imx233_timrot_set_priority(unsigned timer_nr, unsigned prio)
|
||||||
|
{
|
||||||
|
imx233_icoll_set_priority(INT_SRC_TIMER(timer_nr), prio);
|
||||||
|
}
|
||||||
|
|
||||||
struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr)
|
struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr)
|
||||||
{
|
{
|
||||||
struct imx233_timrot_info_t info;
|
struct imx233_timrot_info_t info;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
#include "icoll-imx233.h"
|
||||||
|
|
||||||
#include "regs/regs-timrot.h"
|
#include "regs/regs-timrot.h"
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ typedef void (*imx233_timer_fn_t)(void);
|
||||||
void imx233_timrot_init(void);
|
void imx233_timrot_init(void);
|
||||||
void imx233_timrot_setup(unsigned timer_nr, bool reload, unsigned count,
|
void imx233_timrot_setup(unsigned timer_nr, bool reload, unsigned count,
|
||||||
unsigned src, unsigned prescale, bool polarity, imx233_timer_fn_t fn);
|
unsigned src, unsigned prescale, bool polarity, imx233_timer_fn_t fn);
|
||||||
|
void imx233_timrot_set_priority(unsigned timer_nr, unsigned prio);
|
||||||
struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr);
|
struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr);
|
||||||
|
|
||||||
#endif /* TIMROT_IMX233_H */
|
#endif /* TIMROT_IMX233_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue