From 8f659ae8d3845b40ff93ebfa3692f7b2302e6c7e Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 20 May 2007 20:26:36 +0000 Subject: Use bitmasks to define which inputs are available. Makes it easier to remove old assumptions of which are available. Inspired by e200 being unique in having FM Radio and Mic but no Line. Doesn't remove the assumption that Mic is available or that one of Mic and/or Line is available just to avoid excessive #ifdef'ing until needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13448 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/audio-pp.c | 7 ++++--- firmware/target/arm/system-pp502x.c | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'firmware/target/arm') diff --git a/firmware/target/arm/audio-pp.c b/firmware/target/arm/audio-pp.c index 603bbad5fe..82c5545a3f 100644 --- a/firmware/target/arm/audio-pp.c +++ b/firmware/target/arm/audio-pp.c @@ -40,7 +40,6 @@ void audio_set_source(int source, unsigned flags) { default: /* playback - no recording */ source = AUDIO_SRC_PLAYBACK; -#ifdef HAVE_RECORDING case AUDIO_SRC_PLAYBACK: if (source != last_source) { @@ -48,6 +47,7 @@ void audio_set_source(int source, unsigned flags) audiohw_set_monitor(false); } break; +#ifdef HAVE_MIC_REC case AUDIO_SRC_MIC: /* recording only */ if (source != last_source) { @@ -55,7 +55,8 @@ void audio_set_source(int source, unsigned flags) audiohw_set_monitor(false); } break; - +#endif +#ifdef HAVE_LINEIN_REC case AUDIO_SRC_LINEIN: /* recording only */ if (source != last_source) { @@ -64,7 +65,7 @@ void audio_set_source(int source, unsigned flags) } break; #endif -#if CONFIG_TUNER +#ifdef HAVE_FMRADIO_REC case AUDIO_SRC_FMRADIO: /* recording and playback */ if (!recording) audiohw_set_recvol(0, 0, AUDIO_GAIN_LINEIN); diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c index 1f2d27a7b7..0148f3d9de 100644 --- a/firmware/target/arm/system-pp502x.c +++ b/firmware/target/arm/system-pp502x.c @@ -62,6 +62,11 @@ extern void clickwheel_int(void); void irq(void) { if(CURRENT_CORE == CPU) { + if (CPU_HI_INT_STAT) + { + gui_syncsplash(0, "%08X %08X", inl(0x6000414c), CPU_HI_INT_STAT); + } + if (CPU_INT_STAT & TIMER1_MASK) { #ifdef SANSA_E200 if (GPIOF_INT_STAT & 0xff) @@ -239,6 +244,11 @@ void system_init(void) CPU_INT_CLR = -1; INT_FORCED_CLR = -1; + outl(0, 0x6000414c); + outl(0, 0x60004144); + +// outl(0x80000, 0x6000414c); + GPIOA_INT_EN = 0; GPIOB_INT_EN = 0; GPIOC_INT_EN = 0; -- cgit v1.2.3