diff options
| author | Andy <andy@rockbox.org> | 2005-06-19 03:05:53 +0000 |
|---|---|---|
| committer | Andy <andy@rockbox.org> | 2005-06-19 03:05:53 +0000 |
| commit | e5d08722f8e1a46ba73af7a6ea7a09833799a25f (patch) | |
| tree | d8d04a2fc787e90dd7294be609009db1bf2608a2 /firmware/export | |
| parent | 2c0a58c2382ccf9a6195c679f820a9896fd1dbaa (diff) | |
| download | rockbox-e5d08722f8e1a46ba73af7a6ea7a09833799a25f.zip rockbox-e5d08722f8e1a46ba73af7a6ea7a09833799a25f.tar.gz rockbox-e5d08722f8e1a46ba73af7a6ea7a09833799a25f.tar.bz2 rockbox-e5d08722f8e1a46ba73af7a6ea7a09833799a25f.tar.xz | |
Iriver: First attempt at recording. Use Info->Debug->PCM recording to test recording of wav-files. Seams to work fine except occasional 100 ms noise at pos 100 ms (not later) so initialization or synch problem..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6763 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
| -rw-r--r-- | firmware/export/mcf5249.h | 5 | ||||
| -rw-r--r-- | firmware/export/pcm_record.h | 51 |
2 files changed, 55 insertions, 1 deletions
diff --git a/firmware/export/mcf5249.h b/firmware/export/mcf5249.h index 398b311..66e92ee 100644 --- a/firmware/export/mcf5249.h +++ b/firmware/export/mcf5249.h @@ -159,7 +159,7 @@ #define PDOR1_R (*(volatile unsigned long *)(MBAR2 + 0x044)) #define PDOR2_L (*(volatile unsigned long *)(MBAR2 + 0x054)) #define PDOR2_R (*(volatile unsigned long *)(MBAR2 + 0x064)) -#define PDIR3 (*(volatile unsigned long *)(MBAR2 + 0x074)) +#define PDIR2 (*(volatile unsigned long *)(MBAR2 + 0x074)) #define PDOR3 (*(volatile unsigned long *)(MBAR2 + 0x074)) #define UCHANNELTRANSMIT (*(volatile unsigned long *)(MBAR2 + 0x084)) #define U1CHANNELRECEIVE (*(volatile unsigned long *)(MBAR2 + 0x088)) @@ -262,5 +262,8 @@ /* DMAROUTE config */ #define DMA0_REQ_AUDIO_1 0x80 #define DMA0_REQ_AUDIO_2 0x81 +#define DMA1_REQ_AUDIO_1 0x8000 +#define DMA1_REQ_AUDIO_2 0x8100 + #endif diff --git a/firmware/export/pcm_record.h b/firmware/export/pcm_record.h new file mode 100644 index 0000000..964d3a0 --- /dev/null +++ b/firmware/export/pcm_record.h @@ -0,0 +1,51 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2005 by Linus Nielsen Feltzing + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +/* + * Function names are taken from apps/recorder/recording.c to + * make the integration later easier.. + * + */ + +#ifndef PCM_RECORD_H +#define PCM_RECORD_H + +unsigned long pcm_status(void); + +void pcm_init_recording(void); + +void pcm_open_recording(void); +void pcm_close_recording(void); + + +void pcm_set_recording_options(int source, bool enable_waveform); +void pcm_set_recording_gain(int gain, int volume); + +void pcm_record(const char *filename); +void pcm_stop_recording(void); + +//void pcm_new_file(const char *filename); + + +unsigned long pcm_recorded_time(void); +unsigned long pcm_num_recorded_bytes(void); +void pcm_pause_recording(void); +void pcm_resume_recording(void); + +#endif |