Home
last modified time | relevance | path

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

12

/sound/soc/codecs/
Drl6231.c56 int rl6231_pll_calc(const unsigned int freq_in, in rl6231_pll_calc() argument
62 int red_t = abs(freq_out - freq_in); in rl6231_pll_calc()
65 if (RL6231_PLL_INP_MAX < freq_in || RL6231_PLL_INP_MIN > freq_in) in rl6231_pll_calc()
72 in_t = freq_in / (k + 2); in rl6231_pll_calc()
Dadau17x1.c403 int source, unsigned int freq_in, unsigned int freq_out) in adau17x1_set_dai_pll() argument
411 if (freq_in < 8000000 || freq_in > 27000000) in adau17x1_set_dai_pll()
420 if (freq_out % freq_in != 0) { in adau17x1_set_dai_pll()
421 div = DIV_ROUND_UP(freq_in, 13500000); in adau17x1_set_dai_pll()
422 freq_in /= div; in adau17x1_set_dai_pll()
423 r = freq_out / freq_in; in adau17x1_set_dai_pll()
424 i = freq_out % freq_in; in adau17x1_set_dai_pll()
425 j = gcd(i, freq_in); in adau17x1_set_dai_pll()
427 m = freq_in / j; in adau17x1_set_dai_pll()
430 r = freq_out / freq_in; in adau17x1_set_dai_pll()
Dwm8995.c1729 int freq_in, int freq_out) in wm8995_get_fll_config() argument
1734 pr_debug("FLL input=%dHz, output=%dHz\n", freq_in, freq_out); in wm8995_get_fll_config()
1738 while (freq_in > 13500000) { in wm8995_get_fll_config()
1740 freq_in /= 2; in wm8995_get_fll_config()
1745 pr_debug("CLK_REF_DIV=%d, Fref=%dHz\n", fll->clk_ref_div, freq_in); in wm8995_get_fll_config()
1757 if (freq_in > 1000000) { in wm8995_get_fll_config()
1759 } else if (freq_in > 256000) { in wm8995_get_fll_config()
1761 freq_in *= 2; in wm8995_get_fll_config()
1762 } else if (freq_in > 128000) { in wm8995_get_fll_config()
1764 freq_in *= 4; in wm8995_get_fll_config()
[all …]
Dadau1373.c1256 int source, unsigned int freq_in, unsigned int freq_out) in adau1373_set_pll() argument
1288 if (freq_in < 7813 || freq_in > 27000000) in adau1373_set_pll()
1296 while (freq_in < 8000000) { in adau1373_set_pll()
1297 freq_in *= 2; in adau1373_set_pll()
1301 if (freq_out % freq_in != 0) { in adau1373_set_pll()
1303 x = DIV_ROUND_UP(freq_in, 13500000); in adau1373_set_pll()
1304 freq_in /= x; in adau1373_set_pll()
1305 r = freq_out / freq_in; in adau1373_set_pll()
1306 i = freq_out % freq_in; in adau1373_set_pll()
1307 j = gcd(i, freq_in); in adau1373_set_pll()
[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.c2046 int freq_in, int freq_out) in wm8994_get_fll_config() argument
2051 pr_debug("FLL input=%dHz, output=%dHz\n", freq_in, freq_out); in wm8994_get_fll_config()
2055 while (freq_in > 13500000) { in wm8994_get_fll_config()
2057 freq_in /= 2; in wm8994_get_fll_config()
2062 pr_debug("CLK_REF_DIV=%d, Fref=%dHz\n", fll->clk_ref_div, freq_in); in wm8994_get_fll_config()
2074 if (freq_in > 1000000) { in wm8994_get_fll_config()
2076 } else if (freq_in > 256000) { in wm8994_get_fll_config()
2078 freq_in *= 2; in wm8994_get_fll_config()
2079 } else if (freq_in > 128000) { in wm8994_get_fll_config()
2081 freq_in *= 4; in wm8994_get_fll_config()
[all …]
Dwm8580.c430 int source, unsigned int freq_in, unsigned int freq_out) in wm8580_set_dai_pll() argument
461 if (freq_in && freq_out) { in wm8580_set_dai_pll()
462 ret = pll_factors(&pll_div, freq_out, freq_in); in wm8580_set_dai_pll()
467 state->in = freq_in; in wm8580_set_dai_pll()
475 if (!freq_in || !freq_out) in wm8580_set_dai_pll()
Drl6231.h30 int rl6231_pll_calc(const unsigned int freq_in,
Dalc5632.c680 int source, unsigned int freq_in, unsigned int freq_out) in alc5632_set_dai_pll() argument
703 if (!freq_in || !freq_out) in alc5632_set_dai_pll()
709 if (codec_master_pll_div[i].pll_in == freq_in in alc5632_set_dai_pll()
719 if (codec_slave_pll_div[i].pll_in == freq_in in alc5632_set_dai_pll()
730 if (codec_slave_pll_div[i].pll_in == freq_in in alc5632_set_dai_pll()
Dwm9713.c754 int pll_id, unsigned int freq_in, unsigned int freq_out) in wm9713_set_pll() argument
761 if (freq_in == 0) { in wm9713_set_pll()
771 pll_factors(&pll_div, freq_in); in wm9713_set_pll()
811 wm9713->pll_in = freq_in; in wm9713_set_pll()
819 int source, unsigned int freq_in, unsigned int freq_out) in wm9713_set_dai_pll() argument
822 return wm9713_set_pll(codec, pll_id, freq_in, freq_out); in wm9713_set_dai_pll()
Dwm8974.c320 int source, unsigned int freq_in, unsigned int freq_out) in wm8974_set_dai_pll() argument
326 if (freq_in == 0 || freq_out == 0) { in wm8974_set_dai_pll()
337 pll_factors(&pll_div, freq_out, freq_in); in wm8974_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()
Dalc5623.c525 int source, unsigned int freq_in, unsigned int freq_out) in alc5623_set_dai_pll() argument
545 if (!freq_in || !freq_out) in alc5623_set_dai_pll()
551 if (codec_master_pll_div[i].pll_in == freq_in in alc5623_set_dai_pll()
561 if (codec_slave_pll_div[i].pll_in == freq_in in alc5623_set_dai_pll()
Dwm8960.c829 int source, unsigned int freq_in, unsigned int freq_out) in wm8960_set_dai_pll() argument
836 if (freq_in && freq_out) { in wm8960_set_dai_pll()
837 ret = pll_factors(freq_in, freq_out, &pll_div); in wm8960_set_dai_pll()
847 if (!freq_in || !freq_out) in wm8960_set_dai_pll()
Dwm8350.c1028 int pll_id, int source, unsigned int freq_in, in wm8350_set_fll() argument
1038 if (freq_in == priv->fll_freq_in && freq_out == priv->fll_freq_out) in wm8350_set_fll()
1045 if (freq_out == 0 || freq_in == 0) in wm8350_set_fll()
1048 ret = fll_factors(&fll_div, freq_in, freq_out); in wm8350_set_fll()
1053 freq_in, freq_out, fll_div.n, fll_div.k, fll_div.div, in wm8350_set_fll()
1076 priv->fll_freq_in = freq_in; in wm8350_set_fll()
Drt5651.c1505 unsigned int freq_in, unsigned int freq_out) in rt5651_set_dai_pll() argument
1512 if (source == rt5651->pll_src && freq_in == rt5651->pll_in && in rt5651_set_dai_pll()
1516 if (!freq_in || !freq_out) { in rt5651_set_dai_pll()
1544 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5651_set_dai_pll()
1546 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5651_set_dai_pll()
1560 rt5651->pll_in = freq_in; in rt5651_set_dai_pll()
Dwm8940.c579 int source, unsigned int freq_in, unsigned int freq_out) in wm8940_set_dai_pll() argument
588 if (freq_in == 0 || freq_out == 0) { in wm8940_set_dai_pll()
598 pll_factors(freq_out*4, freq_in); in wm8940_set_dai_pll()
Dwm8804.c379 int source, unsigned int freq_in, in wm8804_set_pll() argument
385 if (!freq_in || !freq_out) { in wm8804_set_pll()
396 ret = pll_factors(&pll_div, freq_out, freq_in, in wm8804_set_pll()
Dwm8400.c942 int source, unsigned int freq_in, in wm8400_set_dai_pll() argument
951 if (freq_in == wm8400->fll_in && freq_out == wm8400->fll_out) in wm8400_set_dai_pll()
955 ret = fll_factors(wm8400, &factors, freq_in, freq_out); in wm8400_set_dai_pll()
966 wm8400->fll_in = freq_in; in wm8400_set_dai_pll()
Drt5677.c3031 static int rt5677_pll_calc(const unsigned int freq_in, in rt5677_pll_calc() argument
3034 if (RT5677_PLL_INP_MIN > freq_in) in rt5677_pll_calc()
3037 return rl6231_pll_calc(freq_in, freq_out, pll_code); in rt5677_pll_calc()
3041 unsigned int freq_in, unsigned int freq_out) in rt5677_set_dai_pll() argument
3048 if (source == rt5677->pll_src && freq_in == rt5677->pll_in && in rt5677_set_dai_pll()
3052 if (!freq_in || !freq_out) { in rt5677_set_dai_pll()
3097 ret = rt5677_pll_calc(freq_in, freq_out, &pll_code); in rt5677_set_dai_pll()
3099 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5677_set_dai_pll()
3113 rt5677->pll_in = freq_in; in rt5677_set_dai_pll()
Drt5640.c1796 unsigned int freq_in, unsigned int freq_out) in rt5640_set_dai_pll() argument
1803 if (source == rt5640->pll_src && freq_in == rt5640->pll_in && in rt5640_set_dai_pll()
1807 if (!freq_in || !freq_out) { in rt5640_set_dai_pll()
1844 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5640_set_dai_pll()
1846 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5640_set_dai_pll()
1860 rt5640->pll_in = freq_in; in rt5640_set_dai_pll()
Drt5645.c1956 unsigned int freq_in, unsigned int freq_out) in rt5645_set_dai_pll() argument
1963 if (source == rt5645->pll_src && freq_in == rt5645->pll_in && in rt5645_set_dai_pll()
1967 if (!freq_in || !freq_out) { in rt5645_set_dai_pll()
2003 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5645_set_dai_pll()
2005 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5645_set_dai_pll()
2019 rt5645->pll_in = freq_in; in rt5645_set_dai_pll()
Drt5670.c2168 unsigned int freq_in, unsigned int freq_out) in rt5670_set_dai_pll() argument
2175 if (source == rt5670->pll_src && freq_in == rt5670->pll_in && in rt5670_set_dai_pll()
2179 if (!freq_in || !freq_out) { in rt5670_set_dai_pll()
2217 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt5670_set_dai_pll()
2219 dev_err(codec->dev, "Unsupport input clock %d\n", freq_in); in rt5670_set_dai_pll()
2233 rt5670->pll_in = freq_in; in rt5670_set_dai_pll()
Drt5631.c1466 int source, unsigned int freq_in, unsigned int freq_out) in rt5631_codec_set_dai_pll() argument
1474 if (!freq_in || !freq_out) { in rt5631_codec_set_dai_pll()
1486 if (freq_in == codec_master_pll_div[i].pll_in && in rt5631_codec_set_dai_pll()
1505 if (freq_in == codec_slave_pll_div[i].pll_in && in rt5631_codec_set_dai_pll()
Dwm8983.c841 int source, unsigned int freq_in, in wm8983_set_pll() argument
849 if (!freq_in || !freq_out) { in wm8983_set_pll()
855 ret = pll_factors(&pll_div, freq_out * 4 * 2, freq_in); in wm8983_set_pll()

12