diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-04-09 09:56:58 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-04-09 09:57:03 +0200 |
commit | 473d5ae82d73c3b21160b725af0e247fa94d7832 (patch) | |
tree | d70bec96f7539abab14ea5566a74c6c255aab1d2 /sound/soc/codecs/wm8960.c | |
parent | 66c6d1ef86ff3c1466e646d94c8eb3dcc9ccf873 (diff) | |
parent | c8426b2700b57d2760ff335840a02f66a64b6044 (diff) | |
download | linux-473d5ae82d73c3b21160b725af0e247fa94d7832.tar.gz |
Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/codecs/wm8960.c')
-rw-r--r-- | sound/soc/codecs/wm8960.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index df351519a3a6..cda9cd935d4f 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -707,7 +707,13 @@ int wm8960_configure_pll(struct snd_soc_component *component, int freq_in, best_freq_out = -EINVAL; *sysclk_idx = *dac_idx = *bclk_idx = -1; - for (i = 0; i < ARRAY_SIZE(sysclk_divs); ++i) { + /* + * From Datasheet, the PLL performs best when f2 is between + * 90MHz and 100MHz, the desired sysclk output is 11.2896MHz + * or 12.288MHz, then sysclkdiv = 2 is the best choice. + * So search sysclk_divs from 2 to 1 other than from 1 to 2. + */ + for (i = ARRAY_SIZE(sysclk_divs) - 1; i >= 0; --i) { if (sysclk_divs[i] == -1) continue; for (j = 0; j < ARRAY_SIZE(dac_divs); ++j) { |