diff options
Diffstat (limited to 'apps/recorder/pcm_record.c')
-rw-r--r-- | apps/recorder/pcm_record.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index da4e9b7255..dbbc6901ec 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "logf.h" | 24 | #include "logf.h" |
25 | #include "thread.h" | 25 | #include "thread.h" |
26 | #include <string.h> | 26 | #include <string.h> |
27 | #include "ata.h" | 27 | #include "storage.h" |
28 | #include "usb.h" | 28 | #include "usb.h" |
29 | #include "buffer.h" | 29 | #include "buffer.h" |
30 | #include "general.h" | 30 | #include "general.h" |
@@ -162,7 +162,7 @@ static bool pcm_buffer_empty; /* all pcm chunks processed? */ | |||
162 | static int low_watermark; /* Low watermark to stop flush */ | 162 | static int low_watermark; /* Low watermark to stop flush */ |
163 | static int high_watermark; /* max chunk limit for data flush */ | 163 | static int high_watermark; /* max chunk limit for data flush */ |
164 | static unsigned long spinup_time = 35*HZ/10; /* Fudged spinup time */ | 164 | static unsigned long spinup_time = 35*HZ/10; /* Fudged spinup time */ |
165 | static int last_ata_spinup_time = -1;/* previous spin time used */ | 165 | static int last_storage_spinup_time = -1;/* previous spin time used */ |
166 | #ifdef HAVE_PRIORITY_SCHEDULING | 166 | #ifdef HAVE_PRIORITY_SCHEDULING |
167 | static int flood_watermark; /* boost thread priority when here */ | 167 | static int flood_watermark; /* boost thread priority when here */ |
168 | #endif | 168 | #endif |
@@ -731,7 +731,7 @@ static void pcmrec_end_file(void) | |||
731 | */ | 731 | */ |
732 | static void pcmrec_refresh_watermarks(void) | 732 | static void pcmrec_refresh_watermarks(void) |
733 | { | 733 | { |
734 | logf("ata spinup: %d", ata_spinup_time); | 734 | logf("ata spinup: %d", storage_spinup_time()); |
735 | 735 | ||
736 | /* set the low mark for when flushing stops if automatic */ | 736 | /* set the low mark for when flushing stops if automatic */ |
737 | low_watermark = (LOW_SECONDS*4*sample_rate + (enc_chunk_size-1)) | 737 | low_watermark = (LOW_SECONDS*4*sample_rate + (enc_chunk_size-1)) |
@@ -755,7 +755,7 @@ static void pcmrec_refresh_watermarks(void) | |||
755 | 755 | ||
756 | logf("flood at: %d", flood_watermark); | 756 | logf("flood at: %d", flood_watermark); |
757 | #endif | 757 | #endif |
758 | spinup_time = last_ata_spinup_time = ata_spinup_time; | 758 | spinup_time = last_storage_spinup_time = storage_spinup_time(); |
759 | 759 | ||
760 | /* write at 8s + st remaining in enc_buffer - range 12s to | 760 | /* write at 8s + st remaining in enc_buffer - range 12s to |
761 | 20s total - default to 3.5s spinup. */ | 761 | 20s total - default to 3.5s spinup. */ |
@@ -816,7 +816,7 @@ static void pcmrec_flush(unsigned flush_num) | |||
816 | if (!is_recording) | 816 | if (!is_recording) |
817 | return; | 817 | return; |
818 | 818 | ||
819 | if (ata_spinup_time != last_ata_spinup_time) | 819 | if (storage_spinup_time() != last_storage_spinup_time) |
820 | pcmrec_refresh_watermarks(); | 820 | pcmrec_refresh_watermarks(); |
821 | 821 | ||
822 | /* enough available? no? then leave */ | 822 | /* enough available? no? then leave */ |