Home
last modified time | relevance | path

Searched refs:mclk_rate (Results 1 – 25 of 63) sorted by relevance

123

/linux-6.6.21/sound/soc/cirrus/
Dedb93xx.c29 unsigned int mclk_rate; in edb93xx_hw_params() local
37 mclk_rate = rate * 64 * 4; in edb93xx_hw_params()
39 mclk_rate = rate * 64 * 2; in edb93xx_hw_params()
41 err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, in edb93xx_hw_params()
46 return snd_soc_dai_set_sysclk(cpu_dai, 0, mclk_rate, in edb93xx_hw_params()
/linux-6.6.21/sound/soc/mediatek/mt8183/
Dmt8183-dai-tdm.c23 int mclk_rate; member
286 mt8183_mck_enable(afe, tdm_priv->mclk_id, tdm_priv->mclk_rate); in mtk_tdm_mck_en_event()
289 tdm_priv->mclk_rate = 0; in mtk_tdm_mck_en_event()
458 tdm_priv->mclk_rate = freq; in mtk_dai_tdm_cal_mclk()
481 if (!tdm_priv->mclk_rate) { in mtk_dai_tdm_hw_params()
482 tdm_priv->mclk_rate = rate * tdm_priv->mclk_multiple; in mtk_dai_tdm_hw_params()
485 tdm_priv->mclk_rate); in mtk_dai_tdm_hw_params()
493 if (tdm_priv->bck_rate > tdm_priv->mclk_rate) in mtk_dai_tdm_hw_params()
496 if (tdm_priv->mclk_rate % tdm_priv->bck_rate != 0) in mtk_dai_tdm_hw_params()
502 tdm_priv->mclk_rate, tdm_priv->bck_rate); in mtk_dai_tdm_hw_params()
Dmt8183-dai-i2s.c49 int mclk_rate; member
314 mt8183_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate); in mtk_mclk_en_event()
317 i2s_priv->mclk_rate = 0; in mtk_mclk_en_event()
508 return (i2s_priv->mclk_rate > 0) ? 1 : 0; in mtk_afe_i2s_mclk_connect()
515 return (i2s_priv->mclk_rate > 0) ? 1 : 0; in mtk_afe_i2s_mclk_connect()
814 i2s_priv->mclk_rate = freq; in mtk_dai_i2s_set_sysclk()
827 share_i2s_priv->mclk_rate = i2s_priv->mclk_rate; in mtk_dai_i2s_set_sysclk()
/linux-6.6.21/sound/soc/mediatek/mt2701/
Dmt2701-wm8960.c30 unsigned int mclk_rate; in mt2701_wm8960_be_ops_hw_params() local
35 mclk_rate = rate * div_bck_over_lrck * div_mclk_over_bck; in mt2701_wm8960_be_ops_hw_params()
37 snd_soc_dai_set_sysclk(cpu_dai, 0, mclk_rate, SND_SOC_CLOCK_OUT); in mt2701_wm8960_be_ops_hw_params()
38 snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, SND_SOC_CLOCK_IN); in mt2701_wm8960_be_ops_hw_params()
Dmt2701-cs42448.c133 unsigned int mclk_rate; in mt2701_cs42448_be_ops_hw_params() local
138 mclk_rate = rate * div_bck_over_lrck * div_mclk_over_bck; in mt2701_cs42448_be_ops_hw_params()
141 snd_soc_dai_set_sysclk(cpu_dai, 0, mclk_rate, SND_SOC_CLOCK_OUT); in mt2701_cs42448_be_ops_hw_params()
144 snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, SND_SOC_CLOCK_IN); in mt2701_cs42448_be_ops_hw_params()
Dmt2701-afe-clock-ctrl.c278 if (!(MT2701_PLL_DOMAIN_0_RATE % i2s_path->mclk_rate)) in mt2701_mclk_configuration()
281 else if (!(MT2701_PLL_DOMAIN_1_RATE % i2s_path->mclk_rate)) in mt2701_mclk_configuration()
291 ret = clk_set_rate(i2s_path->div_ck, i2s_path->mclk_rate); in mt2701_mclk_configuration()
/linux-6.6.21/sound/soc/mediatek/mt8192/
Dmt8192-dai-tdm.c25 int mclk_rate; member
328 mt8192_mck_enable(afe, tdm_priv->mclk_id, tdm_priv->mclk_rate); in mtk_tdm_mck_en_event()
331 tdm_priv->mclk_rate = 0; in mtk_tdm_mck_en_event()
507 tdm_priv->mclk_rate = freq; in mtk_dai_tdm_cal_mclk()
530 if (!tdm_priv->mclk_rate) { in mtk_dai_tdm_hw_params()
531 tdm_priv->mclk_rate = rate * tdm_priv->mclk_multiple; in mtk_dai_tdm_hw_params()
534 tdm_priv->mclk_rate); in mtk_dai_tdm_hw_params()
542 if (tdm_priv->bck_rate > tdm_priv->mclk_rate) in mtk_dai_tdm_hw_params()
545 if (tdm_priv->mclk_rate % tdm_priv->bck_rate != 0) in mtk_dai_tdm_hw_params()
551 tdm_priv->mclk_rate, tdm_priv->bck_rate); in mtk_dai_tdm_hw_params()
/linux-6.6.21/sound/soc/codecs/
Dmax9860.c599 unsigned long mclk_rate; in max9860_probe() local
646 mclk_rate = clk_get_rate(mclk); in max9860_probe()
649 if (mclk_rate > 60000000 || mclk_rate < 10000000) { in max9860_probe()
651 mclk_rate); in max9860_probe()
655 if (mclk_rate >= 40000000) in max9860_probe()
657 else if (mclk_rate >= 20000000) in max9860_probe()
661 max9860->pclk_rate = mclk_rate >> (max9860->psclk - 1); in max9860_probe()
663 dev_dbg(dev, "mclk %lu pclk %lu\n", mclk_rate, max9860->pclk_rate); in max9860_probe()
Dda7213.c1390 if ((da7213->clk_src == clk_id) && (da7213->mclk_rate == freq)) in da7213_set_component_sysclk()
1426 da7213->mclk_rate = freq; in da7213_set_component_sysclk()
1444 if (da7213->mclk_rate == 32768) { in _da7213_set_component_pll()
1458 if (da7213->mclk_rate < 5000000) { in _da7213_set_component_pll()
1461 da7213->mclk_rate); in _da7213_set_component_pll()
1463 } else if (da7213->mclk_rate <= 9000000) { in _da7213_set_component_pll()
1466 } else if (da7213->mclk_rate <= 18000000) { in _da7213_set_component_pll()
1469 } else if (da7213->mclk_rate <= 36000000) { in _da7213_set_component_pll()
1472 } else if (da7213->mclk_rate <= 54000000) { in _da7213_set_component_pll()
1478 da7213->mclk_rate); in _da7213_set_component_pll()
[all …]
Dcs53l30.c38 u32 mclk_rate; member
459 u32 mclk_rate; member
533 static int cs53l30_get_mclk_coeff(int mclk_rate, int srate) in cs53l30_get_mclk_coeff() argument
538 if (cs53l30_mclk_coeffs[i].mclk_rate == mclk_rate && in cs53l30_get_mclk_coeff()
551 u32 mclk_rate; in cs53l30_set_sysclk() local
558 mclk_rate = cs53l30_mclkx_coeffs[mclkx_coeff].mclkx / in cs53l30_set_sysclk()
565 priv->mclk_rate = mclk_rate; in cs53l30_set_sysclk()
631 mclk_coeff = cs53l30_get_mclk_coeff(priv->mclk_rate, srate); in cs53l30_pcm_hw_params()
962 cs53l30->mclk_rate = 0; in cs53l30_i2c_probe()
Dwm9081.c148 int mclk_rate; member
647 if (wm9081->mclk_rate > 12225000) { in configure_clock()
649 wm9081->sysclk_rate = wm9081->mclk_rate / 2; in configure_clock()
651 wm9081->sysclk_rate = wm9081->mclk_rate; in configure_clock()
695 wm9081->mclk_rate, new_sysclk); in configure_clock()
702 wm9081->sysclk_rate = wm9081->mclk_rate; in configure_clock()
738 dev_dbg(component->dev, "Using %dHz MCLK\n", wm9081->mclk_rate); in clk_sys_event()
742 wm9081->mclk_rate); in clk_sys_event()
1176 wm9081->mclk_rate = freq; in wm9081_set_sysclk()
Dcs4234.c37 unsigned long mclk_rate; member
352 mclk_mult = cs4234->mclk_rate / cs4234->lrclk_rate; in cs4234_dai_hw_params()
448 int mclk = cs4234->mclk_rate; in cs4234_dai_rule_rate()
506 cs4234->rate_dividers[i].num = cs4234->mclk_rate / CS4234_MCLK_SCALE; in cs4234_dai_startup()
773 cs4234->mclk_rate = clk_get_rate(cs4234->mclk); in cs4234_i2c_probe()
775 if (cs4234->mclk_rate < 7680000 || cs4234->mclk_rate > 25600000) { in cs4234_i2c_probe()
Dwm8955.c41 unsigned int mclk_rate; member
261 if (wm8955->mclk_rate == clock_cfgs[i].mclk) in wm8955_configure_clocking()
282 ret = wm8955_pll_factors(component->dev, wm8955->mclk_rate, in wm8955_configure_clocking()
287 wm8955->fs, wm8955->mclk_rate); in wm8955_configure_clocking()
648 priv->mclk_rate = freq /= 2; in wm8955_set_sysclk()
651 priv->mclk_rate = freq; in wm8955_set_sysclk()
/linux-6.6.21/include/sound/sof/
Ddai-imx.h22 uint32_t mclk_rate; /* MCLK frequency in Hz */ member
43 uint32_t mclk_rate; /* MCLK frequency in Hz */ member
/linux-6.6.21/sound/soc/mediatek/mt8186/
Dmt8186-dai-tdm.c28 unsigned int mclk_rate; member
141 mt8186_mck_enable(afe, tdm_priv->mclk_id, tdm_priv->mclk_rate); in mtk_tdm_mck_en_event()
144 tdm_priv->mclk_rate = 0; in mtk_tdm_mck_en_event()
208 return (tdm_priv->mclk_rate > 0) ? 1 : 0; in mtk_afe_tdm_mclk_connect()
357 tdm_priv->mclk_rate = freq; in mtk_dai_tdm_cal_mclk()
394 if (!tdm_priv->mclk_rate) { in mtk_dai_tdm_hw_params()
395 tdm_priv->mclk_rate = rate * tdm_priv->mclk_multiple; in mtk_dai_tdm_hw_params()
396 mtk_dai_tdm_cal_mclk(afe, tdm_priv, tdm_priv->mclk_rate); in mtk_dai_tdm_hw_params()
Dmt8186-dai-i2s.c50 int mclk_rate; member
429 mt8186_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate); in mtk_mclk_en_event()
432 i2s_priv->mclk_rate = 0; in mtk_mclk_en_event()
605 return (i2s_priv->mclk_rate > 0) ? 1 : 0; in mtk_afe_i2s_mclk_connect()
612 return (i2s_priv->mclk_rate > 0) ? 1 : 0; in mtk_afe_i2s_mclk_connect()
1029 i2s_priv->mclk_rate = freq; in mtk_dai_i2s_set_sysclk()
1041 share_i2s_priv->mclk_rate = i2s_priv->mclk_rate; in mtk_dai_i2s_set_sysclk()
/linux-6.6.21/sound/soc/tegra/
Dtegra_asoc_machine.c295 unsigned int mclk = machine->asoc->mclk_rate(srate); in tegra_machine_hw_params()
649 .mclk_rate = tegra_machine_mclk_rate_12mhz,
713 .mclk_rate = tegra_machine_mclk_rate_12mhz,
748 .mclk_rate = tegra_machine_mclk_rate_12mhz,
781 .mclk_rate = tegra_machine_mclk_rate_12mhz,
829 .mclk_rate = tegra_machine_mclk_rate_128,
873 .mclk_rate = tegra_machine_mclk_rate_256,
907 .mclk_rate = tegra_machine_mclk_rate_256,
940 .mclk_rate = tegra_machine_mclk_rate_512,
973 .mclk_rate = tegra_machine_mclk_rate_6mhz,
Dtegra_wm8903.c142 .mclk_rate = tegra_wm8903_mclk_rate,
153 .mclk_rate = tegra_wm8903_mclk_rate,
/linux-6.6.21/drivers/spi/
Dspi-sun4i.c209 unsigned int mclk_rate, div, timeout; in sun4i_spi_transfer_one() local
269 mclk_rate = clk_get_rate(sspi->mclk); in sun4i_spi_transfer_one()
270 if (mclk_rate < (2 * tfr->speed_hz)) { in sun4i_spi_transfer_one()
272 mclk_rate = clk_get_rate(sspi->mclk); in sun4i_spi_transfer_one()
289 div = mclk_rate / (2 * tfr->speed_hz); in sun4i_spi_transfer_one()
296 div = ilog2(mclk_rate) - ilog2(tfr->speed_hz); in sun4i_spi_transfer_one()
Dspi-sun6i.c372 unsigned int mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one() local
375 if (mclk_rate < (2 * tfr->speed_hz)) { in sun6i_spi_transfer_one()
377 mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one()
394 div_cdr1 = DIV_ROUND_UP(mclk_rate, tfr->speed_hz); in sun6i_spi_transfer_one()
398 tfr->effective_speed_hz = mclk_rate / (2 * div_cdr2); in sun6i_spi_transfer_one()
402 tfr->effective_speed_hz = mclk_rate / (1 << div); in sun6i_spi_transfer_one()
Dspi-mpc512x-psc.c58 u32 mclk_rate; member
118 bclkdiv = (mps->mclk_rate / speed) - 1; in mpc512x_psc_spi_activate_cs()
419 bclkdiv = (mps->mclk_rate / speed) - 1; in mpc512x_psc_spi_port_config()
506 mps->mclk_rate = clk_get_rate(clk); in mpc512x_psc_spi_of_probe()
/linux-6.6.21/arch/arm/mach-ep93xx/
Dclock.c214 unsigned long best_rate = 0, actual_rate, mclk_rate; in ep93xx_mux_determine_rate() local
232 mclk_rate = __parent_rate * 2; in ep93xx_mux_determine_rate()
236 __div = mclk_rate / (rate * __pdiv); in ep93xx_mux_determine_rate()
240 actual_rate = mclk_rate / (__pdiv * __div); in ep93xx_mux_determine_rate()
279 unsigned long best_rate = 0, actual_rate, mclk_rate; in ep93xx_ddiv_set_rate() local
283 mclk_rate = parent_rate * 2; in ep93xx_ddiv_set_rate()
286 __div = mclk_rate / (rate * __pdiv); in ep93xx_ddiv_set_rate()
290 actual_rate = mclk_rate / (__pdiv * __div); in ep93xx_ddiv_set_rate()
/linux-6.6.21/sound/soc/fsl/
Dfsl_mqs.c79 unsigned long mclk_rate; in fsl_mqs_hw_params() local
83 mclk_rate = clk_get_rate(mqs_priv->mclk); in fsl_mqs_hw_params()
91 div = mclk_rate / (32 * lrclk * 2 * 8); in fsl_mqs_hw_params()
92 res = mclk_rate % (32 * lrclk * 2 * 8); in fsl_mqs_hw_params()
/linux-6.6.21/sound/soc/meson/
Daxg-tdm-interface.c109 iface->mclk_rate = freq; in axg_tdm_iface_set_sysclk()
266 if (!iface->mclk_rate) { in axg_tdm_iface_set_sclk()
271 if (iface->mclk_rate % srate) { in axg_tdm_iface_set_sclk()
274 srate, iface->mclk_rate); in axg_tdm_iface_set_sclk()
/linux-6.6.21/sound/soc/stm/
Dstm32_sai_sub.c110 unsigned int mclk_rate; member
564 if (sai->mclk_rate) { in stm32_sai_set_sysclk()
566 sai->mclk_rate = 0; in stm32_sai_set_sysclk()
586 sai->mclk_rate = freq; in stm32_sai_set_sysclk()
1010 if (!sai->mclk_rate) in stm32_sai_configure_clock()
1013 if (2 * sai_clk_rate >= 3 * sai->mclk_rate) { in stm32_sai_configure_clock()
1015 2 * sai->mclk_rate); in stm32_sai_configure_clock()
1035 if (sai->mclk_rate) { in stm32_sai_configure_clock()
1036 mclk_ratio = sai->mclk_rate / rate; in stm32_sai_configure_clock()
1051 sai->mclk_rate); in stm32_sai_configure_clock()

123