I reported an issue and submitted a patch that was accepted a few years ago regarding chan mobile. I cannot find the patch, but I remember that all it did was increase the wait time for SCO packets from 1ms to 10ms.
As I run asterisk on embedded hardware that 1ms busy wait seems to have been re-introduced on a version that I am currently working on.
What is the reason that this needs to be 1ms
/* handle audio data */
if (ast_io_wait(adapter->io, 1) == -1) {
ast_log(LOG_ERROR, “ast_io_wait() failed for audio on adapter %s\n”, adapter->id);
break;
}
}
I haven’t had a look at the wait method, but does this really need to poll every ms or is that just used to check if asterisk is exiting?
On embedded hardware running on ARMv7 this seems to chew up about 50% of CPU. And if you add another call or some network traffic half the audio is lost. Would increasing that wait to 10ms cause an issue apart from a possible 9ms delay in shutting down?