Bug #1636
SIGXCPU when running a project with analogue disabled
Status: | Closed | Start date: | 2016-02-27 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - |
Description
Run any simple project with analogue disabled (use flag -N0) and no audio is heard, the program crashes with SIGXCPU (CPU time limit exceeded). This is happening because the PRU's COMM_BUFFER_FRAMES value gets set to context.analogFrames in PRU.cpp, which is set to 0 when analogue is disabled. As a result the PRU can never break out of its write loop, and never reaches WRITE_LOOP_DONE. This causes the C++ program to hang until it is killed by Xenomai.
Overriding the setting of COMM_BUFFER_FRAMES in PRU.cpp and forcing it to the default value of 8 causes the audio to work for approximately 4 seconds, but the program still dies with SIGXCPU, so there must be another problem somewhere in the PRU code when analogue is disabled.
History
#1 Updated by Giulio Moro over 8 years ago
Issue first appears in commit 52
Commits 47-51 are not working for me at the moment (they use interrupts)
Commits up to 46 (inclusive) do not show this bug. Note that up to commit 46, numAudioFrames is erroneously set to 0 if the analog channels are disabled, so for instance in order to run commit 46 with matrix disabled you need to
-- select project basic
-- in render.cpp replace
for(int n = 0; n < numAudioFrames; n++) {
with
for(int n = 0; n < 16; n++) {
-- run with -m0
Also note that there is no change in the PRU code between rev 46 and 52.
#2 Updated by Giulio Moro over 8 years ago
- Status changed from New to Closed