diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugin.c | 2 | ||||
-rw-r--r-- | apps/plugin.h | 6 | ||||
-rw-r--r-- | apps/plugins/clock/clock_settings.c | 2 | ||||
-rw-r--r-- | apps/plugins/jpeg/jpeg.c | 2 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/disk_buf.c | 6 | ||||
-rw-r--r-- | apps/plugins/video.c | 2 | ||||
-rw-r--r-- | apps/plugins/wavplay.c | 2 |
7 files changed, 2 insertions, 20 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 4b7eb28b3d..84200bbf05 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -284,11 +284,9 @@ static const struct plugin_api rockbox_api = { | |||
284 | fdprintf, | 284 | fdprintf, |
285 | read_line, | 285 | read_line, |
286 | settings_parseline, | 286 | settings_parseline, |
287 | #ifdef HAVE_DISK_STORAGE | ||
288 | storage_sleep, | 287 | storage_sleep, |
289 | storage_spin, | 288 | storage_spin, |
290 | storage_spindown, | 289 | storage_spindown, |
291 | #endif | ||
292 | #if USING_STORAGE_CALLBACK | 290 | #if USING_STORAGE_CALLBACK |
293 | register_storage_idle_func, | 291 | register_storage_idle_func, |
294 | unregister_storage_idle_func, | 292 | unregister_storage_idle_func, |
diff --git a/apps/plugin.h b/apps/plugin.h index ebb2518c78..a946f42a14 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -129,12 +129,12 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
129 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 129 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
130 | 130 | ||
131 | /* increase this every time the api struct changes */ | 131 | /* increase this every time the api struct changes */ |
132 | #define PLUGIN_API_VERSION 163 | 132 | #define PLUGIN_API_VERSION 164 |
133 | 133 | ||
134 | /* update this to latest version if a change to the api struct breaks | 134 | /* update this to latest version if a change to the api struct breaks |
135 | backwards compatibility (and please take the opportunity to sort in any | 135 | backwards compatibility (and please take the opportunity to sort in any |
136 | new function which are "waiting" at the end of the function table) */ | 136 | new function which are "waiting" at the end of the function table) */ |
137 | #define PLUGIN_MIN_API_VERSION 163 | 137 | #define PLUGIN_MIN_API_VERSION 164 |
138 | 138 | ||
139 | /* plugin return codes */ | 139 | /* plugin return codes */ |
140 | enum plugin_status { | 140 | enum plugin_status { |
@@ -395,11 +395,9 @@ struct plugin_api { | |||
395 | int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); | 395 | int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); |
396 | int (*read_line)(int fd, char* buffer, int buffer_size); | 396 | int (*read_line)(int fd, char* buffer, int buffer_size); |
397 | bool (*settings_parseline)(char* line, char** name, char** value); | 397 | bool (*settings_parseline)(char* line, char** name, char** value); |
398 | #ifdef HAVE_DISK_STORAGE | ||
399 | void (*storage_sleep)(void); | 398 | void (*storage_sleep)(void); |
400 | void (*storage_spin)(void); | 399 | void (*storage_spin)(void); |
401 | void (*storage_spindown)(int seconds); | 400 | void (*storage_spindown)(int seconds); |
402 | #endif | ||
403 | #if USING_STORAGE_CALLBACK | 401 | #if USING_STORAGE_CALLBACK |
404 | void (*register_storage_idle_func)(storage_idle_notify function); | 402 | void (*register_storage_idle_func)(storage_idle_notify function); |
405 | void (*unregister_storage_idle_func)(storage_idle_notify function, bool run); | 403 | void (*unregister_storage_idle_func)(storage_idle_notify function, bool run); |
diff --git a/apps/plugins/clock/clock_settings.c b/apps/plugins/clock/clock_settings.c index ef3114a943..d765cbb0da 100644 --- a/apps/plugins/clock/clock_settings.c +++ b/apps/plugins/clock/clock_settings.c | |||
@@ -173,9 +173,7 @@ void load_settings(void){ | |||
173 | draw_message(display, MESSAGE_ERRLOAD, 1); | 173 | draw_message(display, MESSAGE_ERRLOAD, 1); |
174 | display->update(); | 174 | display->update(); |
175 | } | 175 | } |
176 | #ifdef HAVE_DISK_STORAGE | ||
177 | rb->storage_sleep(); | 176 | rb->storage_sleep(); |
178 | #endif | ||
179 | rb->sleep(HZ); | 177 | rb->sleep(HZ); |
180 | } | 178 | } |
181 | 179 | ||
diff --git a/apps/plugins/jpeg/jpeg.c b/apps/plugins/jpeg/jpeg.c index 685122bb1a..fc98834a7d 100644 --- a/apps/plugins/jpeg/jpeg.c +++ b/apps/plugins/jpeg/jpeg.c | |||
@@ -1038,9 +1038,7 @@ int load_and_show(char* filename) | |||
1038 | else if(immediate_ata_off) | 1038 | else if(immediate_ata_off) |
1039 | { | 1039 | { |
1040 | /* running slideshow and time is long enough: power down disk */ | 1040 | /* running slideshow and time is long enough: power down disk */ |
1041 | #ifdef HAVE_DISK_STORAGE | ||
1042 | rb->storage_sleep(); | 1041 | rb->storage_sleep(); |
1043 | #endif | ||
1044 | } | 1042 | } |
1045 | #endif | 1043 | #endif |
1046 | 1044 | ||
diff --git a/apps/plugins/mpegplayer/disk_buf.c b/apps/plugins/mpegplayer/disk_buf.c index 4328606a1e..defd8ef81d 100644 --- a/apps/plugins/mpegplayer/disk_buf.c +++ b/apps/plugins/mpegplayer/disk_buf.c | |||
@@ -172,9 +172,7 @@ static inline void disk_buf_buffer(void) | |||
172 | if (!stream_get_window(&sw)) | 172 | if (!stream_get_window(&sw)) |
173 | { | 173 | { |
174 | disk_buf.state = TSTATE_DATA; | 174 | disk_buf.state = TSTATE_DATA; |
175 | #ifdef HAVE_DISK_STORAGE | ||
176 | rb->storage_sleep(); | 175 | rb->storage_sleep(); |
177 | #endif | ||
178 | break; | 176 | break; |
179 | } | 177 | } |
180 | 178 | ||
@@ -189,9 +187,7 @@ static inline void disk_buf_buffer(void) | |||
189 | /* Free space is less than one page */ | 187 | /* Free space is less than one page */ |
190 | disk_buf.state = TSTATE_DATA; | 188 | disk_buf.state = TSTATE_DATA; |
191 | disk_buf.low_wm = DISK_BUF_LOW_WATERMARK; | 189 | disk_buf.low_wm = DISK_BUF_LOW_WATERMARK; |
192 | #ifdef HAVE_DISK_STORAGE | ||
193 | rb->storage_sleep(); | 190 | rb->storage_sleep(); |
194 | #endif | ||
195 | break; | 191 | break; |
196 | } | 192 | } |
197 | 193 | ||
@@ -213,9 +209,7 @@ static inline void disk_buf_buffer(void) | |||
213 | { | 209 | { |
214 | /* Error or end of stream */ | 210 | /* Error or end of stream */ |
215 | disk_buf.state = TSTATE_EOS; | 211 | disk_buf.state = TSTATE_EOS; |
216 | #ifdef HAVE_DISK_STORAGE | ||
217 | rb->storage_sleep(); | 212 | rb->storage_sleep(); |
218 | #endif | ||
219 | break; | 213 | break; |
220 | } | 214 | } |
221 | 215 | ||
diff --git a/apps/plugins/video.c b/apps/plugins/video.c index 8ead0a72f3..6b0a47c7c6 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c | |||
@@ -681,9 +681,7 @@ int PlayTick(int fd) | |||
681 | #endif | 681 | #endif |
682 | ) | 682 | ) |
683 | { | 683 | { |
684 | #ifdef HAVE_DISK_STORAGE | ||
685 | rb->storage_sleep(); /* no point in leaving the disk run til timeout */ | 684 | rb->storage_sleep(); /* no point in leaving the disk run til timeout */ |
686 | #endif | ||
687 | gPlay.bDiskSleep = true; | 685 | gPlay.bDiskSleep = true; |
688 | } | 686 | } |
689 | 687 | ||
diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c index 9cb784b54d..368d8e3475 100644 --- a/apps/plugins/wavplay.c +++ b/apps/plugins/wavplay.c | |||
@@ -3596,9 +3596,7 @@ int play_file(char* filename) | |||
3596 | if (free_space <= 0) | 3596 | if (free_space <= 0) |
3597 | { | 3597 | { |
3598 | filling = false; | 3598 | filling = false; |
3599 | #ifdef HAVE_DISK_STORAGE | ||
3600 | rb->storage_sleep(); | 3599 | rb->storage_sleep(); |
3601 | #endif | ||
3602 | } | 3600 | } |
3603 | else | 3601 | else |
3604 | { | 3602 | { |