Home
last modified time | relevance | path

Searched refs:clk_rate (Results 1 – 15 of 15) sorted by relevance

/sound/soc/atmel/
Dmchp-i2s-mcc.c420 unsigned long clk_rate; in mchp_i2s_mcc_config_divs() local
443 for (clk_rate = lcm_rate; in mchp_i2s_mcc_config_divs()
444 (clk_rate == sysclk || clk_rate / (sysclk * 2) <= GENMASK(5, 0)) && in mchp_i2s_mcc_config_divs()
445 (clk_rate == bclk || clk_rate / (bclk * 2) <= GENMASK(5, 0)); in mchp_i2s_mcc_config_divs()
446 clk_rate += lcm_rate) { in mchp_i2s_mcc_config_divs()
447 ret = mchp_i2s_mcc_clk_get_rate_diff(dev->gclk, clk_rate, in mchp_i2s_mcc_config_divs()
452 clk_rate, ret); in mchp_i2s_mcc_config_divs()
456 clk_rate); in mchp_i2s_mcc_config_divs()
461 ret = mchp_i2s_mcc_clk_get_rate_diff(dev->pclk, clk_rate, in mchp_i2s_mcc_config_divs()
466 clk_rate, ret); in mchp_i2s_mcc_config_divs()
[all …]
/sound/soc/fsl/
Dfsl_asrc.c123 static bool fsl_asrc_divider_avail(int clk_rate, int rate, int *div) in fsl_asrc_divider_avail() argument
131 if (clk_rate == 0 || rate == 0) in fsl_asrc_divider_avail()
134 n = clk_rate; in fsl_asrc_divider_avail()
384 u64 clk_rate; in fsl_asrc_config_pair() local
467 clk_rate = clk_get_rate(clk); in fsl_asrc_config_pair()
468 div_avail = fsl_asrc_divider_avail(clk_rate, inrate, &div[IN]); in fsl_asrc_config_pair()
486 clk_rate = clk_get_rate(clk); in fsl_asrc_config_pair()
488 div_avail = fsl_asrc_divider_avail(clk_rate, IDEAL_RATIO_RATE, &div[OUT]); in fsl_asrc_config_pair()
490 div_avail = fsl_asrc_divider_avail(clk_rate, outrate, &div[OUT]); in fsl_asrc_config_pair()
660 int clk_rate, clk_index; in fsl_asrc_select_clk() local
[all …]
Dfsl_esai.c267 unsigned long clk_rate; in fsl_esai_set_dai_sysclk() local
310 clk_rate = clk_get_rate(clksrc); in fsl_esai_set_dai_sysclk()
312 ratio = clk_rate / freq; in fsl_esai_set_dai_sysclk()
313 if (ratio * freq > clk_rate) in fsl_esai_set_dai_sysclk()
314 ret = ratio * freq - clk_rate; in fsl_esai_set_dai_sysclk()
315 else if (ratio * freq < clk_rate) in fsl_esai_set_dai_sysclk()
316 ret = clk_rate - ratio * freq; in fsl_esai_set_dai_sysclk()
321 if (ret != 0 && clk_rate / ret < 1000) { in fsl_esai_set_dai_sysclk()
Dfsl_sai.c353 unsigned long clk_rate; in fsl_sai_set_bclk() local
372 clk_rate = clk_get_rate(sai->mclk_clk[id]); in fsl_sai_set_bclk()
373 if (!clk_rate) in fsl_sai_set_bclk()
376 ratio = clk_rate / freq; in fsl_sai_set_bclk()
378 ret = clk_rate - ratio * freq; in fsl_sai_set_bclk()
384 if (ret != 0 && clk_rate / ret < 1000) in fsl_sai_set_bclk()
389 ratio, freq, clk_rate); in fsl_sai_set_bclk()
Dimx-audmix.c51 unsigned long clk_rate = clk_get_rate(priv->cpu_mclk); in imx_audmix_fe_startup() local
54 if (clk_rate % 24576000 == 0) { in imx_audmix_fe_startup()
61 dev_warn(dev, "mclk may be not supported %lu\n", clk_rate); in imx_audmix_fe_startup()
/sound/soc/img/
Dimg-spdif-in.c150 unsigned int *phld, unsigned long clk_rate) in img_spdif_in_do_clkgen_calc() argument
162 ori = clk_rate / (rate * 64); in img_spdif_in_do_clkgen_calc()
182 unsigned long flags, clk_rate; in img_spdif_in_do_clkgen_single() local
186 ret = img_spdif_in_check_max_rate(spdif, rate, &clk_rate); in img_spdif_in_do_clkgen_single()
190 ret = img_spdif_in_do_clkgen_calc(rate, &nom, &hld, clk_rate); in img_spdif_in_do_clkgen_single()
219 unsigned long flags, clk_rate; in img_spdif_in_do_clkgen_multi() local
227 ret = img_spdif_in_check_max_rate(spdif, max_rate, &clk_rate); in img_spdif_in_do_clkgen_multi()
234 ret = img_spdif_in_do_clkgen_calc(rate, &nom, &hld, clk_rate); in img_spdif_in_do_clkgen_multi()
Dimg-spdif-out.c237 long pre_div_a, pre_div_b, diff_a, diff_b, rate, clk_rate; in img_spdif_out_hw_params() local
275 clk_rate = clk_get_rate(spdif->clk_ref); in img_spdif_out_hw_params()
277 diff_a = abs((clk_rate / 256) - rate); in img_spdif_out_hw_params()
278 diff_b = abs((clk_rate / 384) - rate); in img_spdif_out_hw_params()
Dimg-i2s-out.c218 long pre_div_a, pre_div_b, diff_a, diff_b, rate, clk_rate; in img_i2s_out_hw_params() local
257 clk_rate = clk_get_rate(i2s->clk_ref); in img_i2s_out_hw_params()
259 diff_a = abs((clk_rate / 256) - rate); in img_i2s_out_hw_params()
260 diff_b = abs((clk_rate / 384) - rate); in img_i2s_out_hw_params()
/sound/soc/sh/rcar/
Dadg.c34 int clk_rate[CLKMAX]; member
119 adg->clk_rate[CLKA], /* 0000: CLKA */ in __rsnd_adg_get_timesel_ratio()
120 adg->clk_rate[CLKB], /* 0001: CLKB */ in __rsnd_adg_get_timesel_ratio()
121 adg->clk_rate[CLKC], /* 0010: CLKC */ in __rsnd_adg_get_timesel_ratio()
307 if (rate == adg->clk_rate[i]) in rsnd_adg_clk_query()
379 adg->clk_rate[i] = clk_get_rate(clk); in rsnd_adg_clk_control()
/sound/soc/samsung/
Dspdif.c82 unsigned long clk_rate; member
136 spdif->clk_rate = freq; in spdif_set_sysclk()
220 ratio = spdif->clk_rate / params_rate(params); in spdif_hw_params()
226 spdif->clk_rate, params_rate(params)); in spdif_hw_params()
/sound/soc/tegra/
Dtegra210_dmic.c77 unsigned int srate, clk_rate, channels; in tegra210_dmic_hw_params() local
107 clk_rate = (DMIC_OSR_FACTOR << dmic->osr_val) * srate; in tegra210_dmic_hw_params()
109 err = clk_set_rate(dmic->clk_dmic, clk_rate); in tegra210_dmic_hw_params()
112 clk_rate, err); in tegra210_dmic_hw_params()
/sound/soc/bcm/
Dbcm2835-i2s.c125 int clk_rate; member
416 (!dev->clk_prepared || dev->clk_rate != bclk_rate)) { in bcm2835_i2s_hw_params()
420 if (dev->clk_rate != bclk_rate) { in bcm2835_i2s_hw_params()
424 dev->clk_rate = bclk_rate; in bcm2835_i2s_hw_params()
/sound/soc/rockchip/
Drockchip_pdm.c151 unsigned int clk_rate, clk_div, samplerate; in rockchip_pdm_hw_params() local
161 clk_rate = get_pdm_clk(pdm, samplerate, &clk_src, &clk_out); in rockchip_pdm_hw_params()
162 if (!clk_rate) in rockchip_pdm_hw_params()
/sound/soc/sunxi/
Dsun4i-i2s.c331 unsigned int oversample_rate, clk_rate, bclk_parent_rate; in sun4i_i2s_set_clk_rate() local
341 clk_rate = 22579200; in sun4i_i2s_set_clk_rate()
354 clk_rate = 24576000; in sun4i_i2s_set_clk_rate()
362 ret = clk_set_rate(i2s->mod_clk, clk_rate); in sun4i_i2s_set_clk_rate()
381 mclk_div = sun4i_i2s_get_mclk_div(i2s, clk_rate, i2s->mclk_freq); in sun4i_i2s_set_clk_rate()
/sound/soc/hisilicon/
Dhi6210-i2s.c44 int clk_rate; member