/sound/soc/codecs/ |
D | adau-utils.c | 16 int adau_calc_pll_cfg(unsigned int freq_in, unsigned int freq_out, in adau_calc_pll_cfg() argument 28 if (freq_out % freq_in != 0) { in adau_calc_pll_cfg() 29 div = DIV_ROUND_UP(freq_in, 13500000); in adau_calc_pll_cfg() 30 freq_in /= div; in adau_calc_pll_cfg() 31 r = freq_out / freq_in; in adau_calc_pll_cfg() 32 i = freq_out % freq_in; in adau_calc_pll_cfg() 33 j = gcd(i, freq_in); in adau_calc_pll_cfg() 35 m = freq_in / j; in adau_calc_pll_cfg() 38 r = freq_out / freq_in; in adau_calc_pll_cfg()
|
D | rl6231.c | 119 int rl6231_pll_calc(const unsigned int freq_in, in rl6231_pll_calc() argument 125 int red_t = abs(freq_out - freq_in); in rl6231_pll_calc() 128 if (RL6231_PLL_INP_MAX < freq_in || RL6231_PLL_INP_MIN > freq_in) in rl6231_pll_calc() 132 if (freq_in == pll_preset_table[i].pll_in && in rl6231_pll_calc() 147 in_t = freq_in / (k + 2); in rl6231_pll_calc()
|
D | wm8960.c | 53 unsigned int freq_in, unsigned int freq_out); 136 int freq_in; member 698 int wm8960_configure_pll(struct snd_soc_codec *codec, int freq_in, in wm8960_configure_pll() argument 708 closest = freq_in; in wm8960_configure_pll() 721 if (!is_pll_freq_available(freq_in, freq_out)) in wm8960_configure_pll() 747 int freq_out, freq_in; in wm8960_configure_clocking() local 758 if (wm8960->clk_id != WM8960_SYSCLK_MCLK && !wm8960->freq_in) { in wm8960_configure_clocking() 763 freq_in = wm8960->freq_in; in wm8960_configure_clocking() 773 freq_out = freq_in; in wm8960_configure_clocking() 791 freq_out = wm8960_configure_pll(codec, freq_in, &i, &j, &k); in wm8960_configure_clocking() [all …]
|
D | wm8995.c | 1726 int freq_in, int freq_out) in wm8995_get_fll_config() argument 1731 pr_debug("FLL input=%dHz, output=%dHz\n", freq_in, freq_out); in wm8995_get_fll_config() 1735 while (freq_in > 13500000) { in wm8995_get_fll_config() 1737 freq_in /= 2; in wm8995_get_fll_config() 1742 pr_debug("CLK_REF_DIV=%d, Fref=%dHz\n", fll->clk_ref_div, freq_in); in wm8995_get_fll_config() 1754 if (freq_in > 1000000) { in wm8995_get_fll_config() 1756 } else if (freq_in > 256000) { in wm8995_get_fll_config() 1758 freq_in *= 2; in wm8995_get_fll_config() 1759 } else if (freq_in > 128000) { in wm8995_get_fll_config() 1761 freq_in *= 4; in wm8995_get_fll_config() [all …]
|
D | wm8900.c | 755 int fll_id, unsigned int freq_in, unsigned int freq_out) in wm8900_set_fll() argument 760 if (wm8900->fll_in == freq_in && wm8900->fll_out == freq_out) in wm8900_set_fll() 768 if (!freq_in || !freq_out) { in wm8900_set_fll() 773 wm8900->fll_in = freq_in; in wm8900_set_fll() 779 if (fll_factors(&fll_div, freq_in, freq_out) != 0) in wm8900_set_fll() 782 wm8900->fll_in = freq_in; in wm8900_set_fll() 819 int source, unsigned int freq_in, unsigned int freq_out) in wm8900_set_dai_pll() argument 821 return wm8900_set_fll(codec_dai->codec, pll_id, freq_in, freq_out); in wm8900_set_dai_pll()
|
D | wm8994.c | 2050 int freq_in, int freq_out) in wm8994_get_fll_config() argument 2055 pr_debug("FLL input=%dHz, output=%dHz\n", freq_in, freq_out); in wm8994_get_fll_config() 2059 while (freq_in > 13500000) { in wm8994_get_fll_config() 2061 freq_in /= 2; in wm8994_get_fll_config() 2066 pr_debug("CLK_REF_DIV=%d, Fref=%dHz\n", fll->clk_ref_div, freq_in); in wm8994_get_fll_config() 2078 if (freq_in > 1000000) { in wm8994_get_fll_config() 2080 } else if (freq_in > 256000) { in wm8994_get_fll_config() 2082 freq_in *= 2; in wm8994_get_fll_config() 2083 } else if (freq_in > 128000) { in wm8994_get_fll_config() 2085 freq_in *= 4; in wm8994_get_fll_config() [all …]
|
D | adau-utils.h | 5 int adau_calc_pll_cfg(unsigned int freq_in, unsigned int freq_out,
|
D | alc5632.c | 681 int source, unsigned int freq_in, unsigned int freq_out) in alc5632_set_dai_pll() argument 704 if (!freq_in || !freq_out) in alc5632_set_dai_pll() 710 if (codec_master_pll_div[i].pll_in == freq_in in alc5632_set_dai_pll() 720 if (codec_slave_pll_div[i].pll_in == freq_in in alc5632_set_dai_pll() 731 if (codec_slave_pll_div[i].pll_in == freq_in in alc5632_set_dai_pll()
|
D | rl6231.h | 30 int rl6231_pll_calc(const unsigned int freq_in,
|
D | wm9713.c | 815 int pll_id, unsigned int freq_in, unsigned int freq_out) in wm9713_set_pll() argument 822 if (freq_in == 0) { in wm9713_set_pll() 830 pll_factors(codec, &pll_div, freq_in); in wm9713_set_pll() 868 wm9713->pll_in = freq_in; in wm9713_set_pll() 876 int source, unsigned int freq_in, unsigned int freq_out) in wm9713_set_dai_pll() argument 879 return wm9713_set_pll(codec, pll_id, freq_in, freq_out); in wm9713_set_dai_pll()
|
D | rt5660.c | 1013 unsigned int freq_in, unsigned int freq_out) in rt5660_set_dai_pll() argument 1020 if (source == rt5660->pll_src && freq_in == rt5660->pll_in && in rt5660_set_dai_pll() 1024 if (!freq_in || !freq_out) { in rt5660_set_dai_pll() 1050 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5660_set_dai_pll() 1052 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5660_set_dai_pll() 1066 rt5660->pll_in = freq_in; in rt5660_set_dai_pll()
|
D | wm8580.c | 465 int source, unsigned int freq_in, unsigned int freq_out) in wm8580_set_dai_pll() argument 496 if (freq_in && freq_out) { in wm8580_set_dai_pll() 497 ret = pll_factors(&pll_div, freq_out, freq_in); in wm8580_set_dai_pll() 502 state->in = freq_in; in wm8580_set_dai_pll() 510 if (!freq_in || !freq_out) in wm8580_set_dai_pll()
|
D | rt5514.c | 830 unsigned int freq_in, unsigned int freq_out) in rt5514_set_dai_pll() argument 837 if (!freq_in || !freq_out) { in rt5514_set_dai_pll() 849 if (source == rt5514->pll_src && freq_in == rt5514->pll_in && in rt5514_set_dai_pll() 869 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5514_set_dai_pll() 871 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5514_set_dai_pll() 886 rt5514->pll_in = freq_in; in rt5514_set_dai_pll()
|
D | rt5616.c | 1098 unsigned int freq_in, unsigned int freq_out) in rt5616_set_dai_pll() argument 1105 if (source == rt5616->pll_src && freq_in == rt5616->pll_in && in rt5616_set_dai_pll() 1109 if (!freq_in || !freq_out) { in rt5616_set_dai_pll() 1137 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5616_set_dai_pll() 1139 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5616_set_dai_pll() 1154 rt5616->pll_in = freq_in; in rt5616_set_dai_pll()
|
D | alc5623.c | 526 int source, unsigned int freq_in, unsigned int freq_out) in alc5623_set_dai_pll() argument 546 if (!freq_in || !freq_out) in alc5623_set_dai_pll() 552 if (codec_master_pll_div[i].pll_in == freq_in in alc5623_set_dai_pll() 562 if (codec_slave_pll_div[i].pll_in == freq_in in alc5623_set_dai_pll()
|
D | adau17x1.c | 329 int source, unsigned int freq_in, unsigned int freq_out) in adau17x1_set_dai_pll() argument 335 if (freq_in < 8000000 || freq_in > 27000000) in adau17x1_set_dai_pll() 338 ret = adau_calc_pll_cfg(freq_in, freq_out, adau->pll_regs); in adau17x1_set_dai_pll()
|
D | wm8510.c | 317 int source, unsigned int freq_in, unsigned int freq_out) in wm8510_set_dai_pll() argument 322 if (freq_in == 0 || freq_out == 0) { in wm8510_set_dai_pll() 333 pll_factors(freq_out*4, freq_in); in wm8510_set_dai_pll()
|
D | adau1373.c | 1254 int source, unsigned int freq_in, unsigned int freq_out) in adau1373_set_pll() argument 1287 if (freq_in < 7813 || freq_in > 27000000) in adau1373_set_pll() 1295 while (freq_in < 8000000) { in adau1373_set_pll() 1296 freq_in *= 2; in adau1373_set_pll() 1300 ret = adau_calc_pll_cfg(freq_in, freq_out, pll_regs); in adau1373_set_pll()
|
D | wm8940.c | 577 int source, unsigned int freq_in, unsigned int freq_out) in wm8940_set_dai_pll() argument 586 if (freq_in == 0 || freq_out == 0) { in wm8940_set_dai_pll() 596 pll_factors(freq_out*4, freq_in); in wm8940_set_dai_pll()
|
D | wm8804.c | 405 int source, unsigned int freq_in, in wm8804_set_pll() argument 412 if (!freq_in || !freq_out) { in wm8804_set_pll() 422 ret = pll_factors(&pll_div, freq_out, freq_in, in wm8804_set_pll()
|
D | wm8974.c | 325 int source, unsigned int freq_in, unsigned int freq_out) in wm8974_set_dai_pll() argument 331 if (freq_in == 0 || freq_out == 0) { in wm8974_set_dai_pll() 342 pll_factors(&pll_div, freq_out, freq_in); in wm8974_set_dai_pll()
|
D | rt5651.c | 1466 unsigned int freq_in, unsigned int freq_out) in rt5651_set_dai_pll() argument 1473 if (source == rt5651->pll_src && freq_in == rt5651->pll_in && in rt5651_set_dai_pll() 1477 if (!freq_in || !freq_out) { in rt5651_set_dai_pll() 1505 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5651_set_dai_pll() 1507 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5651_set_dai_pll() 1521 rt5651->pll_in = freq_in; in rt5651_set_dai_pll()
|
D | wm8350.c | 1024 int pll_id, int source, unsigned int freq_in, in wm8350_set_fll() argument 1034 if (freq_in == priv->fll_freq_in && freq_out == priv->fll_freq_out) in wm8350_set_fll() 1041 if (freq_out == 0 || freq_in == 0) in wm8350_set_fll() 1044 ret = fll_factors(&fll_div, freq_in, freq_out); in wm8350_set_fll() 1049 freq_in, freq_out, fll_div.n, fll_div.k, fll_div.div, in wm8350_set_fll() 1072 priv->fll_freq_in = freq_in; in wm8350_set_fll()
|
D | nau8540.c | 611 unsigned int freq_in, unsigned int freq_out) in nau8540_set_pll() argument 641 ret = nau8540_calc_fll_param(freq_in, fs, &fll_param); in nau8540_set_pll() 643 dev_err(nau8540->dev, "Unsupported input clock %d\n", freq_in); in nau8540_set_pll()
|
D | nau8810.c | 539 int source, unsigned int freq_in, unsigned int freq_out) in nau8810_set_pll() argument 548 ret = nau88l0_calc_pll(freq_in, fs, pll_param); in nau8810_set_pll() 550 dev_err(nau8810->dev, "Unsupported input clock %d\n", freq_in); in nau8810_set_pll()
|