Is it on mangOH Red hardware?
If yes then the embedded GPIO expander (SX1509) could be used to output PWM signals on selected pins through its LED driver feature.
Check datasheet of SX1509:
WP76xx by itself doesn’t have hardware PWM output.
If you just need to output clock signal (square waveform) at a selected frequency, it should be possible to do it in kernel by changing the function of a selected pin from GPIO to GP_CLK.
It is not an easy task and you will need to have some knowledge on Qualcomm MDM9x07 platform.
An example on Qualcomm APQ8016 chipset (you will have to adapt it for MDM9x07) is visible here:
Regarding the software approach (bit-banging on GPIO):
It should be feasible for low frequencies but for efficiency reasons (accuracy and CPU load) it is recommended to implement it on kernel side.
Another way to do it:
Regarding the PCM approach:
PCM_CLK is the bit clock (2.048MHz).
But it should be possible to use the frame synchronization signal (PCM_SYNC) which is 8kHz by default.
PCM_SYNC can be set also to 16kHz by using
le_audio_SetPcmSamplingRate() but it is not possible to set it to 4kHz (or any other values).