diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-11-27 21:52:49 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-11-27 21:52:49 +0000 |
commit | ce3ade1360351df7328fdcb454c100823bd24a50 (patch) | |
tree | a36cd98fc5fbcdc81a33d4a0fe1534d7a34224f7 /firmware | |
parent | a1af87ffe7c579073367823d3ba115179705203e (diff) |
iRiver: Channel 2 shouldn't be monitored except for radio playback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11616 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/coldfire/iriver/audio-iriver.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/firmware/target/coldfire/iriver/audio-iriver.c b/firmware/target/coldfire/iriver/audio-iriver.c index 7a52ce1ff0..420ca309d8 100644 --- a/firmware/target/coldfire/iriver/audio-iriver.c +++ b/firmware/target/coldfire/iriver/audio-iriver.c @@ -58,6 +58,7 @@ void audio_set_source(int source, unsigned flags) /* Prevent pops from unneeded switching */ static int last_source = AUDIO_SRC_PLAYBACK; bool recording = flags & SRCF_RECORDING; + static bool last_recording = false; switch (source) { @@ -77,7 +78,7 @@ void audio_set_source(int source, unsigned flags) if (source != last_source) { uda1380_enable_recording(true); /* source mic */ - uda1380_set_monitor(true); + uda1380_set_monitor(false); /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ DATAINCONTROL = (3 << 14) | (4 << 3); } @@ -87,7 +88,7 @@ void audio_set_source(int source, unsigned flags) if (source != last_source) { uda1380_enable_recording(false); /* source line */ - uda1380_set_monitor(true); + uda1380_set_monitor(false); /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ DATAINCONTROL = (3 << 14) | (4 << 3); } @@ -106,6 +107,14 @@ void audio_set_source(int source, unsigned flags) #endif /* HAVE_SPDIF_IN */ case AUDIO_SRC_FMRADIO: /* recording and playback */ + if (!recording) + uda1380_set_recvol(0, 0, AUDIO_GAIN_LINEIN); + + if (source == last_source && recording == last_recording) + break; + + last_recording = recording; + if (recording) { /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */ @@ -113,17 +122,13 @@ void audio_set_source(int source, unsigned flags) } else { - uda1380_set_recvol(0, 0, AUDIO_GAIN_LINEIN); /* Reset PDIR2 data flow */ DATAINCONTROL = (1 << 9); } - if (source != last_source) - { - /* I2S recording and playback */ - uda1380_enable_recording(false); /* source line */ - uda1380_set_monitor(true); - } + /* I2S recording and playback */ + uda1380_enable_recording(false); /* source line */ + uda1380_set_monitor(!recording); break; } /* end switch */ |