summaryrefslogtreecommitdiff
path: root/apps/recorder/pcm_record.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-11-01 16:14:28 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-11-01 16:14:28 +0000
commit2f8a0081c64534da23fc0fa9cc685eb7454fd9c9 (patch)
tree84dbdbd5326cb48f43d2ebd5a4c86e992c1d5288 /apps/recorder/pcm_record.c
parent646cac0bde7b11fa7bcb670d1d76eec78e360485 (diff)
Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.
This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/pcm_record.c')
-rw-r--r--apps/recorder/pcm_record.c10
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 @@
#include "logf.h"
#include "thread.h"
#include <string.h>
-#include "ata.h"
+#include "storage.h"
#include "usb.h"
#include "buffer.h"
#include "general.h"
@@ -162,7 +162,7 @@ static bool pcm_buffer_empty; /* all pcm chunks processed? */
static int low_watermark; /* Low watermark to stop flush */
static int high_watermark; /* max chunk limit for data flush */
static unsigned long spinup_time = 35*HZ/10; /* Fudged spinup time */
-static int last_ata_spinup_time = -1;/* previous spin time used */
+static int last_storage_spinup_time = -1;/* previous spin time used */
#ifdef HAVE_PRIORITY_SCHEDULING
static int flood_watermark; /* boost thread priority when here */
#endif
@@ -731,7 +731,7 @@ static void pcmrec_end_file(void)
*/
static void pcmrec_refresh_watermarks(void)
{
- logf("ata spinup: %d", ata_spinup_time);
+ logf("ata spinup: %d", storage_spinup_time());
/* set the low mark for when flushing stops if automatic */
low_watermark = (LOW_SECONDS*4*sample_rate + (enc_chunk_size-1))
@@ -755,7 +755,7 @@ static void pcmrec_refresh_watermarks(void)
logf("flood at: %d", flood_watermark);
#endif
- spinup_time = last_ata_spinup_time = ata_spinup_time;
+ spinup_time = last_storage_spinup_time = storage_spinup_time();
/* write at 8s + st remaining in enc_buffer - range 12s to
20s total - default to 3.5s spinup. */
@@ -816,7 +816,7 @@ static void pcmrec_flush(unsigned flush_num)
if (!is_recording)
return;
- if (ata_spinup_time != last_ata_spinup_time)
+ if (storage_spinup_time() != last_storage_spinup_time)
pcmrec_refresh_watermarks();
/* enough available? no? then leave */