stack & internal memory optimization

will need to move pthread stack to external memory at some point ...
This commit is contained in:
philippe44
2019-08-20 23:04:41 -07:00
parent f547a52c1e
commit 217dd8e5f0
6 changed files with 14 additions and 10 deletions

View File

@@ -18,6 +18,10 @@
#include "trace.h"
#ifndef CONFIG_AIRPLAY_NAME
#define CONFIG_AIRPLAY_NAME "disabled"
#endif
static const char * TAG = "platform";
extern char current_namespace[];

View File

@@ -19,10 +19,10 @@
#define PTHREAD_STACK_MIN 256
#endif
#define STREAM_THREAD_STACK_SIZE 8 * 1024
#define DECODE_THREAD_STACK_SIZE 20 * 1024
#define OUTPUT_THREAD_STACK_SIZE 8 * 1024
#define IR_THREAD_STACK_SIZE 8 * 1024
#define STREAM_THREAD_STACK_SIZE 6 * 1024
#define DECODE_THREAD_STACK_SIZE 16 * 1024
#define OUTPUT_THREAD_STACK_SIZE 6 * 1024
#define IR_THREAD_STACK_SIZE 6 * 1024
//#define BASE_CAP "Model=squeezelite,AccuratePlayPoints=0,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION

View File

@@ -139,7 +139,7 @@ static decode_state opus_decompress(void) {
info = OP(u, head, u->of, -1);
LOCK_O;
output.next_sample_rate = 48000;
output.next_sample_rate = decode_newstream(48000, output.supported_rates);
IF_DSD( output.next_fmt = PCM; )
output.track_start = outputbuf->writep;
if (output.fade_mode) _checkfade(true);

View File

@@ -86,7 +86,7 @@ typedef enum { DAC_ON = 0, DAC_OFF, DAC_POWERDOWN, DAC_VOLUME } dac_cmd_e;
// must have an integer ratio with FRAME_BLOCK
#define DMA_BUF_LEN 512
#define DMA_BUF_COUNT 16
#define DMA_BUF_COUNT 12
#define DECLARE_ALL_MIN_MAX \
DECLARE_MIN_MAX(o); \

View File

@@ -17,7 +17,7 @@
#include "nvs_flash.h"
//extern char current_namespace[];
static const char * TAG = "squeezelite_cmd";
#define SQUEEZELITE_THREAD_STACK_SIZE 8192
#define SQUEEZELITE_THREAD_STACK_SIZE (6*1024)
extern int main(int argc, char **argv);
static int launchsqueezelite(int argc, char **argv);
pthread_t thread_squeezelite;

View File

@@ -146,7 +146,7 @@ void process_autoexec(){
ESP_LOGD(TAG,"No matching command found for name autoexec. Adding default entries");
uint8_t autoexec_dft=0;
char autoexec1_dft[64];
char autoexec2_dft[]="squeezelite -o \"I2S\" -b 500:2000 -d all=info -M esp32";
char autoexec2_dft[256]="squeezelite -o \"I2S\" -b 500:2000 -d all=info -M esp32";
snprintf(autoexec1_dft, 64, "join %s %s", CONFIG_WIFI_SSID, CONFIG_WIFI_PASSWORD);
store_nvs_value(NVS_TYPE_U8,"autoexec",&autoexec_dft);
store_nvs_value(NVS_TYPE_STR,"autoexec1",autoexec1_dft);