Home
last modified time | relevance | path

Searched refs:mclk (Results 1 – 25 of 71) sorted by relevance

123

/sound/soc/atmel/
Dsam9g20_wm8731.c62 static struct clk *mclk; variable
75 ret = clk_enable(mclk); in at91sam9g20ek_set_bias_level()
83 clk_disable(mclk); in at91sam9g20ek_set_bias_level()
180 mclk = clk_get(NULL, "pck0"); in at91sam9g20ek_audio_probe()
181 if (IS_ERR(mclk)) { in at91sam9g20ek_audio_probe()
183 ret = PTR_ERR(mclk); in at91sam9g20ek_audio_probe()
193 ret = clk_set_parent(mclk, pllb); in at91sam9g20ek_audio_probe()
200 clk_set_rate(mclk, MCLK_RATE); in at91sam9g20ek_audio_probe()
245 clk_put(mclk); in at91sam9g20ek_audio_probe()
246 mclk = NULL; in at91sam9g20ek_audio_probe()
[all …]
/sound/soc/davinci/
Ddavinci-evm.c28 struct clk *mclk; member
39 if (drvdata->mclk) in evm_startup()
40 return clk_prepare_enable(drvdata->mclk); in evm_startup()
52 if (drvdata->mclk) in evm_shutdown()
53 clk_disable_unprepare(drvdata->mclk); in evm_shutdown()
365 struct clk *mclk; in davinci_evm_probe() local
385 mclk = devm_clk_get(&pdev->dev, "mclk"); in davinci_evm_probe()
386 if (PTR_ERR(mclk) == -EPROBE_DEFER) { in davinci_evm_probe()
388 } else if (IS_ERR(mclk)) { in davinci_evm_probe()
390 mclk = NULL; in davinci_evm_probe()
[all …]
/sound/soc/rockchip/
Drockchip_spdif.c38 struct clk *mclk; member
61 clk_disable_unprepare(spdif->mclk); in rk_spdif_runtime_suspend()
72 ret = clk_prepare_enable(spdif->mclk); in rk_spdif_runtime_resume()
93 int srate, mclk; in rk_spdif_hw_params() local
101 mclk = 96000 * 128; /* 12288000 hz */ in rk_spdif_hw_params()
104 mclk = 44100 * 256; /* 11289600 hz */ in rk_spdif_hw_params()
107 mclk = 192000 * 128; /* 24576000 hz */ in rk_spdif_hw_params()
128 ret = clk_set_rate(spdif->mclk, mclk); in rk_spdif_hw_params()
135 val |= SPDIF_CFGR_CLK_DIV(mclk/(srate * 256)); in rk_spdif_hw_params()
316 spdif->mclk = devm_clk_get(&pdev->dev, "mclk"); in rk_spdif_probe()
[all …]
Drockchip_rt5645.c77 int mclk; in rk_aif1_hw_params() local
84 mclk = 12288000; in rk_aif1_hw_params()
87 mclk = 11289600; in rk_aif1_hw_params()
93 ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk, in rk_aif1_hw_params()
100 ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, in rk_aif1_hw_params()
Drockchip_max98090.c78 int mclk; in rk_aif1_hw_params() local
85 mclk = 12288000; in rk_aif1_hw_params()
88 mclk = 11289600; in rk_aif1_hw_params()
94 ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk, in rk_aif1_hw_params()
101 ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, in rk_aif1_hw_params()
Drockchip_i2s.c30 struct clk *mclk; member
50 clk_disable_unprepare(i2s->mclk); in i2s_runtime_suspend()
60 ret = clk_prepare_enable(i2s->mclk); in i2s_runtime_resume()
329 ret = clk_set_rate(i2s->mclk, freq); in rockchip_i2s_set_sysclk()
477 i2s->mclk = devm_clk_get(&pdev->dev, "i2s_clk"); in rockchip_i2s_probe()
478 if (IS_ERR(i2s->mclk)) { in rockchip_i2s_probe()
480 return PTR_ERR(i2s->mclk); in rockchip_i2s_probe()
555 clk_disable_unprepare(i2s->mclk); in rockchip_i2s_remove()
/sound/soc/mxs/
Dmxs-sgtl5000.c39 u32 mclk; in mxs_sgtl5000_hw_params() local
45 mclk = 256 * rate; in mxs_sgtl5000_hw_params()
48 mclk = 512 * rate; in mxs_sgtl5000_hw_params()
53 ret = snd_soc_dai_set_sysclk(codec_dai, SGTL5000_SYSCLK, mclk, 0); in mxs_sgtl5000_hw_params()
56 mclk / 1000000, mclk / 1000 % 1000); in mxs_sgtl5000_hw_params()
61 ret = snd_soc_dai_set_sysclk(cpu_dai, MXS_SAIF_MCLK, mclk, 0); in mxs_sgtl5000_hw_params()
64 mclk / 1000000, mclk / 1000 % 1000); in mxs_sgtl5000_hw_params()
Dmxs-saif.c67 saif->mclk = freq; in mxs_saif_set_dai_sysclk()
90 unsigned int mclk, in mxs_saif_set_clk() argument
97 dev_dbg(saif->dev, "mclk %d rate %d\n", mclk, rate); in mxs_saif_set_clk()
131 if (mclk % 32 == 0) { in mxs_saif_set_clk()
134 } else if (mclk % 48 == 0) { in mxs_saif_set_clk()
165 switch (mclk / rate) { in mxs_saif_set_clk()
238 int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk, in mxs_saif_get_mclk() argument
270 ret = mxs_saif_set_clk(saif, mclk, rate); in mxs_saif_get_mclk()
405 if (!saif->mclk && saif->mclk_in_use) { in mxs_saif_hw_params()
421 ret = mxs_saif_set_clk(saif, saif->mclk, params_rate(params)); in mxs_saif_hw_params()
/sound/soc/codecs/
Dwm8731.c49 struct clk *mclk; member
252 u32 mclk; member
325 static inline int get_coeff(int mclk, int rate) in get_coeff() argument
330 if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk) in get_coeff()
391 if (wm8731->mclk && clk_set_rate(wm8731->mclk, freq)) in wm8731_set_dai_sysclk()
494 if (wm8731->mclk) { in wm8731_set_bias_level()
495 ret = clk_prepare_enable(wm8731->mclk); in wm8731_set_bias_level()
517 if (wm8731->mclk) in wm8731_set_bias_level()
518 clk_disable_unprepare(wm8731->mclk); in wm8731_set_bias_level()
669 wm8731->mclk = devm_clk_get(&spi->dev, "mclk"); in wm8731_spi_probe()
[all …]
Dtas571x.c46 struct clk *mclk; member
183 if (!IS_ERR(priv->mclk)) { in tas571x_set_bias_level()
184 ret = clk_prepare_enable(priv->mclk); in tas571x_set_bias_level()
206 if (!IS_ERR(priv->mclk)) in tas571x_set_bias_level()
207 clk_disable_unprepare(priv->mclk); in tas571x_set_bias_level()
395 priv->mclk = devm_clk_get(dev, "mclk"); in tas571x_i2c_probe()
396 if (IS_ERR(priv->mclk) && PTR_ERR(priv->mclk) != -ENOENT) { in tas571x_i2c_probe()
398 PTR_ERR(priv->mclk)); in tas571x_i2c_probe()
399 return PTR_ERR(priv->mclk); in tas571x_i2c_probe()
Dtlv320aic23.c192 int mclk; member
247 static int find_rate(int mclk, u32 need_adc, u32 need_dac) in find_rate() argument
266 int base = mclk / bosr_usb_divisor_table[i]; in find_rate()
300 static void get_current_sample_rates(struct snd_soc_codec *codec, int mclk, in get_current_sample_rates() argument
305 int val = (mclk / bosr_usb_divisor_table[src & 3]); in get_current_sample_rates()
317 static int set_sample_rate_control(struct snd_soc_codec *codec, int mclk, in set_sample_rate_control() argument
321 int data = find_rate(mclk, sample_rate_adc, sample_rate_dac); in set_sample_rate_control()
331 get_current_sample_rates(codec, mclk, &adc, &dac); in set_sample_rate_control()
360 ret = set_sample_rate_control(codec, aic23->mclk, sample_rate_adc, in tlv320aic23_hw_params()
480 aic23->mclk = freq; in tlv320aic23_set_dai_sysclk()
Dwm8737.c46 unsigned int mclk; member
281 u32 mclk; member
341 if (coeff_div[i].mclk == wm8737->mclk) in wm8737_hw_params()
344 if (coeff_div[i].mclk == wm8737->mclk * 2) { in wm8737_hw_params()
352 wm8737->mclk, params_rate(params)); in wm8737_hw_params()
390 if (freq == coeff_div[i].mclk || in wm8737_set_dai_sysclk()
391 freq == coeff_div[i].mclk * 2) { in wm8737_set_dai_sysclk()
392 wm8737->mclk = freq; in wm8737_set_dai_sysclk()
Dml26124.c47 u32 mclk; member
55 u32 mclk; member
326 static inline int get_coeff(int mclk, int rate) in get_coeff() argument
331 if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk) in get_coeff()
343 int i = get_coeff(priv->mclk, params_rate(hw_params)); in ml26124_hw_params()
352 switch (priv->mclk / params_rate(hw_params)) { in ml26124_hw_params()
467 priv->mclk = freq; in ml26124_set_dai_sysclk()
Dcs42l73.c45 u32 mclk; member
792 u32 mclk; member
872 static int cs42l73_get_mclk_coeff(int mclk, int srate) in cs42l73_get_mclk_coeff() argument
877 if (cs42l73_mclk_coeffs[i].mclk == mclk && in cs42l73_get_mclk_coeff()
891 u32 mclk = 0; in cs42l73_set_mclk() local
899 mclk = cs42l73_mclkx_coeffs[mclkx_coeff].mclkx / in cs42l73_set_mclk()
904 mclk); in cs42l73_set_mclk()
912 priv->mclk = mclk; in cs42l73_set_mclk()
1068 cs42l73_get_mclk_coeff(priv->mclk, srate); in cs42l73_pcm_hw_params()
1075 id, priv->mclk, srate, in cs42l73_pcm_hw_params()
[all …]
Dtlv320aic32x4.c51 u32 mclk; member
72 struct clk *mclk; member
301 static inline int aic32x4_get_divs(int mclk, int rate) in aic32x4_get_divs() argument
307 && (aic32x4_divs[i].mclk == mclk)) { in aic32x4_get_divs()
506 ret = clk_prepare_enable(aic32x4->mclk); in aic32x4_set_bias_level()
564 clk_disable_unprepare(aic32x4->mclk); in aic32x4_set_bias_level()
819 aic32x4->mclk = devm_clk_get(&i2c->dev, "mclk"); in aic32x4_i2c_probe()
820 if (IS_ERR(aic32x4->mclk)) { in aic32x4_i2c_probe()
822 return PTR_ERR(aic32x4->mclk); in aic32x4_i2c_probe()
Dtlv320aic26.c36 int mclk; member
108 jval = fsref / (aic26->mclk / 2048); in aic26_hw_params()
110 dval = fsref - (jval * (aic26->mclk / 2048)); in aic26_hw_params()
111 dval = (10000 * dval) / (aic26->mclk / 2048); in aic26_hw_params()
168 aic26->mclk = freq; in aic26_set_sysclk()
Dwm8960.c124 struct clk *mclk; member
801 if (!IS_ERR(wm8960->mclk)) { in wm8960_set_bias_level_out3()
802 ret = clk_prepare_enable(wm8960->mclk); in wm8960_set_bias_level_out3()
827 if (!IS_ERR(wm8960->mclk)) in wm8960_set_bias_level_out3()
828 clk_disable_unprepare(wm8960->mclk); in wm8960_set_bias_level_out3()
924 if (!IS_ERR(wm8960->mclk)) { in wm8960_set_bias_level_capless()
925 ret = clk_prepare_enable(wm8960->mclk); in wm8960_set_bias_level_capless()
948 if (!IS_ERR(wm8960->mclk)) in wm8960_set_bias_level_capless()
949 clk_disable_unprepare(wm8960->mclk); in wm8960_set_bias_level_capless()
1297 wm8960->mclk = devm_clk_get(&i2c->dev, "mclk"); in wm8960_i2c_probe()
[all …]
/sound/soc/cirrus/
Dep93xx-i2s.c65 struct clk *mclk; member
106 clk_enable(info->mclk); in ep93xx_i2s_enable()
144 clk_disable(info->mclk); in ep93xx_i2s_disable()
285 div = clk_get_rate(info->mclk) / params_rate(params); in ep93xx_i2s_hw_params()
295 err = clk_set_rate(info->sclk, clk_get_rate(info->mclk) / sdiv); in ep93xx_i2s_hw_params()
315 return clk_set_rate(info->mclk, freq); in ep93xx_i2s_set_sysclk()
397 info->mclk = clk_get(&pdev->dev, "mclk"); in ep93xx_i2s_probe()
398 if (IS_ERR(info->mclk)) { in ep93xx_i2s_probe()
399 err = PTR_ERR(info->mclk); in ep93xx_i2s_probe()
435 clk_put(info->mclk); in ep93xx_i2s_probe()
[all …]
/sound/soc/tegra/
Dtegra_wm8753.c60 int srate, mclk; in tegra_wm8753_hw_params() local
69 mclk = 11289600; in tegra_wm8753_hw_params()
72 mclk = 12288000; in tegra_wm8753_hw_params()
76 err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk); in tegra_wm8753_hw_params()
82 err = snd_soc_dai_set_sysclk(codec_dai, WM8753_MCLK, mclk, in tegra_wm8753_hw_params()
Dtegra_max98090.c55 int srate, mclk; in tegra_max98090_asoc_hw_params() local
67 mclk = 12288000; in tegra_max98090_asoc_hw_params()
73 mclk = 11289600; in tegra_max98090_asoc_hw_params()
76 mclk = 12000000; in tegra_max98090_asoc_hw_params()
80 err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk); in tegra_max98090_asoc_hw_params()
86 err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, in tegra_max98090_asoc_hw_params()
Dtegra_wm8903.c65 int srate, mclk; in tegra_wm8903_hw_params() local
73 mclk = 128 * srate; in tegra_wm8903_hw_params()
76 mclk = 256 * srate; in tegra_wm8903_hw_params()
80 while (mclk < 6000000) in tegra_wm8903_hw_params()
81 mclk *= 2; in tegra_wm8903_hw_params()
83 err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk); in tegra_wm8903_hw_params()
89 err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, in tegra_wm8903_hw_params()
Dtrimslice.c55 int srate, mclk; in trimslice_asoc_hw_params() local
59 mclk = 128 * srate; in trimslice_asoc_hw_params()
61 err = tegra_asoc_utils_set_rate(&trimslice->util_data, srate, mclk); in trimslice_asoc_hw_params()
67 err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, in trimslice_asoc_hw_params()
Dtegra_asoc_utils.c33 int mclk) in tegra_asoc_utils_set_rate() argument
69 (mclk != data->set_mclk)); in tegra_asoc_utils_set_rate()
86 err = clk_set_rate(data->clk_pll_a_out0, mclk); in tegra_asoc_utils_set_rate()
113 data->set_mclk = mclk; in tegra_asoc_utils_set_rate()
Dtegra_alc5632.c46 int srate, mclk; in tegra_alc5632_asoc_hw_params() local
50 mclk = 512 * srate; in tegra_alc5632_asoc_hw_params()
52 err = tegra_asoc_utils_set_rate(&alc5632->util_data, srate, mclk); in tegra_alc5632_asoc_hw_params()
58 err = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, in tegra_alc5632_asoc_hw_params()
Dtegra_rt5640.c57 int srate, mclk; in tegra_rt5640_asoc_hw_params() local
61 mclk = 256 * srate; in tegra_rt5640_asoc_hw_params()
63 err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk); in tegra_rt5640_asoc_hw_params()
69 err = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_MCLK, mclk, in tegra_rt5640_asoc_hw_params()

123