summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c1
-rw-r--r--apps/settings.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index f4274a8f02..c0558ed737 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -2781,6 +2781,7 @@ static void audio_fill_file_buffer(
2781 filling = false; 2781 filling = false;
2782 } 2782 }
2783 2783
2784 ata_sleep();
2784} 2785}
2785 2786
2786static void audio_rebuffer(void) 2787static void audio_rebuffer(void)
diff --git a/apps/settings.c b/apps/settings.c
index ec96cc760b..08e6376694 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -38,6 +38,7 @@
38#include "talk.h" 38#include "talk.h"
39#include "string.h" 39#include "string.h"
40#include "ata.h" 40#include "ata.h"
41#include "ata_idle_notify.h"
41#include "fat.h" 42#include "fat.h"
42#include "power.h" 43#include "power.h"
43#include "powermgmt.h" 44#include "powermgmt.h"
@@ -802,6 +803,11 @@ static void init_config_buffer( void )
802 config_block[3] = CONFIG_BLOCK_VERSION; 803 config_block[3] = CONFIG_BLOCK_VERSION;
803} 804}
804 805
806bool flush_config_block_callback(void)
807{
808 ata_write_sectors(IF_MV2(0,) config_sector, 1, config_block);
809 return true;
810}
805/* 811/*
806 * save the config block buffer to disk or RTC RAM 812 * save the config block buffer to disk or RTC RAM
807 */ 813 */
@@ -833,7 +839,7 @@ static int save_config_buffer( void )
833#endif 839#endif
834 840
835 if (config_sector != 0) 841 if (config_sector != 0)
836 ata_delayed_write( config_sector, config_block); 842 register_ata_idle_func(flush_config_block_callback);
837 else 843 else
838 return -1; 844 return -1;
839 845