My Qt ( C++ ) application successfully dims the screen using the pigpio library on my Raspberry Pi compute module. It works great and is very stable using the code below. The problem, is that my previously working ALSA code that successfully played audio from the Pi is no longer working. I've read that this has to do with the pigpio library using DMA to achieve stable PWM timing.. Is there any way to have my cake and eat it too? Can I have ALSA work with PIGPIO's PWM? Thanks.
while (!gpioInitialise()) {
/// do something
}
gpioPWM(SCREEN_PWM_BRIGHTNESS_PIN, 0);
gpioSetPWMfrequency(SCREEN_PWM_BRIGHTNESS_PIN, 200);
// Set the screen brightness to the new value
qDebug() << "Setting Screen Brightness to: " << config.cabScreenBrightness();
gpioPWM(SCREEN_PWM_BRIGHTNESS_PIN, (255 * config.cabScreenBrightness() / 100));