diff --git a/openrtx/src/rtx/OpMode_M17.cpp b/openrtx/src/rtx/OpMode_M17.cpp index 6a52c840..ad001abd 100644 --- a/openrtx/src/rtx/OpMode_M17.cpp +++ b/openrtx/src/rtx/OpMode_M17.cpp @@ -237,6 +237,12 @@ void OpMode_M17::startCodec() pthread_attr_t codecAttr; pthread_attr_init(&codecAttr); pthread_attr_setstacksize(&codecAttr, 16384); + #ifdef _MIOSIX + // Set priority of CODEC2 thread to the maximum one, the same of RTX thread. + struct sched_param param; + param.sched_priority = sched_get_priority_max(0); + pthread_attr_setschedparam(&codecAttr, ¶m); + #endif pthread_create(&codecThread, &codecAttr, threadFunc, NULL); }