diff options
Diffstat (limited to 'firmware/pcm_record.c')
-rw-r--r-- | firmware/pcm_record.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/firmware/pcm_record.c b/firmware/pcm_record.c index c27f80400d..1430100a09 100644 --- a/firmware/pcm_record.c +++ b/firmware/pcm_record.c | |||
@@ -481,6 +481,14 @@ void audio_record(const char *filename) | |||
481 | } /* audio_record */ | 481 | } /* audio_record */ |
482 | 482 | ||
483 | /** | 483 | /** |
484 | * audio_record wrapper for API compatibility with HW codec | ||
485 | */ | ||
486 | void audio_new_file(const char *filename) | ||
487 | { | ||
488 | audio_record(filename); | ||
489 | } /* audio_new_file */ | ||
490 | |||
491 | /** | ||
484 | * Stop current recording if recording | 492 | * Stop current recording if recording |
485 | */ | 493 | */ |
486 | void audio_stop_recording(void) | 494 | void audio_stop_recording(void) |
@@ -551,22 +559,6 @@ unsigned long audio_num_recorded_bytes(void) | |||
551 | return num_rec_bytes; | 559 | return num_rec_bytes; |
552 | } /* audio_num_recorded_bytes */ | 560 | } /* audio_num_recorded_bytes */ |
553 | 561 | ||
554 | #ifdef HAVE_SPDIF_IN | ||
555 | /** | ||
556 | * Return SPDIF sample rate index in audio_master_sampr_list. Since we base | ||
557 | * our reading on the actual SPDIF sample rate (which might be a bit | ||
558 | * inaccurate), we round off to the closest sample rate that is supported by | ||
559 | * SPDIF. | ||
560 | */ | ||
561 | int audio_get_spdif_sample_rate(void) | ||
562 | { | ||
563 | unsigned long measured_rate = spdif_measure_frequency(); | ||
564 | /* Find which SPDIF sample rate we're closest to. */ | ||
565 | return round_value_to_list32(measured_rate, audio_master_sampr_list, | ||
566 | SAMPR_NUM_FREQ, false); | ||
567 | } /* audio_get_spdif_sample_rate */ | ||
568 | #endif /* HAVE_SPDIF_IN */ | ||
569 | |||
570 | /***************************************************************************/ | 562 | /***************************************************************************/ |
571 | /* */ | 563 | /* */ |
572 | /* Functions that execute in the context of pcmrec_thread */ | 564 | /* Functions that execute in the context of pcmrec_thread */ |
@@ -1756,7 +1748,7 @@ void enc_set_parameters(struct enc_parameters *params) | |||
1756 | fnq_size *= MAX_PATH; | 1748 | fnq_size *= MAX_PATH; |
1757 | logf("fnq files:%ld", fnq_size / MAX_PATH); | 1749 | logf("fnq files:%ld", fnq_size / MAX_PATH); |
1758 | 1750 | ||
1759 | #if 1 | 1751 | #if 0 |
1760 | logf("ab :%08lX", (uintptr_t)audiobuf); | 1752 | logf("ab :%08lX", (uintptr_t)audiobuf); |
1761 | logf("pcm:%08lX", (uintptr_t)pcm_buffer); | 1753 | logf("pcm:%08lX", (uintptr_t)pcm_buffer); |
1762 | logf("enc:%08lX", (uintptr_t)enc_buffer); | 1754 | logf("enc:%08lX", (uintptr_t)enc_buffer); |