NVS Refactor ** Factory+Squeezelite FLASH required for this branch!

This is a major refactoring of the nvs parameters storage. To support
this, a new partition was added. To start using this branch, one must
flash all binaries and possibly re-configure the system.
This commit is contained in:
Sebastien
2019-10-03 14:15:59 -04:00
parent 725636e0c4
commit b6f1ce9a7a
22 changed files with 168 additions and 196 deletions

View File

@@ -269,29 +269,27 @@ void raop_sink_cmd_handler(raop_event_t event, void *param)
* We provide the generic codec register option
*/
void register_external(void) {
#ifdef CONFIG_BT_SINK
if (!strcasestr(output.device, "BT ")) {
bt_sink_init(bt_sink_cmd_handler, sink_data_handler);
LOG_INFO("Initializing BT sink");
if (!strcasestr(output.device, "BT ") ) {
if(enable_bt_sink){
bt_sink_init(bt_sink_cmd_handler, sink_data_handler);
LOG_INFO("Initializing BT sink");
}
} else {
LOG_WARN("Cannot be a BT sink and source");
}
#endif
#ifdef CONFIG_AIRPLAY_SINK
raop_sink_init(raop_sink_cmd_handler, raop_sink_data_handler);
LOG_INFO("Initializing AirPlay sink");
#endif
if(enable_airplay){
raop_sink_init(raop_sink_cmd_handler, raop_sink_data_handler);
LOG_INFO("Initializing AirPlay sink");
}
}
void deregister_external(void) {
#ifdef CONFIG_BT_SINK
if (!strcasestr(output.device, "BT ")) {
if (!strcasestr(output.device, "BT ") && enable_bt_sink) {
bt_sink_deinit();
LOG_INFO("Stopping BT sink");
}
#endif
#ifdef CONFIG_AIRPLAY_SINK
raop_sink_deinit();
LOG_INFO("Stopping AirPlay sink");
#endif
if(enable_airplay){
raop_sink_deinit();
LOG_INFO("Stopping AirPlay sink");
}
}