linux-stable/sound
Sascha Hauer e8936f6925
ASoC: fsl_micfil: simplify clock setting
The reference manual has this for calculating the micfil internal clock
divider:

         MICFIL Clock rate
clkdiv = -----------------
         8 * OSR * outrate

(with OSR == Oversampling Rate, outrate == output sample rate)

The driver first sets the MICFIL Clock rate to (outrate * 1024) and then
calculates back the clkdiv value from the above calculation.

Simplify this by using a fixed clkdiv value of 8 and set the MICFIL
Clock rate to (outrate * clkdiv * OSR * 8).

While at it drop disabling the clock before setting its rate. The MICFIL
module is disabled when the rate is changed and it is also resetted
before it is started again, so I doubt it's necessary to disable the
clock.

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-16-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-19 12:06:24 +01:00
..
ac97 bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
aoa Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
arm ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
atmel
core sound fixes for 5.18-rc1 2022-04-01 10:32:46 -07:00
drivers ALSA: virmidi: Remove duplicated code 2022-01-06 16:08:18 +01:00
firewire ALSA: firewire-lib: fix uninitialized flag for AV/C deferred transaction 2022-03-04 17:23:21 +01:00
hda ASoC: Updates for v5.18 2022-03-21 16:19:21 +01:00
i2c ALSA: i2c: tea6330t: Remove redundant initialization of variable err 2021-06-12 09:32:14 +02:00
isa ALSA: cs4236: fix an incorrect NULL check on list iterator 2022-03-27 10:32:42 +02:00
mips ALSA: mips: Use platform_get_irq() to get the interrupt 2022-02-28 16:59:01 +01:00
oss sound/oss/dmasound: Remove superfluous "break" 2021-05-27 08:24:23 +02:00
parisc parisc architecture updates for kernel 5.15: 2021-09-02 13:16:00 -07:00
pci sound fixes for 5.18-rc1 2022-04-01 10:32:46 -07:00
pcmcia ALSA: vx: Manage vx_core object with devres 2021-07-19 16:17:09 +02:00
ppc powerpc/machdep: Move sys_ctrler_t definition into pmac_feature.h 2022-02-07 21:02:20 +11:00
sh
soc ASoC: fsl_micfil: simplify clock setting 2022-04-19 12:06:24 +01:00
sparc ALSA: sparc: no need to initialise statics to 0 2021-12-12 10:01:04 +01:00
spi sound updates for 5.18 2022-03-23 15:11:12 -07:00
synth ALSA: synth: missing check for possible NULL after the call to kstrdup 2021-11-09 07:18:50 +01:00
usb Merge branch 'for-next' into for-linus 2022-03-21 16:18:34 +01:00
virtio virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
x86 ALSA: x86: Use standard mmap helper for Intel HDMI LPE audio 2022-03-05 09:33:48 +01:00
xen xen/grant-table: remove readonly parameter from functions 2022-03-15 20:34:40 -05:00
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c sound: core: Remove redundant variable and return the last statement 2022-02-28 17:57:14 +01:00