summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-02-02 22:04:15 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-02-02 22:04:15 +0000
commit301f53f93bdf1c64a0291edbe0e6fc790a3e27a4 (patch)
treee6d63992ef0c33b0c06485d63200c7072374f58c /firmware
parentac5fbf3e48d4d6d76aa19e99593dc26ed304dbbe (diff)
downloadrockbox-301f53f93bdf1c64a0291edbe0e6fc790a3e27a4.tar.gz
rockbox-301f53f93bdf1c64a0291edbe0e6fc790a3e27a4.zip
a set of dummies for iriver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5752 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/mpeg.c73
1 files changed, 70 insertions, 3 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index b89fb6fc5d..d63d6ecaa4 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -285,7 +285,7 @@ unsigned long mpeg_get_last_header(void)
285{ 285{
286#ifdef SIMULATOR 286#ifdef SIMULATOR
287 return 0; 287 return 0;
288#else 288#elif CONFIG_HWCODEC != MASNONE
289 unsigned long tmp[2]; 289 unsigned long tmp[2];
290 290
291 /* Read the frame data from the MAS and reconstruct it with the 291 /* Read the frame data from the MAS and reconstruct it with the
@@ -415,7 +415,9 @@ void mpeg_get_debugdata(struct mpeg_debug *dbgdata)
415 415
416 dbgdata->last_dma_chunk_size = last_dma_chunk_size; 416 dbgdata->last_dma_chunk_size = last_dma_chunk_size;
417 417
418#if CONFIG_CPU == SH7034
418 dbgdata->dma_on = (SCR0 & 0x80) != 0; 419 dbgdata->dma_on = (SCR0 & 0x80) != 0;
420#endif
419 dbgdata->playing = playing; 421 dbgdata->playing = playing;
420 dbgdata->play_pending = play_pending; 422 dbgdata->play_pending = play_pending;
421 dbgdata->is_playing = is_playing; 423 dbgdata->is_playing = is_playing;
@@ -961,6 +963,7 @@ static void start_playback_if_ready(void)
961 } 963 }
962} 964}
963 965
966#if CONFIG_HWCODEC != MASNONE
964static bool swap_one_chunk(void) 967static bool swap_one_chunk(void)
965{ 968{
966 int free_space_left; 969 int free_space_left;
@@ -1001,8 +1004,13 @@ static bool swap_one_chunk(void)
1001 1004
1002 return true; 1005 return true;
1003} 1006}
1004 1007#else
1005static const unsigned char empty_id3_header[] = 1008static bool swap_one_chunk(void)
1009{
1010 return false;
1011}
1012#endif
1013const unsigned char empty_id3_header[] =
1006{ 1014{
1007 'I', 'D', '3', 0x03, 0x00, 0x00, 1015 'I', 'D', '3', 0x03, 0x00, 0x00,
1008 0x00, 0x00, 0x1f, 0x76 /* Size is 4096 minus 10 bytes for the header */ 1016 0x00, 0x00, 0x1f, 0x76 /* Size is 4096 minus 10 bytes for the header */
@@ -1010,6 +1018,7 @@ static const unsigned char empty_id3_header[] =
1010 1018
1011static void mpeg_thread(void) 1019static void mpeg_thread(void)
1012{ 1020{
1021#if CONFIG_HWCODEC != MASNONE
1013 static int pause_tick = 0; 1022 static int pause_tick = 0;
1014 static unsigned int pause_track = 0; 1023 static unsigned int pause_track = 0;
1015 struct event ev; 1024 struct event ev;
@@ -1971,6 +1980,7 @@ static void mpeg_thread(void)
1971 } 1980 }
1972#endif /* #if CONFIG_HWCODEC == MAS3587F */ 1981#endif /* #if CONFIG_HWCODEC == MAS3587F */
1973 } 1982 }
1983#endif /* HWCODEC != NONE */
1974} 1984}
1975#endif /* SIMULATOR */ 1985#endif /* SIMULATOR */
1976 1986
@@ -2450,6 +2460,63 @@ unsigned long mpeg_num_recorded_bytes(void)
2450 return 0; 2460 return 0;
2451} 2461}
2452 2462
2463#else /* CONFIG_HWCODEC == MAS3587F */
2464
2465/* dummies coming up */
2466
2467void bitswap(unsigned char *data, int length)
2468{
2469 /* a dummy */
2470 /* this ought to be useless */
2471}
2472
2473void mpeg_init_playback(void)
2474{
2475 /* a dummy */
2476}
2477unsigned long mpeg_recorded_time(void)
2478{
2479 /* a dummy */
2480}
2481void mpeg_beep(int duration)
2482{
2483 /* a dummy */
2484}
2485void mpeg_pause_recording(void)
2486{
2487 /* a dummy */
2488}
2489void mpeg_resume_recording(void)
2490{
2491 /* a dummy */
2492}
2493unsigned long mpeg_num_recorded_bytes(void)
2494{
2495 /* a dummy */
2496}
2497void mpeg_record(const char *filename)
2498{
2499 /* a dummy */
2500}
2501void mpeg_new_file(const char *filename)
2502{
2503 /* a dummy */
2504}
2505
2506void mpeg_set_recording_gain(int left, int right, bool use_mic)
2507{
2508 /* a dummy */
2509}
2510void mpeg_init_recording(void)
2511{
2512 /* a dummy */
2513}
2514void mpeg_set_recording_options(int frequency, int quality,
2515 int source, int channel_mode,
2516 bool editable, int prerecord_time)
2517{
2518 /* a dummy */
2519}
2453#endif 2520#endif
2454 2521
2455void mpeg_play(int offset) 2522void mpeg_play(int offset)