From 1a06292e418ceb765121e5792b305e17d39b9618 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sun, 2 Feb 2014 04:30:09 +0100 Subject: imx233: increase audio DAC IRQ priority This should hopefully fix some audio glitches Change-Id: Ic9701d281e7559c9d93fcb8dad9373caaad9bfb6 --- firmware/target/arm/imx233/icoll-imx233.h | 6 ++++++ firmware/target/arm/imx233/pcm-imx233.c | 1 + firmware/target/arm/imx233/timrot-imx233.c | 5 +++++ firmware/target/arm/imx233/timrot-imx233.h | 2 ++ 4 files changed, 14 insertions(+) (limited to 'firmware/target/arm') diff --git a/firmware/target/arm/imx233/icoll-imx233.h b/firmware/target/arm/imx233/icoll-imx233.h index 2de2693ae4..f094930864 100644 --- a/firmware/target/arm/imx233/icoll-imx233.h +++ b/firmware/target/arm/imx233/icoll-imx233.h @@ -78,6 +78,12 @@ #define BM_ICOLL_PRIORITYn_SOFTIRQx(x) (1 << (3 + 8 * (x))) #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 { bool enabled; diff --git a/firmware/target/arm/imx233/pcm-imx233.c b/firmware/target/arm/imx233/pcm-imx233.c index 9a5b136442..139717df5e 100644 --- a/firmware/target/arm/imx233/pcm-imx233.c +++ b/firmware/target/arm/imx233/pcm-imx233.c @@ -165,6 +165,7 @@ void pcm_play_dma_postinit(void) audiohw_postinit(); imx233_icoll_enable_interrupt(INT_SRC_DAC_DMA, 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); } diff --git a/firmware/target/arm/imx233/timrot-imx233.c b/firmware/target/arm/imx233/timrot-imx233.c index 14b9bdca7b..0ba86c755d 100644 --- a/firmware/target/arm/imx233/timrot-imx233.c +++ b/firmware/target/arm/imx233/timrot-imx233.c @@ -55,6 +55,11 @@ void imx233_timrot_setup(unsigned timer_nr, bool reload, unsigned count, 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 info; diff --git a/firmware/target/arm/imx233/timrot-imx233.h b/firmware/target/arm/imx233/timrot-imx233.h index e033673a83..f1a7780f34 100644 --- a/firmware/target/arm/imx233/timrot-imx233.h +++ b/firmware/target/arm/imx233/timrot-imx233.h @@ -23,6 +23,7 @@ #include "system.h" #include "cpu.h" +#include "icoll-imx233.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_setup(unsigned timer_nr, bool reload, unsigned count, 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); #endif /* TIMROT_IMX233_H */ -- cgit v1.2.3