]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: nau8825: AD/DA over sampling rate configuration
authorJohn Hsu <KCHSU0@nuvoton.com>
Fri, 11 Nov 2016 03:34:42 +0000 (11:34 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 11 Nov 2016 15:35:39 +0000 (15:35 +0000)
commit274ff8d301b9bf9cc21a247247ac4ffca99ef7f1
tree11e1e683afc3148b7912b73ad515bc034448fc08
parente5a7980a0b9a88f9dbc626bf6de63135f7976cdb
ASoC: nau8825: AD/DA over sampling rate configuration

Over Sampling Rate (OSR) is defined as CLK_ADC frequency divided by the
audio sample rate (Fs).
OSR = CLK_ADC / FS
The available OSRs are 32, 64, 128 or 256. Note that the OSR and Fs
values must be selected such that the maximum frequency of CLK_ADC
is less than 6.144 MHz. It is recommended to match the relationship
between OSR and clock SRC according to following Table.
ADC_RATE: 00(OSR=32)  | CLK_ADC_SRC: 11(CODEC 1/8)
ADC_RATE: 01(OSR=64)  | CLK_ADC_SRC: 10(CODEC1/4)
ADC_RATE: 10(OSR=128) | CLK_ADC_SRC: 01(CODEC 1/2)
ADC_RATE: 11(OSR=256) | CLK_ADC_SRC: 00(CODEC CLK)

The over sampling rate about DAC follows the same rule with ADCs.
The driver changes the OSR to 64 value when initiation for better FLL
performance and applies the dynamic SRC change by different OSR.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8825.c
sound/soc/codecs/nau8825.h