/linux-6.12.1/sound/soc/intel/boards/ |
D | sof_da7219.c | 113 int mclk_rate, ret; in da7219_codec_init() local 115 mclk_rate = sof_dai_get_mclk(rtd); in da7219_codec_init() 116 if (mclk_rate <= 0) { in da7219_codec_init() 117 dev_err(rtd->dev, "invalid mclk freq %d\n", mclk_rate); in da7219_codec_init() 121 ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK, mclk_rate, in da7219_codec_init() 133 (mclk_rate == 12288000 || mclk_rate == 24576000)) { in da7219_codec_init() 135 dev_dbg(rtd->dev, "pll bypass mode, mclk rate %d\n", mclk_rate); in da7219_codec_init()
|
/linux-6.12.1/sound/soc/mediatek/mt8183/ |
D | mt8183-dai-tdm.c | 23 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()
|
D | mt8183-dai-i2s.c | 49 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.12.1/sound/soc/mediatek/mt8192/ |
D | mt8192-dai-tdm.c | 25 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.12.1/sound/soc/mediatek/mt2701/ |
D | mt2701-wm8960.c | 30 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()
|
D | mt2701-cs42448.c | 132 unsigned int mclk_rate; in mt2701_cs42448_be_ops_hw_params() local 137 mclk_rate = rate * div_bck_over_lrck * div_mclk_over_bck; in mt2701_cs42448_be_ops_hw_params() 140 snd_soc_dai_set_sysclk(cpu_dai, 0, mclk_rate, SND_SOC_CLOCK_OUT); in mt2701_cs42448_be_ops_hw_params() 143 snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, SND_SOC_CLOCK_IN); in mt2701_cs42448_be_ops_hw_params()
|
D | mt2701-afe-clock-ctrl.c | 278 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.12.1/sound/soc/codecs/ |
D | max9860.c | 599 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()
|
D | da7213.c | 1555 if ((da7213->clk_src == clk_id) && (da7213->mclk_rate == freq)) in da7213_set_component_sysclk() 1591 da7213->mclk_rate = freq; in da7213_set_component_sysclk() 1609 if (da7213->mclk_rate == 32768) { in _da7213_set_component_pll() 1623 if (da7213->mclk_rate < 5000000) { in _da7213_set_component_pll() 1626 da7213->mclk_rate); in _da7213_set_component_pll() 1628 } else if (da7213->mclk_rate <= 9000000) { in _da7213_set_component_pll() 1631 } else if (da7213->mclk_rate <= 18000000) { in _da7213_set_component_pll() 1634 } else if (da7213->mclk_rate <= 36000000) { in _da7213_set_component_pll() 1637 } else if (da7213->mclk_rate <= 54000000) { in _da7213_set_component_pll() 1643 da7213->mclk_rate); in _da7213_set_component_pll() [all …]
|
D | cs53l30.c | 37 u32 mclk_rate; member 458 u32 mclk_rate; member 532 static int cs53l30_get_mclk_coeff(int mclk_rate, int srate) in cs53l30_get_mclk_coeff() argument 537 if (cs53l30_mclk_coeffs[i].mclk_rate == mclk_rate && in cs53l30_get_mclk_coeff() 550 u32 mclk_rate; in cs53l30_set_sysclk() local 557 mclk_rate = cs53l30_mclkx_coeffs[mclkx_coeff].mclkx / in cs53l30_set_sysclk() 564 priv->mclk_rate = mclk_rate; in cs53l30_set_sysclk() 630 mclk_coeff = cs53l30_get_mclk_coeff(priv->mclk_rate, srate); in cs53l30_pcm_hw_params() 943 cs53l30->mclk_rate = 0; in cs53l30_i2c_probe()
|
D | wm9081.c | 148 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()
|
D | cs4234.c | 37 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()
|
D | wm8955.c | 41 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.12.1/include/sound/sof/ |
D | dai-imx.h | 22 uint32_t mclk_rate; /* MCLK frequency in Hz */ member 43 uint32_t mclk_rate; /* MCLK frequency in Hz */ member
|
/linux-6.12.1/sound/soc/mediatek/mt8186/ |
D | mt8186-dai-tdm.c | 28 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()
|
D | mt8186-dai-i2s.c | 50 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.12.1/sound/soc/tegra/ |
D | tegra_asoc_machine.c | 298 unsigned int mclk = machine->asoc->mclk_rate(srate); in tegra_machine_hw_params() 652 .mclk_rate = tegra_machine_mclk_rate_12mhz, 716 .mclk_rate = tegra_machine_mclk_rate_12mhz, 751 .mclk_rate = tegra_machine_mclk_rate_12mhz, 784 .mclk_rate = tegra_machine_mclk_rate_12mhz, 832 .mclk_rate = tegra_machine_mclk_rate_128, 876 .mclk_rate = tegra_machine_mclk_rate_256, 910 .mclk_rate = tegra_machine_mclk_rate_256, 943 .mclk_rate = tegra_machine_mclk_rate_512, 976 .mclk_rate = tegra_machine_mclk_rate_6mhz,
|
D | tegra_wm8903.c | 142 .mclk_rate = tegra_wm8903_mclk_rate, 153 .mclk_rate = tegra_wm8903_mclk_rate,
|
/linux-6.12.1/drivers/spi/ |
D | spi-sun4i.c | 209 unsigned int mclk_rate, div; in sun4i_spi_transfer_one() local 270 mclk_rate = clk_get_rate(sspi->mclk); in sun4i_spi_transfer_one() 271 if (mclk_rate < (2 * tfr->speed_hz)) { in sun4i_spi_transfer_one() 273 mclk_rate = clk_get_rate(sspi->mclk); in sun4i_spi_transfer_one() 290 div = mclk_rate / (2 * tfr->speed_hz); in sun4i_spi_transfer_one() 297 div = ilog2(mclk_rate) - ilog2(tfr->speed_hz); in sun4i_spi_transfer_one()
|
D | spi-sun6i.c | 373 unsigned int mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one() local 376 if (mclk_rate < (2 * tfr->speed_hz)) { in sun6i_spi_transfer_one() 378 mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one() 395 div_cdr1 = DIV_ROUND_UP(mclk_rate, tfr->speed_hz); in sun6i_spi_transfer_one() 399 tfr->effective_speed_hz = mclk_rate / (2 * div_cdr2); in sun6i_spi_transfer_one() 403 tfr->effective_speed_hz = mclk_rate / (1 << div); in sun6i_spi_transfer_one()
|
D | spi-mpc512x-psc.c | 58 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.12.1/sound/soc/fsl/ |
D | fsl_mqs.c | 83 unsigned long mclk_rate; in fsl_mqs_hw_params() local 87 mclk_rate = clk_get_rate(mqs_priv->mclk); in fsl_mqs_hw_params() 95 div = mclk_rate / (32 * lrclk * 2 * 8); in fsl_mqs_hw_params() 96 res = mclk_rate % (32 * lrclk * 2 * 8); in fsl_mqs_hw_params()
|
/linux-6.12.1/drivers/clk/ |
D | clk-ep93xx.c | 235 unsigned long best_rate = 0, actual_rate, mclk_rate; in ep93xx_mux_determine_rate() local 256 mclk_rate = parent_rate * 2; in ep93xx_mux_determine_rate() 260 div = DIV_ROUND_CLOSEST(mclk_rate, rate * pdiv); in ep93xx_mux_determine_rate() 264 actual_rate = DIV_ROUND_CLOSEST(mclk_rate, pdiv * div); in ep93xx_mux_determine_rate() 306 unsigned long actual_rate, mclk_rate, rate_err = ULONG_MAX; in ep93xx_ddiv_set_rate() local 310 mclk_rate = parent_rate * 2; in ep93xx_ddiv_set_rate() 313 div = DIV_ROUND_CLOSEST(mclk_rate, rate * pdiv); in ep93xx_ddiv_set_rate() 317 actual_rate = DIV_ROUND_CLOSEST(mclk_rate, pdiv * div); in ep93xx_ddiv_set_rate()
|
/linux-6.12.1/sound/soc/meson/ |
D | axg-tdm-interface.c | 112 iface->mclk_rate = freq; in axg_tdm_iface_set_sysclk() 277 if (!iface->mclk_rate) { in axg_tdm_iface_set_sclk() 282 if (iface->mclk_rate % srate) { in axg_tdm_iface_set_sclk() 285 srate, iface->mclk_rate); in axg_tdm_iface_set_sclk()
|
/linux-6.12.1/drivers/ufs/host/ |
D | ufs-exynos.c | 242 rx_line_reset_period = (RX_LINE_RESET_TIME * ufs->mclk_rate) / NSEC_PER_MSEC; in exynosauto_ufs_pre_link() 243 tx_line_reset_period = (TX_LINE_RESET_TIME * ufs->mclk_rate) / NSEC_PER_MSEC; in exynosauto_ufs_pre_link() 248 DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); in exynosauto_ufs_pre_link() 265 DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); in exynosauto_ufs_pre_link() 453 ufs->mclk_rate = clk_get_rate(ufs->clk_unipro_main); in exynos_ufs_get_clk_info() 941 DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); in exynos_ufs_config_unipro() 1740 DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); in fsd_ufs_pre_link() 1746 DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); in fsd_ufs_pre_link() 1752 DIV_ROUND_UP(NSEC_PER_SEC, ufs->mclk_rate)); in fsd_ufs_pre_link() 1831 return (16 * 1000 * 1000000UL / ufs->mclk_rate); in get_mclk_period_unipro_18() [all …]
|