From 46573019a53dca411f754d40d0f21c1e4eafaedf Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Tue, 7 Oct 2008 19:37:33 +0000 Subject: add HAVE_DISK_STORAGE, and use that instead of HAVE_FLASH_STORAGE when checking for an actual disk (i.e. related to spindown, skipping,...) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18735 a1c6a512-1295-4272-9138-f99709370657 --- apps/features.txt | 4 ++++ apps/menus/playback_menu.c | 6 +++--- apps/menus/settings_menu.c | 8 ++++---- apps/playback.c | 6 +++--- apps/playlist.c | 2 +- apps/plugins/jpeg.c | 4 ++-- apps/plugins/mpegplayer/stream_mgr.h | 2 +- apps/plugins/video.c | 2 +- apps/settings.c | 4 ++-- apps/settings.h | 2 +- apps/settings_list.c | 8 ++++---- apps/tagtree.c | 2 +- firmware/export/audio.h | 2 +- firmware/export/config-creativezv.h | 4 ++++ firmware/export/config-creativezvm.h | 4 ++++ firmware/export/config-creativezvm60gb.h | 4 ++++ firmware/export/config-fmrecorder.h | 4 ++++ firmware/export/config-gigabeat-s.h | 4 ++++ firmware/export/config-gigabeat.h | 4 ++++ firmware/export/config-h10.h | 4 ++++ firmware/export/config-h100.h | 4 ++++ firmware/export/config-h10_5gb.h | 4 ++++ firmware/export/config-h120.h | 4 ++++ firmware/export/config-h300.h | 4 ++++ firmware/export/config-hdd1630.h | 4 ++++ firmware/export/config-iaudiom3.h | 4 ++++ firmware/export/config-iaudiom5.h | 4 ++++ firmware/export/config-iaudiox5.h | 4 ++++ firmware/export/config-ipod1g2g.h | 4 ++++ firmware/export/config-ipod3g.h | 4 ++++ firmware/export/config-ipod4g.h | 4 ++++ firmware/export/config-ipodcolor.h | 4 ++++ firmware/export/config-ipodmini.h | 4 ++++ firmware/export/config-ipodmini2g.h | 4 ++++ firmware/export/config-ipodvideo.h | 4 ++++ firmware/export/config-mrobe100.h | 4 ++++ firmware/export/config-mrobe500.h | 4 ++++ firmware/export/config-player.h | 4 ++++ firmware/export/config-recorder.h | 4 ++++ firmware/export/config-recorderv2.h | 4 ++++ firmware/export/config-tpj1022.h | 4 ++++ firmware/mpeg.c | 2 +- firmware/usb.c | 2 +- 43 files changed, 142 insertions(+), 26 deletions(-) diff --git a/apps/features.txt b/apps/features.txt index 2aa6035388..84edad1a61 100644 --- a/apps/features.txt +++ b/apps/features.txt @@ -36,6 +36,10 @@ dircache flash_storage #endif +#if defined(HAVE_DISK_STORAGE) +disk_storage +#endif + #if defined(HAVE_HEADPHONE_DETECTION) headphone_detection #endif diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c index eb1597948b..5d1421b966 100644 --- a/apps/menus/playback_menu.c +++ b/apps/menus/playback_menu.c @@ -67,7 +67,7 @@ MENUITEM_SETTING(ff_rewind_accel, &global_settings.ff_rewind_accel, NULL); MENUITEM_SETTING(ff_rewind_min_step, &global_settings.ff_rewind_min_step, NULL); MAKE_MENU(ff_rewind_settings_menu, ID2P(LANG_WIND_MENU), 0, Icon_NOICON, &ff_rewind_min_step, &ff_rewind_accel); -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE #if CONFIG_CODEC == SWCODEC static int buffermargin_callback(int action,const struct menu_item_ex *this_item) { @@ -85,7 +85,7 @@ static int buffermargin_callback(int action,const struct menu_item_ex *this_item #endif MENUITEM_SETTING(buffer_margin, &global_settings.buffer_margin, buffermargin_callback); -#endif /*HAVE_FLASH_STORAGE */ +#endif /*HAVE_DISK_STORAGE */ MENUITEM_SETTING(fade_on_stop, &global_settings.fade_on_stop, NULL); MENUITEM_SETTING(party_mode, &global_settings.party_mode, NULL); @@ -181,7 +181,7 @@ MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0, Icon_Playback_menu, &shuffle_item, &repeat_mode, &play_selected, &ff_rewind_settings_menu, -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE &buffer_margin, #endif &fade_on_stop, &party_mode, diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index d5ddc168a0..48ab316a87 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -173,7 +173,7 @@ MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON, #endif ); /* Disk */ -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE MENUITEM_SETTING(disk_spindown, &global_settings.disk_spindown, NULL); #endif #ifdef HAVE_DIRCACHE @@ -200,9 +200,9 @@ static int dircache_callback(int action,const struct menu_item_ex *this_item) } MENUITEM_SETTING(dircache, &global_settings.dircache, dircache_callback); #endif -#if defined(HAVE_DIRCACHE) || !defined(HAVE_FLASH_STORAGE) +#if defined(HAVE_DIRCACHE) || defined(HAVE_DISK_STORAGE) MAKE_MENU(disk_menu, ID2P(LANG_DISK_MENU), 0, Icon_NOICON, -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE &disk_spindown, #endif #ifdef HAVE_DIRCACHE @@ -374,7 +374,7 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), #if (BATTERY_CAPACITY_INC > 0) || (BATTERY_TYPES_COUNT > 1) &battery_menu, #endif -#if defined(HAVE_DIRCACHE) || !defined(HAVE_FLASH_STORAGE) +#if defined(HAVE_DIRCACHE) || defined(HAVE_DISK_STORAGE) &disk_menu, #endif #if CONFIG_RTC diff --git a/apps/playback.c b/apps/playback.c index ee1993a2da..925092a3dd 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -783,7 +783,7 @@ int audio_get_file_pos(void) return 0; } -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE void audio_set_buffer_margin(int setting) { static const int lookup[] = {5, 15, 30, 60, 120, 180, 300, 600}; @@ -2187,7 +2187,7 @@ static void audio_play_start(size_t offset) /* Officially playing */ queue_reply(&audio_queue, 1); -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE set_filebuf_watermark(buffer_margin, 0); #endif @@ -2584,7 +2584,7 @@ void audio_init(void) audio_is_initialized = true; sound_settings_apply(); -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE audio_set_buffer_margin(global_settings.buffer_margin); #endif diff --git a/apps/playlist.c b/apps/playlist.c index 8dd444889a..018a39ae41 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -1245,7 +1245,7 @@ static void playlist_thread(void) int sleep_time = 5; -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE if (global_settings.disk_spindown > 1 && global_settings.disk_spindown <= 5) sleep_time = global_settings.disk_spindown - 1; diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index b43dee5d74..397fab7bd6 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c @@ -2633,7 +2633,7 @@ int show_menu(void) /* return 1 to quit */ break; } -#if !defined(SIMULATOR) && !defined(HAVE_FLASH_STORAGE) +#if !defined(SIMULATOR) && defined(HAVE_DISK_STORAGE) /* change ata spindown time based on slideshow time setting */ immediate_ata_off = false; rb->ata_spindown(rb->global_settings->disk_spindown); @@ -3412,7 +3412,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame ARRAYLEN(jpeg_config), JPEG_SETTINGS_VERSION); } -#if !defined(SIMULATOR) && !defined(HAVE_FLASH_STORAGE) +#if !defined(SIMULATOR) && defined(HAVE_DISK_STORAGE) /* set back ata spindown time in case we changed it */ rb->ata_spindown(rb->global_settings->disk_spindown); #endif diff --git a/apps/plugins/mpegplayer/stream_mgr.h b/apps/plugins/mpegplayer/stream_mgr.h index 71a3fd51c6..c94fa84089 100644 --- a/apps/plugins/mpegplayer/stream_mgr.h +++ b/apps/plugins/mpegplayer/stream_mgr.h @@ -152,7 +152,7 @@ static inline bool stream_can_seek(void) /* Keep the disk spinning (for seeking and browsing) */ static inline void stream_keep_disk_active(void) { -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE rb->ata_spin(); #endif } diff --git a/apps/plugins/video.c b/apps/plugins/video.c index fbd05bd006..6a380b8e3c 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c @@ -656,7 +656,7 @@ int PlayTick(int fd) } if (!gPlay.bRefilling -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE && rb->global_settings->disk_spindown < 20 /* condition for test only */ #endif ) diff --git a/apps/settings.c b/apps/settings.c index f598876818..709e05e086 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -721,7 +721,7 @@ void settings_apply(bool read_disk) sound_settings_apply(); -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE audio_set_buffer_margin(global_settings.buffer_margin); #endif @@ -767,7 +767,7 @@ void settings_apply(bool read_disk) #ifdef HAVE_BUTTON_LIGHT buttonlight_set_timeout(global_settings.buttonlight_timeout); #endif -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE ata_spindown(global_settings.disk_spindown); #endif #if (CONFIG_CODEC == MAS3507D) && !defined(SIMULATOR) diff --git a/apps/settings.h b/apps/settings.h index 902956e471..f1fd7cc2c4 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -449,7 +449,7 @@ struct user_settings int ff_rewind_min_step; /* FF/Rewind minimum step size */ int ff_rewind_accel; /* FF/Rewind acceleration (in seconds per doubling) */ -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE int disk_spindown; /* time until disk spindown, in seconds (0=off) */ int buffer_margin; /* MP3 buffer watermark margin, in seconds */ #endif diff --git a/apps/settings_list.c b/apps/settings_list.c index e70f587b5a..8994ca45b7 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -695,22 +695,22 @@ const struct settings_list settings[] = { "seek acceleration", "very fast,fast,normal,slow,very slow", NULL, 5, ID2P(LANG_VERY_FAST), ID2P(LANG_FAST), ID2P(LANG_NORMAL), ID2P(LANG_SLOW) , ID2P(LANG_VERY_SLOW)), -#if (CONFIG_CODEC == SWCODEC) && !defined(HAVE_FLASH_STORAGE) +#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE) STRINGCHOICE_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0,"antiskip", "5s,15s,30s,1min,2min,3min,5min,10min", NULL, 8, TALK_ID(5, UNIT_SEC), TALK_ID(15, UNIT_SEC), TALK_ID(30, UNIT_SEC), TALK_ID(1, UNIT_MIN), TALK_ID(2, UNIT_MIN), TALK_ID(3, UNIT_MIN), TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN)), -#elif !defined(HAVE_FLASH_STORAGE) +#elif defined(HAVE_DISK_STORAGE) INT_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0, "antiskip", UNIT_SEC, 0, 7, 1, NULL, NULL, audio_set_buffer_margin), #endif /* disk */ -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE INT_SETTING(0, disk_spindown, LANG_SPINDOWN, 5, "disk spindown", UNIT_SEC, 3, 254, 1, NULL, NULL, ata_spindown), -#endif /* HAVE_FLASH_STORAGE */ +#endif /* HAVE_DISK_STORAGE */ /* browser */ CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files", "all,supported,music,playlists", NULL, 4, ID2P(LANG_ALL), diff --git a/apps/tagtree.c b/apps/tagtree.c index 5415610501..92bf18bc26 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -1056,7 +1056,7 @@ static int retrieve_entries(struct tree_context *c, struct tagcache_search *tcs, /* Show search progress straight away if the disk needs to spin up, otherwise show it after the normal 1/2 second delay */ show_search_progress( -#if !defined(HAVE_FLASH_STORAGE) +#ifdef HAVE_DISK_STORAGE ata_disk_is_active() #else true diff --git a/firmware/export/audio.h b/firmware/export/audio.h index b10d5863d7..aedaffbe89 100644 --- a/firmware/export/audio.h +++ b/firmware/export/audio.h @@ -92,7 +92,7 @@ struct mp3entry* audio_current_track(void); struct mp3entry* audio_next_track(void); bool audio_has_changed_track(void); void audio_get_debugdata(struct audio_debug *dbgdata); -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE void audio_set_buffer_margin(int seconds); #endif unsigned int audio_error(void); diff --git a/firmware/export/config-creativezv.h b/firmware/export/config-creativezv.h index b8850a3af6..0cb487ad6d 100644 --- a/firmware/export/config-creativezv.h +++ b/firmware/export/config-creativezv.h @@ -85,6 +85,10 @@ /* define this if you have a real-time clock */ //#define CONFIG_RTC RTC_RX5X348AB +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ //#define HAVE_BACKLIGHT diff --git a/firmware/export/config-creativezvm.h b/firmware/export/config-creativezvm.h index 4c1f4624b3..e4ccfc775f 100644 --- a/firmware/export/config-creativezvm.h +++ b/firmware/export/config-creativezvm.h @@ -85,6 +85,10 @@ /* define this if you have a real-time clock */ //#define CONFIG_RTC RTC_RX5X348AB +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ //#define HAVE_BACKLIGHT diff --git a/firmware/export/config-creativezvm60gb.h b/firmware/export/config-creativezvm60gb.h index 3f98059a28..bcf361690d 100644 --- a/firmware/export/config-creativezvm60gb.h +++ b/firmware/export/config-creativezvm60gb.h @@ -85,6 +85,10 @@ /* define this if you have a real-time clock */ //#define CONFIG_RTC RTC_RX5X348AB +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ //#define HAVE_BACKLIGHT diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index fd85e51b46..1908f6a29d 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -65,6 +65,10 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + #define CONFIG_I2C I2C_PLAYREC #define BATTERY_CAPACITY_DEFAULT 2200 /* default battery capacity */ diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h index 1f40339065..92813c6b00 100644 --- a/firmware/export/config-gigabeat-s.h +++ b/firmware/export/config-gigabeat-s.h @@ -56,6 +56,10 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h index 27bd51e3ab..c2ac7a9483 100644 --- a/firmware/export/config-gigabeat.h +++ b/firmware/export/config-gigabeat.h @@ -62,6 +62,10 @@ /* define this if you have a real-time clock */ #define CONFIG_RTC RTC_S3C2440 +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index d38a5df636..6f66555d7d 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h @@ -79,6 +79,10 @@ #define HAVE_RTC_ALARM #endif +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index f250c5f862..dcb0e6d9f0 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h @@ -66,6 +66,10 @@ #define CONFIG_LCD LCD_S1D15E06 +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h index 56a61c8be5..29f0e55b6b 100644 --- a/firmware/export/config-h10_5gb.h +++ b/firmware/export/config-h10_5gb.h @@ -83,6 +83,10 @@ #define CONFIG_TUNER TEA5767 #define CONFIG_TUNER_XTAL 32768 +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h index 9cea95eb6f..c75734f7b7 100644 --- a/firmware/export/config-h120.h +++ b/firmware/export/config-h120.h @@ -53,6 +53,10 @@ /* Define this if you do software codec */ #define CONFIG_CODEC SWCODEC +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this if you have an remote lcd */ #define HAVE_REMOTE_LCD diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h index 4aae255daa..134e90cd17 100644 --- a/firmware/export/config-h300.h +++ b/firmware/export/config-h300.h @@ -55,6 +55,10 @@ /* define this if you have a real-time clock */ #define CONFIG_RTC RTC_PCF50606 +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this if you have an remote lcd */ #define HAVE_REMOTE_LCD diff --git a/firmware/export/config-hdd1630.h b/firmware/export/config-hdd1630.h index 55ad5a1340..5a311993fe 100755 --- a/firmware/export/config-hdd1630.h +++ b/firmware/export/config-hdd1630.h @@ -101,6 +101,10 @@ /* #define CONFIG_TUNER TEA5767 */ /* #define CONFIG_TUNER_XTAL 32768 */ +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT /* #define HAVE_BACKLIGHT_BRIGHTNESS */ diff --git a/firmware/export/config-iaudiom3.h b/firmware/export/config-iaudiom3.h index b8dc52c91e..429e922529 100644 --- a/firmware/export/config-iaudiom3.h +++ b/firmware/export/config-iaudiom3.h @@ -71,6 +71,10 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF diff --git a/firmware/export/config-iaudiom5.h b/firmware/export/config-iaudiom5.h index a5b0f3d7bd..eb3b1216eb 100644 --- a/firmware/export/config-iaudiom5.h +++ b/firmware/export/config-iaudiom5.h @@ -78,6 +78,10 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h index c29d4242fe..be21006295 100644 --- a/firmware/export/config-iaudiox5.h +++ b/firmware/export/config-iaudiox5.h @@ -91,6 +91,10 @@ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF diff --git a/firmware/export/config-ipod1g2g.h b/firmware/export/config-ipod1g2g.h index 2d3dff1edc..5727e46616 100644 --- a/firmware/export/config-ipod1g2g.h +++ b/firmware/export/config-ipod1g2g.h @@ -78,6 +78,10 @@ /* Define this if you have the WM8731L audio codec */ #define HAVE_WM8721 +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* WM8721 has no tone controls, so we use the software ones */ #define HAVE_SW_TONE_CONTROLS diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h index d5b593388e..285043a77f 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h @@ -91,6 +91,10 @@ /* WM8731 has no tone controls, so we use the software ones */ #define HAVE_SW_TONE_CONTROLS +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h index c5c592dfca..dddda21e07 100644 --- a/firmware/export/config-ipod4g.h +++ b/firmware/export/config-ipod4g.h @@ -91,6 +91,10 @@ #define AB_REPEAT_ENABLE 1 #define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h index cda0857b19..f4db7d8b98 100644 --- a/firmware/export/config-ipodcolor.h +++ b/firmware/export/config-ipodcolor.h @@ -78,6 +78,10 @@ #define AB_REPEAT_ENABLE 1 #define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h index eadd3a6b1d..37fb083af4 100644 --- a/firmware/export/config-ipodmini.h +++ b/firmware/export/config-ipodmini.h @@ -93,6 +93,10 @@ #define AB_REPEAT_ENABLE 1 #define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h index 259cb2f874..a96e71dbc7 100644 --- a/firmware/export/config-ipodmini2g.h +++ b/firmware/export/config-ipodmini2g.h @@ -93,6 +93,10 @@ #define AB_REPEAT_ENABLE 1 #define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h index 4c56d74c72..9b322f2ffd 100644 --- a/firmware/export/config-ipodvideo.h +++ b/firmware/export/config-ipodvideo.h @@ -78,6 +78,10 @@ #define AB_REPEAT_ENABLE 1 #define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS diff --git a/firmware/export/config-mrobe100.h b/firmware/export/config-mrobe100.h index 6aaa2b005a..03011745eb 100644 --- a/firmware/export/config-mrobe100.h +++ b/firmware/export/config-mrobe100.h @@ -61,6 +61,10 @@ #define AB_REPEAT_ENABLE 1 +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h index b9b8ee65ab..3eab1209f4 100644 --- a/firmware/export/config-mrobe500.h +++ b/firmware/export/config-mrobe500.h @@ -96,6 +96,10 @@ /* define this if you have a real-time clock */ #define CONFIG_RTC RTC_RX5X348AB +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 186bd5a58d..a88e75e743 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h @@ -30,6 +30,10 @@ /* Define this if you have a DAC3550A */ #define HAVE_DAC3550A +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index b86e31630a..f6ddb88af6 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h @@ -53,6 +53,10 @@ /* Define this if you have a MAS3587F */ #define CONFIG_CODEC MAS3587F +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index fd00b78887..5d62ec464c 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -59,6 +59,10 @@ /* Define this if you have a MAS3587F */ #define CONFIG_CODEC MAS3587F +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/export/config-tpj1022.h b/firmware/export/config-tpj1022.h index 5307074aa1..6f23b86f06 100644 --- a/firmware/export/config-tpj1022.h +++ b/firmware/export/config-tpj1022.h @@ -67,6 +67,10 @@ #define AB_REPEAT_ENABLE 1 +/* define this if you have a disk storage, i.e. something + that needs spinups and can cause skips when shaked */ +#define HAVE_DISK_STORAGE + /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 530de6a372..2503ba11e0 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -535,7 +535,7 @@ static void recalculate_watermark(int bitrate) } } -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE void audio_set_buffer_margin(int seconds) { low_watermark_margin = seconds; diff --git a/firmware/usb.c b/firmware/usb.c index ae1fbeb8c0..ab4f0403b9 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -132,7 +132,7 @@ static void usb_slave_mode(bool on) static void try_reboot(void) { -#ifndef HAVE_FLASH_STORAGE +#ifdef HAVE_DISK_STORAGE ata_sleepnow(); /* Immediately spindown the disk. */ sleep(HZ*2); #endif -- cgit v1.2.3