diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2006-11-08 01:55:26 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2006-11-08 01:55:26 +0000 |
| commit | f184152c0501a80e95ad871927d766fdee50281b (patch) | |
| tree | ecfa4b6cdf24065b32467d6d7274a2659c3ec9b0 /apps | |
| parent | 5dd07759248fec1407f6b3d4d1fb177554e45a13 (diff) | |
| download | rockbox-f184152c0501a80e95ad871927d766fdee50281b.zip rockbox-f184152c0501a80e95ad871927d766fdee50281b.tar.gz rockbox-f184152c0501a80e95ad871927d766fdee50281b.tar.bz2 rockbox-f184152c0501a80e95ad871927d766fdee50281b.tar.xz | |
* changes to ata.c - idle callbacks are called after 2 sec of real idle,
and shutdown and usb (it makes sense here). ata_sleep doesnt get broken
by callbacks.
* allow ata_sleep() at the end of buffering again
* config block uses ata_idle instead of delayed sector when saving
* remove delayed sector code from ata_mmc.c (idle callbacks are not yet
implemented for ata_mmc.c tho)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11461 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playback.c | 1 | ||||
| -rw-r--r-- | apps/settings.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c index f4274a8..c0558ed 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2781,6 +2781,7 @@ static void audio_fill_file_buffer( filling = false; } + ata_sleep(); } static void audio_rebuffer(void) diff --git a/apps/settings.c b/apps/settings.c index ec96cc7..08e6376 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -38,6 +38,7 @@ #include "talk.h" #include "string.h" #include "ata.h" +#include "ata_idle_notify.h" #include "fat.h" #include "power.h" #include "powermgmt.h" @@ -802,6 +803,11 @@ static void init_config_buffer( void ) config_block[3] = CONFIG_BLOCK_VERSION; } +bool flush_config_block_callback(void) +{ + ata_write_sectors(IF_MV2(0,) config_sector, 1, config_block); + return true; +} /* * save the config block buffer to disk or RTC RAM */ @@ -833,7 +839,7 @@ static int save_config_buffer( void ) #endif if (config_sector != 0) - ata_delayed_write( config_sector, config_block); + register_ata_idle_func(flush_config_block_callback); else return -1; |