Nano2G - remove HAVE_RECORDING from config-ipodnano2g.h as it's not implmented yet, and properly #ifdef audio-nano2g.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23095 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2009-10-11 09:17:12 +00:00
parent 6cba2061d6
commit 7f836fd869
2 changed files with 7 additions and 1 deletions

View file

@ -11,7 +11,7 @@
#define MODEL_NAME "Apple iPod Nano 2g"
/* define this if you have recording possibility */
#define HAVE_RECORDING
//#define HAVE_RECORDING
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */

View file

@ -23,6 +23,7 @@
#include "audio.h"
#include "sound.h"
#if INPUT_SRC_CAPS != 0
void audio_set_output_source(int source)
{
if ((unsigned)source >= AUDIO_NUM_SOURCES)
@ -40,12 +41,15 @@ void audio_input_mux(int source, unsigned flags)
default: /* playback - no recording */
source = AUDIO_SRC_PLAYBACK;
case AUDIO_SRC_PLAYBACK:
#ifdef HAVE_RECORDING
if (source != last_source)
{
audiohw_set_monitor(false);
audiohw_disable_recording();
}
#endif
break;
#ifdef HAVE_LINE_REC
case AUDIO_SRC_LINEIN: /* recording only */
if (source != last_source)
{
@ -53,7 +57,9 @@ void audio_input_mux(int source, unsigned flags)
audiohw_enable_recording(false); /* source line */
}
break;
#endif
} /* end switch */
last_source = source;
} /* audio_input_mux */
#endif /* INPUT_SRC_CAPS != 0 */