summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-01-09 00:58:59 +0000
committerJens Arnold <amiconn@rockbox.org>2005-01-09 00:58:59 +0000
commite1a1926f467e3ed029a7706d47f6477c0c9bd96d (patch)
tree42c68f782296462690460d84767dd9d320b3b443 /firmware
parentfaedcd4e7001f6fabb70920ba065be8e312fd1eb (diff)
downloadrockbox-e1a1926f467e3ed029a7706d47f6477c0c9bd96d.tar.gz
rockbox-e1a1926f467e3ed029a7706d47f6477c0c9bd96d.tar.bz2
rockbox-e1a1926f467e3ed029a7706d47f6477c0c9bd96d.zip
Use the register shadow variable in all places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5539 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mp3_playback.c4
-rw-r--r--firmware/mpeg.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c
index cc02505979..140d1ff75b 100644
--- a/firmware/mp3_playback.c
+++ b/firmware/mp3_playback.c
@@ -45,6 +45,7 @@ enum
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
extern unsigned long shadow_io_control_main;
+extern unsigned shadow_codec_reg0;
#endif
/**** globals ****/
@@ -539,7 +540,8 @@ static void init_playback(void)
} while(val);
/* Enable the D/A Converter */
- mas_codec_writereg(0x0, 0x0001);
+ shadow_codec_reg0 = 0x0001;
+ mas_codec_writereg(0x0, shadow_codec_reg0);
/* ADC scale 0%, DSP scale 100% */
mas_codec_writereg(6, 0x0000);
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index becd3d54cb..5b5faceeb1 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -53,7 +53,6 @@ static void stop_recording(void);
static int get_unsaved_space(void);
static void pause_recording(void);
static void resume_recording(void);
-static int shadow_codec_reg0;
#endif /* #if CONFIG_HWCODEC == MAS3587F */
#ifndef SIMULATOR
@@ -362,6 +361,7 @@ unsigned long shadow_encoder_control = 0;
unsigned long shadow_io_control_main = 0;
unsigned long shadow_app_select = 0;
unsigned long shadow_soft_mute = 0;
+unsigned shadow_codec_reg0;
#endif
static int mpeg_file;
@@ -648,7 +648,7 @@ void rec_tick(void)
num_bytes = mp3buf_write - mp3buf_read;
if(num_bytes < 0)
num_bytes += mp3buflen;
-
+
if(mp3buflen - num_bytes < MPEG_RECORDING_LOW_WATER && !saving)
{
saving = true;
@@ -2393,7 +2393,7 @@ void mpeg_beep(int duration)
void mpeg_new_file(const char *filename)
{
mpeg_errno = 0;
-
+
strncpy(recording_filename, filename, MAX_PATH - 1);
recording_filename[MAX_PATH - 1] = 0;