diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-03-07 06:23:02 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-03-07 06:23:02 +0000 |
commit | 633f3880024a2f83a21dd96368aa397940bc9ad6 (patch) | |
tree | 7c4319b1715c5c86252fd816764fdf53435163fb /firmware/target/coldfire/iaudio/x5/audio-x5.c | |
parent | 2c94c1afc377c6605772008e6c27b06d579cecf4 (diff) | |
download | rockbox-633f3880024a2f83a21dd96368aa397940bc9ad6.tar.gz rockbox-633f3880024a2f83a21dd96368aa397940bc9ad6.zip |
Coldfire targets: Shuffle IRQ levels around to have all interaction between low level audio function calls and DMA be atomic. Make recording and playback independently startable and stoppable so one can be running and not interfere with the other. All tests I can do at the moment check out ok (play, record, play+record, FM radio on iRivers, S/PDIF on H120 (w/running optical on/off), and on-the-fly samplerate changes). Recording tested for well over an hour run and no problems.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12658 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iaudio/x5/audio-x5.c')
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/audio-x5.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/audio-x5.c b/firmware/target/coldfire/iaudio/x5/audio-x5.c index e673d4ad47..91100ed751 100644 --- a/firmware/target/coldfire/iaudio/x5/audio-x5.c +++ b/firmware/target/coldfire/iaudio/x5/audio-x5.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | void audio_set_output_source(int source) | 24 | void audio_set_output_source(int source) |
25 | { | 25 | { |
26 | int level = set_irq_level(DMA_IRQ_LEVEL); | ||
26 | unsigned long txsrc; | 27 | unsigned long txsrc; |
27 | 28 | ||
28 | if ((unsigned)source >= AUDIO_NUM_SOURCES) | 29 | if ((unsigned)source >= AUDIO_NUM_SOURCES) |
@@ -31,6 +32,7 @@ void audio_set_output_source(int source) | |||
31 | txsrc = (4 << 8); /* recording, iis1RcvData */ | 32 | txsrc = (4 << 8); /* recording, iis1RcvData */ |
32 | 33 | ||
33 | IIS1CONFIG = (IIS1CONFIG & ~(7 << 8)) | txsrc; | 34 | IIS1CONFIG = (IIS1CONFIG & ~(7 << 8)) | txsrc; |
35 | set_irq_level(level); | ||
34 | } /* audio_set_output_source */ | 36 | } /* audio_set_output_source */ |
35 | 37 | ||
36 | void audio_set_source(int source, unsigned flags) | 38 | void audio_set_source(int source, unsigned flags) |