Home
last modified time | relevance | path

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

12

/Linux-v5.4/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-v5.4/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.c50 int mclk_rate; member
321 mt8183_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate); in mtk_mclk_en_event()
324 i2s_priv->mclk_rate = 0; in mtk_mclk_en_event()
515 return (i2s_priv->mclk_rate > 0) ? 1 : 0; in mtk_afe_i2s_mclk_connect()
522 return (i2s_priv->mclk_rate > 0) ? 1 : 0; in mtk_afe_i2s_mclk_connect()
824 i2s_priv->mclk_rate = freq; in mtk_dai_i2s_set_sysclk()
837 share_i2s_priv->mclk_rate = i2s_priv->mclk_rate; in mtk_dai_i2s_set_sysclk()
/Linux-v5.4/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()
Dmt2701-afe-common.h73 int mclk_rate; member
/Linux-v5.4/sound/soc/codecs/
Dmax9860.c600 unsigned long mclk_rate; in max9860_probe() local
651 mclk_rate = clk_get_rate(mclk); in max9860_probe()
654 if (mclk_rate > 60000000 || mclk_rate < 10000000) { in max9860_probe()
656 mclk_rate); in max9860_probe()
660 if (mclk_rate >= 40000000) in max9860_probe()
662 else if (mclk_rate >= 20000000) in max9860_probe()
666 max9860->pclk_rate = mclk_rate >> (max9860->psclk - 1); in max9860_probe()
668 dev_dbg(dev, "mclk %lu pclk %lu\n", mclk_rate, max9860->pclk_rate); in max9860_probe()
Dcs53l30.c37 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()
961 cs53l30->mclk_rate = 0; in cs53l30_i2c_probe()
Dda7213.c1344 if ((da7213->clk_src == clk_id) && (da7213->mclk_rate == freq)) in da7213_set_dai_sysclk()
1380 da7213->mclk_rate = freq; in da7213_set_dai_sysclk()
1398 if (da7213->mclk_rate == 32768) { in da7213_set_dai_pll()
1412 if (da7213->mclk_rate < 5000000) { in da7213_set_dai_pll()
1415 da7213->mclk_rate); in da7213_set_dai_pll()
1417 } else if (da7213->mclk_rate <= 9000000) { in da7213_set_dai_pll()
1420 } else if (da7213->mclk_rate <= 18000000) { in da7213_set_dai_pll()
1423 } else if (da7213->mclk_rate <= 36000000) { in da7213_set_dai_pll()
1426 } else if (da7213->mclk_rate <= 54000000) { in da7213_set_dai_pll()
1432 da7213->mclk_rate); in da7213_set_dai_pll()
[all …]
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()
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()
Dda7219.c1164 if ((da7219->clk_src == clk_id) && (da7219->mclk_rate == freq)) in da7219_set_dai_sysclk()
1204 da7219->mclk_rate = freq; in da7219_set_dai_sysclk()
1221 if (da7219->mclk_rate < 2000000) { in da7219_set_pll()
1223 da7219->mclk_rate); in da7219_set_pll()
1225 } else if (da7219->mclk_rate <= 4500000) { in da7219_set_pll()
1228 } else if (da7219->mclk_rate <= 9000000) { in da7219_set_pll()
1231 } else if (da7219->mclk_rate <= 18000000) { in da7219_set_pll()
1234 } else if (da7219->mclk_rate <= 36000000) { in da7219_set_pll()
1237 } else if (da7219->mclk_rate <= 54000000) { in da7219_set_pll()
1242 da7219->mclk_rate); in da7219_set_pll()
[all …]
Dda7210.c670 unsigned int mclk_rate; member
841 if (da7210->mclk_rate && (da7210->mclk_rate != sysclk)) { in da7210_hw_params()
958 da7210->mclk_rate = freq; in da7210_set_dai_sysclk()
1068 da7210->mclk_rate = 0; /* This will be set from set_sysclk() */ in da7210_probe()
Dda9055.c939 unsigned int mclk_rate; member
1122 if (da9055->mclk_rate) { in da9055_hw_params()
1136 if (da9055->mclk_rate && (da9055->mclk_rate != sysclk)) { in da9055_hw_params()
1254 da9055->mclk_rate = freq; in da9055_set_dai_sysclk()
/Linux-v5.4/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.c201 unsigned int mclk_rate, div, timeout; in sun6i_spi_transfer_one() local
270 mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one()
271 if (mclk_rate < (2 * tfr->speed_hz)) { in sun6i_spi_transfer_one()
273 mclk_rate = clk_get_rate(sspi->mclk); in sun6i_spi_transfer_one()
290 div = mclk_rate / (2 * tfr->speed_hz); in sun6i_spi_transfer_one()
297 div = ilog2(mclk_rate) - ilog2(tfr->speed_hz); in sun6i_spi_transfer_one()
Dspi-mpc512x-psc.c65 u32 mclk_rate; member
125 bclkdiv = (mps->mclk_rate / speed) - 1; in mpc512x_psc_spi_activate_cs()
441 bclkdiv = (mps->mclk_rate / speed) - 1; in mpc512x_psc_spi_port_config()
544 mps->mclk_rate = clk_get_rate(clk); in mpc512x_psc_spi_do_probe()
/Linux-v5.4/sound/soc/meson/
Daxg-tdm-interface.c111 iface->mclk_rate = freq; in axg_tdm_iface_set_sysclk()
261 if (!iface->mclk_rate) { in axg_tdm_iface_set_sclk()
266 if (iface->mclk_rate % srate) { in axg_tdm_iface_set_sclk()
269 srate, iface->mclk_rate); in axg_tdm_iface_set_sclk()
Daxg-tdm.h30 unsigned long mclk_rate; member
/Linux-v5.4/sound/soc/stm/
Dstm32_sai_sub.c111 unsigned int mclk_rate; member
515 if (sai->mclk_rate) { in stm32_sai_set_sysclk()
517 sai->mclk_rate = 0; in stm32_sai_set_sysclk()
537 sai->mclk_rate = freq; in stm32_sai_set_sysclk()
961 if (!sai->mclk_rate) in stm32_sai_configure_clock()
964 if (2 * sai_clk_rate >= 3 * sai->mclk_rate) { in stm32_sai_configure_clock()
966 2 * sai->mclk_rate); in stm32_sai_configure_clock()
986 if (sai->mclk_rate) { in stm32_sai_configure_clock()
987 mclk_ratio = sai->mclk_rate / rate; in stm32_sai_configure_clock()
1002 sai->mclk_rate); in stm32_sai_configure_clock()
/Linux-v5.4/arch/arm/mach-ep93xx/
Dclock.c363 unsigned long max_rate, actual_rate, mclk_rate, rate_err = -1; in calc_clk_div() local
386 mclk_rate = mclk->rate * 2; in calc_clk_div()
390 __div = mclk_rate / (rate * __pdiv); in calc_clk_div()
394 actual_rate = mclk_rate / (__pdiv * __div); in calc_clk_div()
/Linux-v5.4/sound/soc/rockchip/
Drockchip_i2s.c277 unsigned int mclk_rate, bclk_rate, div_bclk, div_lrck; in rockchip_i2s_hw_params() local
280 mclk_rate = clk_get_rate(i2s->mclk); in rockchip_i2s_hw_params()
282 if (bclk_rate && mclk_rate % bclk_rate) in rockchip_i2s_hw_params()
285 div_bclk = mclk_rate / bclk_rate; in rockchip_i2s_hw_params()
/Linux-v5.4/drivers/mfd/
Dtwl6040.c359 twl6040->mclk_rate = 0; in twl6040_power()
385 twl6040->mclk_rate = 0; in twl6040_set_pll()
446 if (twl6040->mclk_rate != freq_in) { in twl6040_set_pll()
496 twl6040->mclk_rate = freq_in; in twl6040_set_pll()
/Linux-v5.4/drivers/gpu/drm/bridge/
Dsii902x.c503 unsigned long mclk_rate; in sii902x_audio_hw_params() local
574 mclk_rate = clk_get_rate(sii902x->audio.mclk); in sii902x_audio_hw_params()
576 params->sample_rate, mclk_rate); in sii902x_audio_hw_params()
577 if (mclk_rate != ret * params->sample_rate) in sii902x_audio_hw_params()
579 mclk_rate, ret, params->sample_rate); in sii902x_audio_hw_params()

12