|
|
@ -22,10 +22,6 @@ auto Name<Type::kAudio>() -> std::string { |
|
|
|
return "AUDIO"; |
|
|
|
return "AUDIO"; |
|
|
|
} |
|
|
|
} |
|
|
|
template <> |
|
|
|
template <> |
|
|
|
auto Name<Type::kAudioDrain>() -> std::string { |
|
|
|
|
|
|
|
return "DRAIN"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
template <> |
|
|
|
|
|
|
|
auto Name<Type::kDatabase>() -> std::string { |
|
|
|
auto Name<Type::kDatabase>() -> std::string { |
|
|
|
return "DB"; |
|
|
|
return "DB"; |
|
|
|
} |
|
|
|
} |
|
|
@ -41,12 +37,6 @@ auto AllocateStack<Type::kAudio>() -> cpp::span<StackType_t> { |
|
|
|
return {static_cast<StackType_t*>(heap_caps_malloc(size, MALLOC_CAP_DEFAULT)), |
|
|
|
return {static_cast<StackType_t*>(heap_caps_malloc(size, MALLOC_CAP_DEFAULT)), |
|
|
|
size}; |
|
|
|
size}; |
|
|
|
} |
|
|
|
} |
|
|
|
template <> |
|
|
|
|
|
|
|
auto AllocateStack<Type::kAudioDrain>() -> cpp::span<StackType_t> { |
|
|
|
|
|
|
|
std::size_t size = 1024; |
|
|
|
|
|
|
|
return {static_cast<StackType_t*>(heap_caps_malloc(size, MALLOC_CAP_DEFAULT)), |
|
|
|
|
|
|
|
size}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// LVGL requires only a relatively small stack. However, it can be allocated in
|
|
|
|
// LVGL requires only a relatively small stack. However, it can be allocated in
|
|
|
|
// PSRAM so we give it a bit of headroom for safety.
|
|
|
|
// PSRAM so we give it a bit of headroom for safety.
|
|
|
|
template <> |
|
|
|
template <> |
|
|
@ -88,10 +78,6 @@ template <> |
|
|
|
auto Priority<Type::kAudio>() -> UBaseType_t { |
|
|
|
auto Priority<Type::kAudio>() -> UBaseType_t { |
|
|
|
return 10; |
|
|
|
return 10; |
|
|
|
} |
|
|
|
} |
|
|
|
template <> |
|
|
|
|
|
|
|
auto Priority<Type::kAudioDrain>() -> UBaseType_t { |
|
|
|
|
|
|
|
return 10; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// After audio issues, UI jank is the most noticeable kind of scheduling-induced
|
|
|
|
// 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
|
|
|
|
// slowness that the user is likely to notice or care about. Therefore we place
|
|
|
|
// this task directly below audio in terms of priority.
|
|
|
|
// this task directly below audio in terms of priority.
|
|
|
|