PYNQ: PYTHON PRODUCTIVITY

PDM to PCM audio conversion

Hi everyone,
I am currently following the thread on this git repo: https://github.com/wady101/PYNQ_Z2-Audio/issues/1 . In this repo there is a modified version of Pynq where I can get directly the audio stream, but I have found that is encoded as PDM, whereas I need PCM encoding. Is there a way to have a conversion to PCM? I have tried to use a lowpass filter but is not working, so I am trying to implement manually a sinc3 filter but it seems not working. Here is the code:

def process(self):

    k = 0
    for i in range(0, len(self._input_signal)):
        
        if self._input_signal[i] == 1:
            self._acc1 = self._acc1 + 1
        self._acc2 = self._acc2 + self._acc1
        self._acc3 = self._acc3 + self._acc2
        
        if i == (self._decimation_factor-1)*(k+1):
            self._diff1 = self._acc3 - self._acc3_d2
            self._diff2 = self._diff1 - self._diff1_d
            self._diff3 = self._diff2 - self._diff2_d
            self._acc3_d2 = self._acc3
            self._diff1_d = self._diff1
            self._diff2_d = self._diff2
            self._data[k] = self._diff3
            k = k + 1

    return self._data 

Do you have any suggestions?

Thanks in advance,

Guglielmo