summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Goode <jeffg7@gmail.com>2009-11-16 22:02:06 +0000
committerJeffrey Goode <jeffg7@gmail.com>2009-11-16 22:02:06 +0000
commita052102cfb861aae6c8e683ae01bbace9620235c (patch)
treecb54d8bf97099cc7ec1275ef8a27664a089dc831
parentdb82be4390d294c8d460f50c06add41ffa6686f5 (diff)
downloadrockbox-a052102cfb861aae6c8e683ae01bbace9620235c.zip
rockbox-a052102cfb861aae6c8e683ae01bbace9620235c.tar.gz
rockbox-a052102cfb861aae6c8e683ae01bbace9620235c.tar.bz2
rockbox-a052102cfb861aae6c8e683ae01bbace9620235c.tar.xz
mpeg.h/c cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23652 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs.c1
-rw-r--r--apps/misc.c1
-rw-r--r--apps/mpeg.c21
-rw-r--r--apps/mpeg.h42
-rw-r--r--apps/playback.h8
-rw-r--r--apps/recorder/radio.c1
-rw-r--r--apps/recorder/recording.c1
-rw-r--r--apps/settings.c1
-rw-r--r--apps/settings_list.c1
-rw-r--r--firmware/export/audio.h7
10 files changed, 30 insertions, 54 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index 45b0fa7..8976871 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -38,7 +38,6 @@
#include "codecs.h"
#include "lang.h"
#include "keyboard.h"
-#include "mpeg.h"
#include "buffering.h"
#include "mp3_playback.h"
#include "backlight.h"
diff --git a/apps/misc.c b/apps/misc.c
index f1c38f3..6677c5f 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -39,7 +39,6 @@
#include "screens.h"
#include "usb_screen.h"
#include "talk.h"
-#include "mpeg.h"
#include "audio.h"
#include "mp3_playback.h"
#include "settings.h"
diff --git a/apps/mpeg.c b/apps/mpeg.c
index 079faac..514379c 100644
--- a/apps/mpeg.c
+++ b/apps/mpeg.c
@@ -54,6 +54,27 @@
#include "lcd.h"
#endif
+#define MPEG_SWAP_CHUNKSIZE 0x2000
+#define MPEG_HIGH_WATER 2 /* We leave 2 bytes empty because otherwise we
+ wouldn't be able to see the difference between
+ an empty buffer and a full one. */
+#define MPEG_LOW_WATER 0x60000
+#define MPEG_RECORDING_LOW_WATER 0x80000
+#define MPEG_LOW_WATER_CHUNKSIZE 0x40000
+#define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000
+#if (CONFIG_STORAGE & STORAGE_MMC)
+#define MPEG_PLAY_PENDING_THRESHOLD 0x20000
+#define MPEG_PLAY_PENDING_SWAPSIZE 0x20000
+#else
+#define MPEG_PLAY_PENDING_THRESHOLD 0x10000
+#define MPEG_PLAY_PENDING_SWAPSIZE 0x10000
+#endif
+
+#define MPEG_MAX_PRERECORD_SECONDS 30
+
+/* For ID3 info and VBR header */
+#define MPEG_RESERVED_HEADER_SPACE (4096 + 576)
+
#ifndef SIMULATOR
extern unsigned long mas_version_code;
#endif
diff --git a/apps/mpeg.h b/apps/mpeg.h
index 3aaa990..106933d 100644
--- a/apps/mpeg.h
+++ b/apps/mpeg.h
@@ -21,46 +21,8 @@
#ifndef _MPEG_H_
#define _MPEG_H_
-#include <stdbool.h>
-#include "metadata.h"
-
-#define MPEG_SWAP_CHUNKSIZE 0x2000
-#define MPEG_HIGH_WATER 2 /* We leave 2 bytes empty because otherwise we
- wouldn't be able to see the difference between
- an empty buffer and a full one. */
-#define MPEG_LOW_WATER 0x60000
-#define MPEG_RECORDING_LOW_WATER 0x80000
-#define MPEG_LOW_WATER_CHUNKSIZE 0x40000
-#define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000
-#if (CONFIG_STORAGE & STORAGE_MMC)
-#define MPEG_PLAY_PENDING_THRESHOLD 0x20000
-#define MPEG_PLAY_PENDING_SWAPSIZE 0x20000
-#else
-#define MPEG_PLAY_PENDING_THRESHOLD 0x10000
-#define MPEG_PLAY_PENDING_SWAPSIZE 0x10000
-#endif
-
-#define MPEG_MAX_PRERECORD_SECONDS 30
-
-/* For ID3 info and VBR header */
-#define MPEG_RESERVED_HEADER_SPACE (4096 + 576)
-
-#if (CONFIG_CODEC == MAS3587F) || defined(SIMULATOR)
-
-#if CONFIG_TUNER & S1A0903X01
-int mpeg_get_mas_pllfreq(void);
-#endif
-
-#endif
+#if CONFIG_CODEC != SWCODEC
unsigned long mpeg_get_last_header(void);
-/* in order to keep the recording here, I have to expose this */
-void rec_tick(void);
-void playback_tick(void); /* FixMe: get rid of this, use mp3_get_playtime() */
-
-void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3));
-void audio_set_track_buffer_event(void (*handler)(struct mp3entry *id3));
-void audio_set_track_unbuffer_event(void (*handler)(struct mp3entry *id3));
-void audio_set_cuesheet_callback(bool (*handler)(const char *filename));
-
+#endif
#endif
diff --git a/apps/playback.h b/apps/playback.h
index 760408a..27e27ff 100644
--- a/apps/playback.h
+++ b/apps/playback.h
@@ -112,12 +112,4 @@ enum {
Q_CODEC_DO_CALLBACK,
};
-#if CONFIG_CODEC == SWCODEC
-void audio_next_dir(void);
-void audio_prev_dir(void);
-#else
-#define audio_next_dir() ({ })
-#define audio_prev_dir() ({ })
-#endif
-
#endif
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 1cc28a8..b70c682 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -29,7 +29,6 @@
#include "button.h"
#include "status.h"
#include "thread.h"
-#include "mpeg.h"
#include "audio.h"
#include "mp3_playback.h"
#include "ctype.h"
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index fa747b7..17c10f7 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -30,7 +30,6 @@
#include "powermgmt.h"
#include "lcd.h"
#include "led.h"
-#include "mpeg.h"
#include "audio.h"
#if CONFIG_CODEC == SWCODEC
#include "thread.h"
diff --git a/apps/settings.c b/apps/settings.c
index 068613a..9492448 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -32,7 +32,6 @@
#include "usb.h"
#include "backlight.h"
#include "audio.h"
-#include "mpeg.h"
#include "talk.h"
#include "string.h"
#include "rtc.h"
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 9c6c85f..b37a164 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -34,7 +34,6 @@
#include "usb.h"
#include "sound.h"
#include "dsp.h"
-#include "mpeg.h"
#include "audio.h"
#include "power.h"
#include "powermgmt.h"
diff --git a/firmware/export/audio.h b/firmware/export/audio.h
index 1ce023a..f6613df 100644
--- a/firmware/export/audio.h
+++ b/firmware/export/audio.h
@@ -77,6 +77,9 @@ void audio_beep(int duration);
unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size);
/* only implemented in playback.c, but called from firmware */
+void audio_next_dir(void);
+void audio_prev_dir(void);
+
#else /* hwcodec only */
struct audio_debug
{
@@ -105,6 +108,10 @@ struct audio_debug
void audio_get_debugdata(struct audio_debug *dbgdata);
/* unsigned int audio_error(void); - unused function */
void audio_init_playback(void);
+
+#define audio_next_dir() ({ })
+#define audio_prev_dir() ({ })
+
#endif
/* channel modes */