summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire/mpio/audio-mpio.c
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-07-02 21:09:28 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-07-02 21:09:28 +0000
commit971a6e9c9480d07b939f5e80a050ef9f49c89f81 (patch)
treee01d1843ceb6e4c3efb5a9de7a2b862eb368a461 /firmware/target/coldfire/mpio/audio-mpio.c
parent15d0ac01345346ae348bb15c58ddf88ef0ac0020 (diff)
downloadrockbox-971a6e9c9480d07b939f5e80a050ef9f49c89f81.tar.gz
rockbox-971a6e9c9480d07b939f5e80a050ef9f49c89f81.zip
HD200 - Setup codec as I2S master and enable recording
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27250 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/mpio/audio-mpio.c')
-rw-r--r--firmware/target/coldfire/mpio/audio-mpio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/coldfire/mpio/audio-mpio.c b/firmware/target/coldfire/mpio/audio-mpio.c
index 217881547e..88c43383ca 100644
--- a/firmware/target/coldfire/mpio/audio-mpio.c
+++ b/firmware/target/coldfire/mpio/audio-mpio.c
@@ -46,6 +46,7 @@ void audio_set_output_source(int source)
if ((unsigned)source >= AUDIO_NUM_SOURCES)
source = AUDIO_SRC_PLAYBACK;
+ /* route incoming audio samples to DAC */
IIS2CONFIG = (IIS2CONFIG & ~(7 << 8)) | (txsrc_select[source+1] << 8);
restore_irq(level);
@@ -73,8 +74,8 @@ void audio_input_mux(int source, unsigned flags)
break;
case AUDIO_SRC_MIC:
- case AUDIO_SRC_LINEIN:
- /* recording only */
+ case AUDIO_SRC_LINEIN:
+ /* recording only */
if (source != last_source)
{
audiohw_set_recsrc(source,true);
@@ -89,10 +90,10 @@ void audio_input_mux(int source, unsigned flags)
last_recording = recording;
+ audiohw_set_recsrc(source,recording);
/* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */
coldfire_set_dataincontrol(recording ?
((3 << 14) | (4 << 3)) : 0);
- audiohw_set_recsrc(source, recording);
break;
}