/linux/sound/soc/codecs/ |
H A D | adau-utils.c | 15 int adau_calc_pll_cfg(unsigned int freq_in, unsigned int freq_out, in adau_calc_pll_cfg() argument 21 if (!freq_out) { in adau_calc_pll_cfg() 27 if (freq_out % freq_in != 0) { in adau_calc_pll_cfg() 30 r = freq_out / freq_in; in adau_calc_pll_cfg() 31 i = freq_out % freq_in; in adau_calc_pll_cfg() 37 r = freq_out / freq_in; in adau_calc_pll_cfg()
|
H A D | rl6231.c | 133 * @freq_out: target clock which codec works on. 141 const unsigned int freq_out, struct rl6231_pll_code *pll_code) in rl6231_pll_calc() argument 147 unsigned int red_t = abs(freq_out - freq_in); in rl6231_pll_calc() 156 freq_out == pll_preset_table[i].pll_out) { in rl6231_pll_calc() 167 min_k = 80000000 / freq_out - 2; in rl6231_pll_calc() 168 max_k = 150000000 / freq_out - 2; in rl6231_pll_calc() 173 div_t = gcd(freq_in, freq_out); in rl6231_pll_calc() 177 f_out = freq_out / div; in rl6231_pll_calc()
|
H A D | wm8960.c | 53 unsigned int freq_in, unsigned int freq_out); 683 * - freq_out = sysclk * sysclk_divs 706 int sysclk, bclk, lrclk, freq_out; in wm8960_configure_pll() local 728 freq_out = sysclk * sysclk_divs[i]; in wm8960_configure_pll() 731 if (!is_pll_freq_available(freq_in, freq_out)) in wm8960_configure_pll() 739 return freq_out; in wm8960_configure_pll() 746 best_freq_out = freq_out; in wm8960_configure_pll() 757 int freq_out, freq_in; in wm8960_configure_clocking() local 790 freq_out = freq_in; in wm8960_configure_clocking() 792 freq_out = wm8960->sysclk; in wm8960_configure_clocking() [all …]
|
H A D | ak4375.c | 255 unsigned int freq_in, freq_out; in ak4375_hw_params() local 267 freq_out = AK4375_PLL_FREQ_OUT_122880000; in ak4375_hw_params() 269 freq_out = AK4375_PLL_FREQ_OUT_112896000; in ak4375_hw_params() 271 return snd_soc_dai_set_pll(dai, 0, 0, freq_in, freq_out); in ak4375_hw_params() 275 unsigned int freq_in, unsigned int freq_out) in ak4375_dai_set_pll() argument 327 mdiv = freq_out / mclk - 1; in ak4375_dai_set_pll() 332 mdiv = freq_out / mclk - 1; in ak4375_dai_set_pll() 350 plm = freq_out / freq_in - 1; in ak4375_dai_set_pll() 362 ak4375->rate, mclk, freq_in, freq_out, ak4375->pld, plm, mdiv, div); in ak4375_dai_set_pll()
|
H A D | rt1019.c | 325 unsigned int freq_in, unsigned int freq_out) in rt1019_set_dai_pll() argument 332 if (!freq_in || !freq_out) { in rt1019_set_dai_pll() 340 freq_out == rt1019->pll_out) in rt1019_set_dai_pll() 359 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt1019_set_dai_pll() 383 rt1019->pll_out = freq_out; in rt1019_set_dai_pll()
|
H A D | adav80x.c | 623 int source, unsigned int freq_in, unsigned int freq_out) in adav80x_set_pll() argument 640 if (!freq_out) in adav80x_set_pll() 656 if (freq_out > 12288000) { in adav80x_set_pll() 658 freq_out /= 2; in adav80x_set_pll() 661 /* freq_out = sample_rate * 256 */ in adav80x_set_pll() 662 switch (freq_out) { in adav80x_set_pll()
|
H A D | rt1318.c | 792 const unsigned int freq_out, struct rt1318_pll_code *pll_code) in rt1318_pll_calc() argument 797 int red_t = abs(freq_out - freq_in); in rt1318_pll_calc() 805 freq_out == pll_preset_table[i].pll_out) { in rt1318_pll_calc() 815 k = 100000000 / freq_out - 2; in rt1318_pll_calc() 824 pll_out = freq_out / (n_t + 2); in rt1318_pll_calc() 867 unsigned int freq_in, unsigned int freq_out) in rt1318_set_dai_pll() argument 874 if (!freq_in || !freq_out) { in rt1318_set_dai_pll() 882 freq_out == rt1318->pll_out) in rt1318_set_dai_pll() 923 ret = rt1318_pll_calc(freq_in, freq_out, &pll_code); in rt1318_set_dai_pll() 943 rt1318->pll_out = freq_out; in rt1318_set_dai_pll()
|
H A D | rt1016.c | 455 unsigned int freq_out) in rt1016_set_component_pll() argument 461 if (!freq_in || !freq_out) { in rt1016_set_component_pll() 471 freq_out == rt1016->pll_out) in rt1016_set_component_pll() 490 ret = rl6231_pll_calc(freq_in, freq_out * 4, &pll_code); in rt1016_set_component_pll() 510 rt1016->pll_out = freq_out; in rt1016_set_component_pll()
|
H A D | wm8995.c | 1724 int freq_in, int freq_out) in wm8995_get_fll_config() argument 1729 pr_debug("FLL input=%dHz, output=%dHz\n", freq_in, freq_out); in wm8995_get_fll_config() 1744 while (freq_out * (fll->outdiv + 1) < 90000000) { in wm8995_get_fll_config() 1749 freq_out *= fll->outdiv + 1; in wm8995_get_fll_config() 1750 pr_debug("OUTDIV=%d, Fvco=%dHz\n", fll->outdiv, freq_out); in wm8995_get_fll_config() 1770 Ndiv = freq_out / freq_in; in wm8995_get_fll_config() 1773 Nmod = freq_out % freq_in; in wm8995_get_fll_config() 1796 unsigned int freq_out) in wm8995_set_fll() argument 1829 if (freq_out) in wm8995_set_fll() 1843 wm8995->fll[id].in == freq_in && wm8995->fll[id].out == freq_out) in wm8995_set_fll() [all …]
|
H A D | wm8900.c | 746 int fll_id, unsigned int freq_in, unsigned int freq_out) in wm8900_set_fll() argument 751 if (wm8900->fll_in == freq_in && wm8900->fll_out == freq_out) in wm8900_set_fll() 759 if (!freq_in || !freq_out) { in wm8900_set_fll() 765 wm8900->fll_out = freq_out; in wm8900_set_fll() 770 if (fll_factors(&fll_div, freq_in, freq_out) != 0) in wm8900_set_fll() 774 wm8900->fll_out = freq_out; in wm8900_set_fll() 810 int source, unsigned int freq_in, unsigned int freq_out) in wm8900_set_dai_pll() argument 812 return wm8900_set_fll(codec_dai->component, pll_id, freq_in, freq_out); in wm8900_set_dai_pll()
|
H A D | nau8822.c | 712 unsigned int freq_in, unsigned int freq_out) in nau8822_set_pll() argument 720 freq_out == pll_param->freq_out) in nau8822_set_pll() 723 if (freq_out == 0) { in nau8822_set_pll() 730 fs = freq_out / 256; in nau8822_set_pll() 767 pll_param->freq_out = freq_out; in nau8822_set_pll()
|
H A D | nau8540.c | 688 /* Calculate the frequency of DCO (FDCO) given freq_out = 256 * Fs. in nau8540_calc_fll_param() 691 * FDCO = freq_out * 2 * mclk_src_scaling in nau8540_calc_fll_param() 756 /* freq_out must be 256*Fs in order to achieve the best performance */ 758 unsigned int freq_in, unsigned int freq_out) in nau8540_set_pll() argument 790 freq_out, pll_id); in nau8540_set_pll() 792 fs = freq_out / 256; in nau8540_set_pll()
|
H A D | rt1308.c | 617 unsigned int freq_out) in rt1308_set_component_pll() argument 624 freq_out == rt1308->pll_out) in rt1308_set_component_pll() 627 if (!freq_in || !freq_out) { in rt1308_set_component_pll() 663 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt1308_set_component_pll() 680 rt1308->pll_out = freq_out; in rt1308_set_component_pll()
|
H A D | adau-utils.h | 5 int adau_calc_pll_cfg(unsigned int freq_in, unsigned int freq_out,
|
H A D | wm8400.c | 922 unsigned int freq_out) in wm8400_set_dai_pll() argument 930 if (freq_in == wm8400->fll_in && freq_out == wm8400->fll_out) in wm8400_set_dai_pll() 933 if (freq_out) { in wm8400_set_dai_pll() 934 ret = fll_factors(wm8400, &factors, freq_in, freq_out); in wm8400_set_dai_pll() 940 * freq_out is 0 before any of the uses. */ in wm8400_set_dai_pll() 944 wm8400->fll_out = freq_out; in wm8400_set_dai_pll() 956 if (!freq_out) in wm8400_set_dai_pll()
|
H A D | wm8994.c | 2123 int freq_in, int freq_out) in wm8994_get_fll_config() argument 2128 pr_debug("FLL input=%dHz, output=%dHz\n", freq_in, freq_out); in wm8994_get_fll_config() 2143 while (freq_out * (fll->outdiv + 1) < 90000000) { in wm8994_get_fll_config() 2148 freq_out *= fll->outdiv + 1; in wm8994_get_fll_config() 2149 pr_debug("OUTDIV=%d, Fvco=%dHz\n", fll->outdiv, freq_out); in wm8994_get_fll_config() 2169 Ndiv = freq_out / freq_in; in wm8994_get_fll_config() 2172 Nmod = freq_out % freq_in; in wm8994_get_fll_config() 2195 gcd_fll = gcd(freq_out, freq_in); in wm8994_get_fll_config() 2197 fll->k = (freq_out - (freq_in * fll->n)) / gcd_fll; in wm8994_get_fll_config() 2206 unsigned int freq_in, unsigned int freq_out) in _wm8994_set_fll() argument [all …]
|
H A D | wm8580.c | 461 int source, unsigned int freq_in, unsigned int freq_out) in wm8580_set_dai_pll() argument 492 if (freq_in && freq_out) { in wm8580_set_dai_pll() 493 ret = pll_factors(&pll_div, freq_out, freq_in); in wm8580_set_dai_pll() 499 state->out = freq_out; in wm8580_set_dai_pll() 506 if (!freq_in || !freq_out) in wm8580_set_dai_pll()
|
H A D | rl6231.h | 29 const unsigned int freq_out, struct rl6231_pll_code *pll_code);
|
H A D | rt1015.c | 842 unsigned int freq_out) in rt1015_set_component_pll() argument 848 if (!freq_in || !freq_out) { in rt1015_set_component_pll() 858 freq_out == rt1015->pll_out) in rt1015_set_component_pll() 877 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt1015_set_component_pll() 895 rt1015->pll_out = freq_out; in rt1015_set_component_pll()
|
H A D | rt1305.c | 792 unsigned int freq_out) in rt1305_set_component_pll() argument 799 freq_out == rt1305->pll_out) in rt1305_set_component_pll() 802 if (!freq_in || !freq_out) { in rt1305_set_component_pll() 840 ret = rl6231_pll_calc(freq_in, freq_out, &pll_code); in rt1305_set_component_pll() 858 rt1305->pll_out = freq_out; in rt1305_set_component_pll()
|
/linux/drivers/mfd/ |
H A D | twl6040.c | 369 unsigned int freq_in, unsigned int freq_out) in twl6040_set_pll() argument 389 if (twl6040->sysclk_rate != freq_out) { in twl6040_set_pll() 390 switch (freq_out) { in twl6040_set_pll() 399 "freq_out %d not supported\n", in twl6040_set_pll() 400 freq_out); in twl6040_set_pll() 436 if (freq_out != 19200000) { in twl6040_set_pll() 438 "freq_out %d not supported\n", freq_out); in twl6040_set_pll() 502 twl6040->sysclk_rate = freq_out; in twl6040_set_pll()
|
/linux/sound/soc/intel/avs/boards/ |
H A D | rt5682.c | 149 int pll_source, freq_in, freq_out; in avs_rt5682_hw_params() local 163 freq_out = params_rate(params) * 512; in avs_rt5682_hw_params() 165 ret = snd_soc_dai_set_pll(codec_dai, RT5682_PLL1, pll_source, freq_in, freq_out); in avs_rt5682_hw_params() 169 ret = snd_soc_dai_set_sysclk(codec_dai, RT5682_SCLK_S_PLL1, freq_out, SND_SOC_CLOCK_IN); in avs_rt5682_hw_params()
|
/linux/drivers/gpu/drm/bridge/ |
H A D | chipone-icn6211.c | 256 unsigned int freq_p, freq_s, freq_out; in chipone_configure_pll() local 307 freq_out = (fin * m) / p; in chipone_configure_pll() 308 if (freq_out > 1000000000) in chipone_configure_pll() 312 freq_out /= BIT(s + 1); in chipone_configure_pll() 314 delta = abs(mode_clock - freq_out); in chipone_configure_pll()
|
/linux/sound/soc/pxa/ |
H A D | mmp-sspa.c | 135 unsigned int freq_out) in mmp_sspa_set_dai_pll() argument 146 ret = clk_set_rate(sspa->sysclk, freq_out); in mmp_sspa_set_dai_pll() 151 ret = clk_set_rate(sspa->clk, freq_out); in mmp_sspa_set_dai_pll()
|
/linux/sound/soc/ |
H A D | soc-dai.c | 97 * @freq_out: requested PLL output clock frequency in Hz 102 unsigned int freq_in, unsigned int freq_out) in snd_soc_dai_set_pll() argument 109 freq_in, freq_out); in snd_soc_dai_set_pll() 112 freq_in, freq_out); in snd_soc_dai_set_pll()
|