change priorities and force spdif_convert in IRAM

This commit is contained in:
Philippe G
2022-01-11 14:44:06 -08:00
parent 8fa3906b52
commit 04919f7b6e
7 changed files with 8 additions and 9 deletions

View File

@@ -193,7 +193,7 @@ struct cspot_s* cspot_create(const char *name, cspot_cmd_cb_t cmd_cb, cspot_data
cspot.cHandler = cmd_cb;
cspot.dHandler = data_cb;
strncpy(cspot.name, name, sizeof(cspot.name) - 1);
cspot.TaskHandle = xTaskCreateStatic(&cspotTask, "cspot", CSPOT_STACK_SIZE, NULL, CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT, xStack, &xTaskBuffer);
cspot.TaskHandle = xTaskCreateStatic(&cspotTask, "cspot", CSPOT_STACK_SIZE, NULL, CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT - 2, xStack, &xTaskBuffer);
return &cspot;
}

View File

@@ -29,7 +29,7 @@ namespace bell
#ifdef ESP_PLATFORM
this->xStack = NULL;
this->priority = CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT + priority;
if (this->priority < 0) this->priority = ESP_TASK_PRIO_MIN;
if (this->priority <= ESP_TASK_PRIO_MIN) this->priority = ESP_TASK_PRIO_MIN + 1;
if (runOnPSRAM) {
this->xStack = (StackType_t*) heap_caps_malloc(this->stackSize, MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
}

View File

@@ -3,7 +3,7 @@
#include "Logger.h"
AudioChunkManager::AudioChunkManager()
: bell::Task("AudioChunkManager", 4 * 1024, 2, 0) {
: bell::Task("AudioChunkManager", 4 * 1024, -1, 0) {
this->chunks = std::vector<std::shared_ptr<AudioChunk>>();
startTask();
}

View File

@@ -9,7 +9,7 @@ std::map<MercuryType, std::string> MercuryTypeMap({
{MercuryType::UNSUB, "UNSUB"},
});
MercuryManager::MercuryManager(std::unique_ptr<Session> session): bell::Task("mercuryManager", 6 * 1024, 2, 1)
MercuryManager::MercuryManager(std::unique_ptr<Session> session): bell::Task("mercuryManager", 6 * 1024, -2, 1)
{
tempMercuryHeader = {};
this->timeProvider = std::make_shared<TimeProvider>();

View File

@@ -3,7 +3,7 @@
// #include <valgrind/memcheck.h>
Player::Player(std::shared_ptr<MercuryManager> manager, std::shared_ptr<AudioSink> audioSink): bell::Task("player", 10 * 1024, +0, 1)
Player::Player(std::shared_ptr<MercuryManager> manager, std::shared_ptr<AudioSink> audioSink): bell::Task("player", 10 * 1024, -2, 1)
{
this->audioSink = audioSink;
this->manager = manager;