summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5616.h
diff options
context:
space:
mode:
authorKatsuhiro Suzuki <katsuhiro@katsuster.net>2019-09-08 01:36:53 +0900
committerMark Brown <broonie@kernel.org>2019-09-09 10:50:36 +0100
commitebe02a5b9ef05e3b812af3d628cdf6206d9ba610 (patch)
tree2428cd0ce337053475d4aeab6d7f58fc2115490f /sound/soc/codecs/rt5616.h
parent0db0c62c88b84b135bbaf784499a08e536354a43 (diff)
downloadlinux-ebe02a5b9ef05e3b812af3d628cdf6206d9ba610.tar.gz
linux-ebe02a5b9ef05e3b812af3d628cdf6206d9ba610.tar.bz2
linux-ebe02a5b9ef05e3b812af3d628cdf6206d9ba610.zip
ASoC: es8316: support fixed and variable both clock rates
This patch supports some type of machine drivers that set 0 to mclk when sound device goes to idle state. After applied this patch, sysclk == 0 means there is no constraint of sound rate and other values will set constraints which is derived by sysclk setting. Original code refuses sysclk == 0 setting. But some boards and SoC (such as RockPro64 and RockChip I2S) has connected SoC MCLK out to ES8316 MCLK in. In this case, SoC side I2S will choose suitable frequency of MCLK such as fs * mclk-fs when user starts playing or capturing. Bad scenario as follows (mclk-fs = 256): - Initialize sysclk by correct value (Ex. 12.288MHz) - ES8316 set constraints of PCM rate by sysclk 48kHz (1/256), 32kHz (1/384), 30.720kHz (1/400), 24kHz (1/512), 16kHz (1/768), 12kHz (1/1024) - Play 48kHz sound, it's acceptable - Sysclk is not changed - Play 32kHz sound, it's acceptable - Set sysclk by 8.192MHz (= fs * mclk-fs = 32k * 256) - ES8316 set constraints of PCM rate by sysclk 32kHz (1/256), 21.33kHz (1/384), 20.48kHz (1/400), 16kHz (1/512), 10.66kHz (1/768), 8kHz (1/1024) - Play 48kHz again, but it's NOT acceptable because constraints list does not allow 48kHz Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Link: https://lore.kernel.org/r/20190907163653.9382-2-katsuhiro@katsuster.net Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5616.h')
0 files changed, 0 insertions, 0 deletions