summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-02 04:30:09 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:24 +0100
commit1a06292e418ceb765121e5792b305e17d39b9618 (patch)
tree3d5a7af8c913cb3a34b0633b5e17789b38143fed
parent91a8cd1ae9ebac9cf6a6fa1623873d22c87375d8 (diff)
downloadrockbox-1a06292e418ceb765121e5792b305e17d39b9618.tar.gz
rockbox-1a06292e418ceb765121e5792b305e17d39b9618.zip
imx233: increase audio DAC IRQ priority
This should hopefully fix some audio glitches Change-Id: Ic9701d281e7559c9d93fcb8dad9373caaad9bfb6
-rw-r--r--firmware/target/arm/imx233/icoll-imx233.h6
-rw-r--r--firmware/target/arm/imx233/pcm-imx233.c1
-rw-r--r--firmware/target/arm/imx233/timrot-imx233.c5
-rw-r--r--firmware/target/arm/imx233/timrot-imx233.h2
4 files changed, 14 insertions, 0 deletions
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 @@
78#define BM_ICOLL_PRIORITYn_SOFTIRQx(x) (1 << (3 + 8 * (x))) 78#define BM_ICOLL_PRIORITYn_SOFTIRQx(x) (1 << (3 + 8 * (x)))
79#endif 79#endif
80 80
81/* Interrupt priorities for typical tasks */
82#define ICOLL_PRIO_NORMAL 0
83#define ICOLL_PRIO_AUDIO 1
84#define ICOLL_PRIO_DPC 2
85#define ICOLL_PRIO_WATCHDOG 3
86
81struct imx233_icoll_irq_info_t 87struct imx233_icoll_irq_info_t
82{ 88{
83 bool enabled; 89 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)
165 audiohw_postinit(); 165 audiohw_postinit();
166 imx233_icoll_enable_interrupt(INT_SRC_DAC_DMA, true); 166 imx233_icoll_enable_interrupt(INT_SRC_DAC_DMA, true);
167 imx233_icoll_enable_interrupt(INT_SRC_DAC_ERROR, true); 167 imx233_icoll_enable_interrupt(INT_SRC_DAC_ERROR, true);
168 imx233_icoll_set_priority(INT_SRC_DAC_DMA, ICOLL_PRIO_AUDIO);
168 imx233_dma_enable_channel_interrupt(APB_AUDIO_DAC, true); 169 imx233_dma_enable_channel_interrupt(APB_AUDIO_DAC, true);
169} 170}
170 171
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,
55 restore_interrupt(oldstatus); 55 restore_interrupt(oldstatus);
56} 56}
57 57
58void imx233_timrot_set_priority(unsigned timer_nr, unsigned prio)
59{
60 imx233_icoll_set_priority(INT_SRC_TIMER(timer_nr), prio);
61}
62
58struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr) 63struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr)
59{ 64{
60 struct imx233_timrot_info_t info; 65 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 @@
23 23
24#include "system.h" 24#include "system.h"
25#include "cpu.h" 25#include "cpu.h"
26#include "icoll-imx233.h"
26 27
27#include "regs/regs-timrot.h" 28#include "regs/regs-timrot.h"
28 29
@@ -48,6 +49,7 @@ typedef void (*imx233_timer_fn_t)(void);
48void imx233_timrot_init(void); 49void imx233_timrot_init(void);
49void imx233_timrot_setup(unsigned timer_nr, bool reload, unsigned count, 50void imx233_timrot_setup(unsigned timer_nr, bool reload, unsigned count,
50 unsigned src, unsigned prescale, bool polarity, imx233_timer_fn_t fn); 51 unsigned src, unsigned prescale, bool polarity, imx233_timer_fn_t fn);
52void imx233_timrot_set_priority(unsigned timer_nr, unsigned prio);
51struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr); 53struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr);
52 54
53#endif /* TIMROT_IMX233_H */ 55#endif /* TIMROT_IMX233_H */