I tried updating the clock source between PWM and PCM, but the issue still persists.
Also tried changing up the different channels for DMA primary and secondary channels, also have the same issue.
One condition that worked sometimes is that raspivid does not trigger the software PWMs, but what ends up happening is when I try to exit out of my code and call gpioTerminate(), the program never returns, i.e. it's stuck and does not even respond to a Ctrl+C. When I rerun gpioInitialize(), it turns up with the error
, so I have to power cycle the pi, and then the raspivid will interfere with PWM again. Any idea what's causing this loop above to hang?