1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Frank Gevaerts 2008-10-07 19:37:33 +00:00
parent 23b7e95770
commit 46573019a5
43 changed files with 142 additions and 26 deletions

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 */

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 */

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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