]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: mchp-pdmc: fix poc noises when starting
authorMark Brown <broonie@kernel.org>
Tue, 28 Feb 2023 17:59:15 +0000 (17:59 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 28 Feb 2023 17:59:15 +0000 (17:59 +0000)
commit11d4e474861aa3443e52251660e5928103380715
treed9b2ada8db786a9a91123db6bdae143af262b564
parentb201929904a5907fa2d533b80fecd5666a239570
parentc5682e2ba1327d08987a7cabc7b5b40bf3bc131f
ASoC: mchp-pdmc: fix poc noises when starting

Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>:

To start capture on Microchip PDMC the enable bits for each supported
microphone need to be set. After this bit is set the PDMC starts to
receive data from microphones and it considers this data as valid data.
Thus if microphones are not ready the PDMC captures anyway data from its
lines. This data is interpreted by the human ear as poc noises.

To avoid this the following software workaround need to be applied when
starting capture:
1/ enable PDMC channel
2/ wait 150ms
3/ execute 16 dummy reads from RHR
4/ clear interrupts
5/ enable interrupts
6/ enable DMA channel

For this workaround to work step 6 need to be executed at the end.
For step 6 was added patch 1/3 from this series. With this, component
DAI driver sets its struct snd_soc_component_driver::start_dma_last = 1
and proper action is taken based on this flag when starting DAI trigger
vs DMA.