diff options
Diffstat (limited to 'apps/recorder/radio.c')
-rw-r--r-- | apps/recorder/radio.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 443bb3192f..6be6d04e72 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -226,7 +226,7 @@ bool radio_screen(void) | |||
226 | audio_stop(); | 226 | audio_stop(); |
227 | 227 | ||
228 | #if CONFIG_CODEC != SWCODEC | 228 | #if CONFIG_CODEC != SWCODEC |
229 | mpeg_init_recording(); | 229 | audio_init_recording(); |
230 | 230 | ||
231 | sound_settings_apply(); | 231 | sound_settings_apply(); |
232 | 232 | ||
@@ -238,23 +238,24 @@ bool radio_screen(void) | |||
238 | if (global_settings.rec_prerecord_time) | 238 | if (global_settings.rec_prerecord_time) |
239 | talk_buffer_steal(); /* will use the mp3 buffer */ | 239 | talk_buffer_steal(); /* will use the mp3 buffer */ |
240 | 240 | ||
241 | mpeg_set_recording_options(global_settings.rec_frequency, | 241 | audio_set_recording_options(global_settings.rec_frequency, |
242 | global_settings.rec_quality, | 242 | global_settings.rec_quality, |
243 | 1, /* Line In */ | 243 | 1, /* Line In */ |
244 | global_settings.rec_channels, | 244 | global_settings.rec_channels, |
245 | global_settings.rec_editable, | 245 | global_settings.rec_editable, |
246 | global_settings.rec_prerecord_time); | 246 | global_settings.rec_prerecord_time, |
247 | global_settings.rec_monitor); | ||
247 | 248 | ||
248 | 249 | ||
249 | mpeg_set_recording_gain(sound_default(SOUND_LEFT_GAIN), | 250 | audio_set_recording_gain(sound_default(SOUND_LEFT_GAIN), |
250 | sound_default(SOUND_RIGHT_GAIN), false); | 251 | sound_default(SOUND_RIGHT_GAIN), AUDIO_GAIN_LINEIN); |
251 | #else | 252 | #else |
252 | uda1380_enable_recording(false); | 253 | uda1380_enable_recording(false); |
253 | uda1380_set_recvol(0, 0, 10); | 254 | uda1380_set_recvol(10, 10, AUDIO_GAIN_LINEIN); |
254 | uda1380_set_monitor(true); | 255 | uda1380_set_monitor(true); |
255 | 256 | ||
256 | /* Set the input multiplexer to FM */ | 257 | /* Set the input multiplexer to FM */ |
257 | pcmrec_set_mux(1); | 258 | pcm_rec_mux(1); |
258 | #endif | 259 | #endif |
259 | #endif | 260 | #endif |
260 | 261 | ||
@@ -345,14 +346,14 @@ bool radio_screen(void) | |||
345 | #ifndef SIMULATOR | 346 | #ifndef SIMULATOR |
346 | if(audio_status() == AUDIO_STATUS_RECORD) | 347 | if(audio_status() == AUDIO_STATUS_RECORD) |
347 | { | 348 | { |
348 | mpeg_new_file(rec_create_filename(buf)); | 349 | audio_new_file(rec_create_filename(buf)); |
349 | update_screen = true; | 350 | update_screen = true; |
350 | } | 351 | } |
351 | else | 352 | else |
352 | { | 353 | { |
353 | have_recorded = true; | 354 | have_recorded = true; |
354 | talk_buffer_steal(); /* we use the mp3 buffer */ | 355 | talk_buffer_steal(); /* we use the mp3 buffer */ |
355 | mpeg_record(rec_create_filename(buf)); | 356 | audio_record(rec_create_filename(buf)); |
356 | update_screen = true; | 357 | update_screen = true; |
357 | } | 358 | } |
358 | #endif | 359 | #endif |
@@ -517,7 +518,7 @@ bool radio_screen(void) | |||
517 | 518 | ||
518 | #ifndef SIMULATOR | 519 | #ifndef SIMULATOR |
519 | #if CONFIG_CODEC != SWCODEC | 520 | #if CONFIG_CODEC != SWCODEC |
520 | seconds = mpeg_recorded_time() / HZ; | 521 | seconds = audio_recorded_time() / HZ; |
521 | #endif | 522 | #endif |
522 | #endif | 523 | #endif |
523 | if(update_screen || seconds > last_seconds) | 524 | if(update_screen || seconds > last_seconds) |
@@ -609,8 +610,8 @@ bool radio_screen(void) | |||
609 | { | 610 | { |
610 | #if CONFIG_CODEC != SWCODEC | 611 | #if CONFIG_CODEC != SWCODEC |
611 | /* Enable the Left and right A/D Converter */ | 612 | /* Enable the Left and right A/D Converter */ |
612 | mpeg_set_recording_gain(sound_default(SOUND_LEFT_GAIN), | 613 | audio_set_recording_gain(sound_default(SOUND_LEFT_GAIN), |
613 | sound_default(SOUND_RIGHT_GAIN), false); | 614 | sound_default(SOUND_RIGHT_GAIN), AUDIO_GAIN_LINEIN); |
614 | mas_codec_writereg(6, 0x4000); | 615 | mas_codec_writereg(6, 0x4000); |
615 | #endif | 616 | #endif |
616 | radio_set_status(FMRADIO_POWERED); /* leave it powered */ | 617 | radio_set_status(FMRADIO_POWERED); /* leave it powered */ |
@@ -619,7 +620,7 @@ bool radio_screen(void) | |||
619 | { | 620 | { |
620 | radio_stop(); | 621 | radio_stop(); |
621 | #if CONFIG_CODEC == SWCODEC | 622 | #if CONFIG_CODEC == SWCODEC |
622 | pcmrec_set_mux(0); /* Line In */ | 623 | pcm_rec_mux(0); /* Line In */ |
623 | #endif | 624 | #endif |
624 | } | 625 | } |
625 | 626 | ||
@@ -913,12 +914,13 @@ static bool fm_recording_settings(void) | |||
913 | if (global_settings.rec_prerecord_time) | 914 | if (global_settings.rec_prerecord_time) |
914 | talk_buffer_steal(); /* will use the mp3 buffer */ | 915 | talk_buffer_steal(); /* will use the mp3 buffer */ |
915 | 916 | ||
916 | mpeg_set_recording_options(global_settings.rec_frequency, | 917 | audio_set_recording_options(global_settings.rec_frequency, |
917 | global_settings.rec_quality, | 918 | global_settings.rec_quality, |
918 | 1, /* Line In */ | 919 | 1, /* Line In */ |
919 | global_settings.rec_channels, | 920 | global_settings.rec_channels, |
920 | global_settings.rec_editable, | 921 | global_settings.rec_editable, |
921 | global_settings.rec_prerecord_time); | 922 | global_settings.rec_prerecord_time, |
923 | global_settings.rec_monitor); | ||
922 | } | 924 | } |
923 | return ret; | 925 | return ret; |
924 | } | 926 | } |