From 57a7e5778ea52f25fc69cc763ed0bde3c3fce6b7 Mon Sep 17 00:00:00 2001 From: gevaerts Date: Wed, 20 May 2009 16:57:17 +0000 Subject: [PATCH] Don't force double-buffering for sd devices. They apparently are not faster with it, ans possibly actually slower git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20999 a1c6a512-1295-4272-9138-f99709370657 --- firmware/usbstack/usb_storage.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 0d0622175..b49831101 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -53,10 +53,16 @@ * wouldn't buy us anything. * Due to being the double-buffering system used, using a smaller write buffer * ends up being more efficient. Measurements have shown that 24k to 28k is - * optimal + * optimal, except for sd devices that apparently don't gain anything from + * double-buffering */ #define READ_BUFFER_SIZE (1024*64) + +#if (CONFIG_STORAGE & STORAGE_SD) +#define WRITE_BUFFER_SIZE (1024*64) +#else #define WRITE_BUFFER_SIZE (1024*24) +#endif #define ALLOCATE_BUFFER_SIZE (2*MAX(READ_BUFFER_SIZE,WRITE_BUFFER_SIZE)) -- 2.11.4.GIT