Home
last modified time | relevance | path

Searched refs:freq_in (Results 1 – 25 of 48) sorted by relevance

12

/sound/soc/codecs/
Dadau-utils.c16 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()
Drl6231.c119 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()
Dwm8960.c53 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 …]
Dwm8995.c1726 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 …]
Dwm8900.c755 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()
Dwm8994.c2050 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 …]
Dadau-utils.h5 int adau_calc_pll_cfg(unsigned int freq_in, unsigned int freq_out,
Dalc5632.c681 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()
Drl6231.h30 int rl6231_pll_calc(const unsigned int freq_in,
Dwm9713.c815 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()
Drt5660.c1013 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()
Dwm8580.c465 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()
Drt5514.c830 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()
Drt5616.c1098 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()
Dalc5623.c526 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()
Dadau17x1.c329 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()
Dwm8510.c317 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()
Dadau1373.c1254 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()
Dwm8940.c577 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()
Dwm8804.c405 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()
Dwm8974.c325 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()
Drt5651.c1466 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()
Dwm8350.c1024 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()
Dnau8540.c611 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()
Dnau8810.c539 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()

12