Save a few registers in assembler routines for iPod 5Gs LCD driver and YUV conversion.
[kugel-rb.git] / firmware / export / mpeg.h
blob0a9d62cdf09fc367bf27f8d65bad7b599e72e638
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef _MPEG_H_
20 #define _MPEG_H_
22 #include <stdbool.h>
23 #include "id3.h"
24 #include "events.h"
26 #define MPEG_SWAP_CHUNKSIZE 0x2000
27 #define MPEG_HIGH_WATER 2 /* We leave 2 bytes empty because otherwise we
28 wouldn't be able to see the difference between
29 an empty buffer and a full one. */
30 #define MPEG_LOW_WATER 0x60000
31 #define MPEG_RECORDING_LOW_WATER 0x80000
32 #define MPEG_LOW_WATER_CHUNKSIZE 0x40000
33 #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000
34 #ifdef HAVE_MMC
35 #define MPEG_PLAY_PENDING_THRESHOLD 0x20000
36 #define MPEG_PLAY_PENDING_SWAPSIZE 0x20000
37 #else
38 #define MPEG_PLAY_PENDING_THRESHOLD 0x10000
39 #define MPEG_PLAY_PENDING_SWAPSIZE 0x10000
40 #endif
42 #define MPEG_MAX_PRERECORD_SECONDS 30
44 /* For ID3 info and VBR header */
45 #define MPEG_RESERVED_HEADER_SPACE (4096 + 576)
47 #if (CONFIG_CODEC == MAS3587F) || defined(SIMULATOR)
49 #if CONFIG_TUNER & S1A0903X01
50 int mpeg_get_mas_pllfreq(void);
51 #endif
53 #endif
54 unsigned long mpeg_get_last_header(void);
56 /* in order to keep the recording here, I have to expose this */
57 void rec_tick(void);
58 void playback_tick(void); /* FixMe: get rid of this, use mp3_get_playtime() */
60 void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3));
61 void audio_set_track_buffer_event(void (*handler)(struct mp3entry *id3));
62 void audio_set_track_unbuffer_event(void (*handler)(struct mp3entry *id3));
63 void audio_set_cuesheet_callback(bool (*handler)(const char *filename));
65 #endif