move some staks to external memory

This commit is contained in:
philippe44
2019-08-26 21:46:48 -07:00
parent df525bbb10
commit 7f97f621c4
12 changed files with 103 additions and 15 deletions

View File

@@ -116,6 +116,10 @@ static void *decode_thread() {
usleep(100000);
}
}
#if EMBEDDED
deregister_external();
#endif
return 0;
}

View File

@@ -284,3 +284,16 @@ void register_external(void) {
LOG_INFO("Initializing AirPlay sink");
#endif
}
void deregister_external(void) {
#ifdef CONFIG_BT_SINK
if (!strcasestr(output.device, "BT ")) {
bt_sink_deinit();
LOG_INFO("Stopping BT sink");
}
#endif
#ifdef CONFIG_AIRPLAY_SINK
raop_sink_deinit();
LOG_INFO("Stopping AirPlay sink");
#endif
}

View File

@@ -36,9 +36,13 @@ typedef unsigned long long u64_t;
#define gettime_ms _gettime_ms_
#define mutex_create_p(m) mutex_create(m)
uint32_t _gettime_ms_(void);
int pthread_create_name(pthread_t *thread, _CONST pthread_attr_t *attr,
uint32_t _gettime_ms_(void);
int pthread_create_name(pthread_t *thread, _CONST pthread_attr_t *attr,
void *(*start_routine)( void * ), void *arg, char *name);
void register_external(void);
// these are here as they can be #define to nothing
void register_external(void);
void deregister_external(void);
#endif // EMBEDDED_H

View File

@@ -631,7 +631,6 @@ static void slimproto_run() {
#endif
last = now;
LOCK_S;
status.stream_full = _buf_used(streambuf);
status.stream_size = streambuf->size;