From 53798f4a6191b9606ebf8a1dec1b447455081a66 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 10 Jul 2024 15:17:19 +1000 Subject: Move audio decoder priorities below bluetooth The previous priority was leading to a nasty consistent stutter, as reading samples from the drain suffer would lead to the decoder immediately unblocking and preempting the SBC encoding. --- src/tasks/tasks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tasks/tasks.cpp') diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index d3937c68..b713d70b 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -83,11 +83,11 @@ auto Priority() -> UBaseType_t; // highest priority. template <> auto Priority() -> UBaseType_t { - return configMAX_PRIORITIES - 1; + return 15; } template <> auto Priority() -> UBaseType_t { - return configMAX_PRIORITIES - 1; + return 15; } // After audio issues, UI jank is the most noticeable kind of scheduling-induced // slowness that the user is likely to notice or care about. Therefore we place -- cgit v1.2.3 From 5d390c821a7fdddec5eb24a7a3a08bf8bf4be1cc Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 9 Aug 2024 13:11:34 +1000 Subject: Claw back some internal ram - 'main' doesn't need 12k of internal ram - lvgl's draw task doesn't need that much either - also lower the bg worker stack sizes whilst we're here, since they've got tons over headroom --- src/tasks/tasks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tasks/tasks.cpp') diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index b713d70b..9980c97e 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -64,7 +64,7 @@ auto AllocateStack() -> std::span { // an eye-wateringly large amount of stack. template <> auto AllocateStack() -> std::span { - std::size_t size = 64 * 1024; + std::size_t size = 32 * 1024; return {static_cast(heap_caps_malloc(size, MALLOC_CAP_SPIRAM)), size}; } -- cgit v1.2.3 From 4fd15f148a86a748f92ce60fa3c6255700f41057 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 12 Aug 2024 15:09:07 +1000 Subject: Bump up the ui task stack size --- src/tasks/tasks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tasks/tasks.cpp') diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index 9980c97e..f0b567f2 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -47,7 +47,7 @@ auto AllocateStack() -> std::span { // separately. template <> auto AllocateStack() -> std::span { - constexpr std::size_t size = 14 * 1024; + constexpr std::size_t size = 20 * 1024; static StackType_t sStack[size]; return {sStack, size}; } -- cgit v1.2.3