Using pi4j and wiring pi configuring hardware pwm pins for driving servo motors. Also using freetts (speech to text) library for speech. My speaker is actually connected to amplifier to 3.5 mm jack (configured as mono).
I need both servo and audio work. Individually they both work fine. But I have a strange issue of whenever pwm output for pin is provisioned by my code, audio hangs forever thereafter.
Even omxplayer is hanging and need ctrl+c to terminate. Only reboot solves the problem.
I tried different options like choosing one of 4 pwm pins, connecting a bluetooth speaker instead of 3.5 jack, resetting the pin mode to (input or output) once servo moved.
I never tried hdmi audio and that is not an option for me right now.
Please help me how to resolve this. I am still learning so any pointers are great. Thanks!!