[Sound-open-firmware] [PATCH 1/4] [RFC]DMIC: Add PDM microphones (DMIC) support to DAI

Seppo Ingalsuo seppo.ingalsuo at linux.intel.com
Wed May 2 17:27:38 CEST 2018



On 02.05.2018 16:43, Pierre-Louis Bossart wrote:
>>>> +    /* Calculate CIC shift from the decimation factor specific gain.
>>>> +     */
>>>> +    mcic = cfg->mcic;
>>>> +    g_cic = mcic * mcic * mcic * mcic * mcic;
>>>
>>> yikes, what is this mcic^5 ?
>>
>> Yep, it's the gain for +1 / -1 PDM bits in CIC decimator part. It's 
>> needed to set the scaling HW shifter. It also gives some idea of 
>> oversampling ratios to use for a microphone to get some # of bits of 
>> resolution as PCM code.
>
> I meant: where does this ^5 come from? First time i see this sort of 
> formula in filter design.

I see now -- There's a 5th order integrator-comb filter as 1st 
decimation filter stage for the PDM bits. Wikipedia has nowadays 
everything:

https://en.wikipedia.org/wiki/Cascaded_integrator%E2%80%93comb_filter

The high DC gain is caused by the integration part. The 1st equation 
with the Sigma statement shows the transfer function. By setting R=mcic, 
N=5, omega = 0 the same DC gain formula that I used is achieved.

Cheers,
Seppo



More information about the Sound-open-firmware mailing list