summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_micfil.h
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Merge up fixesMark Brown2023-08-101-1/+1
|\ | | | | | | For the benefit of CI
| * ASoC: fsl: micfil: Use dual license micfil codeDaniel Baluta2023-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need this in order to easily reuse register definitions and some functions with Sound Open Firmware driver. According to Documentation/process/license-rules.rst: "Dual BSD/GPL" The module is dual licensed under a GPL v2 variant or BSD license choice. The exact variant of the BSD license can only be determined via the license information in the corresponding source files. so use "Dual BSD/GPL" for license string. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20230803072638.640789-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: fsl_micfil: Add fsl_micfil_use_verid functionChancel Liu2023-08-021-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | fsl_micfil_use_verid() can help to parse the version info in VERID and PARAM registers. Since the two registers are added only on i.MX93 platform, a member flag called use_verid is introduced to soc data structure which indicates acquiring MICFIL version. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20230802052117.1293029-3-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: fsl_micfil: Add new registers and new bit definitionChancel Liu2023-08-021-0/+28
|/ | | | | | | | | | MICFIL IP is upgraded on i.MX93 platform. These new registers and new bit definition are added to complete the register list. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20230802052117.1293029-2-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fsl_micfil: Add Hardware Voice Activity Detector supportShengjiu Wang2022-10-171-1/+5
| | | | | | | | | | | | | | | | | | The Hardware Voice Activity Detector (HWVAD) is a block responsible for detect voice activity in a channel selected by the user. It can be configured in Envelope-based or Energy-based mode. There are additional two interrupts for HWVAD, one is event interrupt, another is error interrupt. Enable hwvad in parallel with recording. when voice activity detected, HWVAD will be disabled and alsa control notification is triggerred. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1663925494-9941-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fsl_micfil: change micfil default settingsShengjiu Wang2022-06-291-0/+9
| | | | | | | | | | | | | | Previous default settings resulted in loose dynamic range and low sound level. New default configuration changes: - outgain = 2 - quality mode = VLOW0 - dc remover = bypass Signed-off-by: Irina Patru <ioana-irina.patru@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1656405589-29850-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fsl_micfil: fix the naming style for mask definitionShengjiu Wang2022-05-051-4/+4
| | | | | | | | | | Remove the _SHIFT for the mask definition. Fixes: 17f2142bae4b ("ASoC: fsl_micfil: use GENMASK to define register bit fields") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/1651736047-28809-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fsl_micfil: use define for OSR default valueSascha Hauer2022-04-191-1/+0
| | | | | | | | | | | | The OSR (OverSampling Rate) setting is set once to the default value and never changed throughout the driver. Nevertheless the value is read back from the register for further calculations. Just use the default value because we know what we have written. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220414162249.3934543-14-s.hauer@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fsl_micfil: use GENMASK to define register bit fieldsSascha Hauer2022-04-191-115/+32
| | | | | | | | | | Use GENMASK along with FIELD_PREP and FIELD_GET to access bitfields in registers to straighten register access and to drop a lot of defines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220414162249.3934543-6-s.hauer@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fsl_micfil: do not define SHIFT/MASK for single bitsSascha Hauer2022-04-191-94/+31
| | | | | | | | | | No need to have defines for the mask of single bits. Also shift is unused. Drop all these unnecessary defines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220414162249.3934543-5-s.hauer@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Add MICFIL SoC Digital Audio Interface driver.Cosmin Samoila2019-01-071-0/+283
Add Digital Audio Interface driver that convers PDM bitstream to PCM format. Features: - Fixed filtering characteristics for audio application. - Full or partial set of channels operation with individual enable control. - Programmable PDM clock generator. - Programmable decimation rate. - 16-bit signed output result. - Overall stopband attenuation more than 80dB. - Overall passband ripple less than 0.2dB. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>