diff options
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 73 |
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 | ||
964 | static bool swap_one_chunk(void) | 967 | static 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 | |
1005 | static const unsigned char empty_id3_header[] = | 1008 | static bool swap_one_chunk(void) |
1009 | { | ||
1010 | return false; | ||
1011 | } | ||
1012 | #endif | ||
1013 | const 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 | ||
1011 | static void mpeg_thread(void) | 1019 | static 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 | |||
2467 | void bitswap(unsigned char *data, int length) | ||
2468 | { | ||
2469 | /* a dummy */ | ||
2470 | /* this ought to be useless */ | ||
2471 | } | ||
2472 | |||
2473 | void mpeg_init_playback(void) | ||
2474 | { | ||
2475 | /* a dummy */ | ||
2476 | } | ||
2477 | unsigned long mpeg_recorded_time(void) | ||
2478 | { | ||
2479 | /* a dummy */ | ||
2480 | } | ||
2481 | void mpeg_beep(int duration) | ||
2482 | { | ||
2483 | /* a dummy */ | ||
2484 | } | ||
2485 | void mpeg_pause_recording(void) | ||
2486 | { | ||
2487 | /* a dummy */ | ||
2488 | } | ||
2489 | void mpeg_resume_recording(void) | ||
2490 | { | ||
2491 | /* a dummy */ | ||
2492 | } | ||
2493 | unsigned long mpeg_num_recorded_bytes(void) | ||
2494 | { | ||
2495 | /* a dummy */ | ||
2496 | } | ||
2497 | void mpeg_record(const char *filename) | ||
2498 | { | ||
2499 | /* a dummy */ | ||
2500 | } | ||
2501 | void mpeg_new_file(const char *filename) | ||
2502 | { | ||
2503 | /* a dummy */ | ||
2504 | } | ||
2505 | |||
2506 | void mpeg_set_recording_gain(int left, int right, bool use_mic) | ||
2507 | { | ||
2508 | /* a dummy */ | ||
2509 | } | ||
2510 | void mpeg_init_recording(void) | ||
2511 | { | ||
2512 | /* a dummy */ | ||
2513 | } | ||
2514 | void 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 | ||
2455 | void mpeg_play(int offset) | 2522 | void mpeg_play(int offset) |