diff --git a/apps/codecs.c b/apps/codecs.c index 45b0fa7790..8976871abd 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 f1c38f376c..6677c5f9b9 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 079faac13c..514379c16c 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 3aaa990881..106933dba3 100644 --- a/apps/mpeg.h +++ b/apps/mpeg.h @@ -21,46 +21,8 @@ #ifndef _MPEG_H_ #define _MPEG_H_ -#include -#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 760408a02f..27e27ff240 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 1cc28a85a5..b70c682922 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 fa747b7c61..17c10f7328 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 068613abcf..9492448ade 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 9c6c85fa61..b37a164f9f 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 1ce023a5e5..f6613dfe8b 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 */