/sound/soc/fsl/ |
D | fsl_esai.c | 124 static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio, in fsl_esai_divisor_cal() argument 135 if (ratio > 2 * 8 * 256 * maxfp || ratio < 2) { in fsl_esai_divisor_cal() 139 } else if (ratio % 2) { in fsl_esai_divisor_cal() 144 ratio /= 2; in fsl_esai_divisor_cal() 146 psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8; in fsl_esai_divisor_cal() 157 if (prod == ratio) in fsl_esai_divisor_cal() 159 else if (prod / ratio == 1) in fsl_esai_divisor_cal() 160 sub = prod - ratio; in fsl_esai_divisor_cal() 161 else if (ratio / prod == 1) in fsl_esai_divisor_cal() 162 sub = ratio - prod; in fsl_esai_divisor_cal() [all …]
|
D | fsl_sai.c | 322 u32 savediv = 0, ratio, savesub = freq; in fsl_sai_set_bclk() local 335 ratio = clk_rate / freq; in fsl_sai_set_bclk() 337 ret = clk_rate - ratio * freq; in fsl_sai_set_bclk() 348 ratio, freq, clk_rate); in fsl_sai_set_bclk() 350 if (ratio % 2 == 0 && ratio >= 2 && ratio <= 512) in fsl_sai_set_bclk() 351 ratio /= 2; in fsl_sai_set_bclk() 356 savediv = ratio; in fsl_sai_set_bclk()
|
D | fsl_asrc.c | 198 unsigned long ratio; in fsl_asrc_set_ideal_ratio() local 207 ratio = (inrate / outrate) << IDEAL_RATIO_DECIMAL_DEPTH; in fsl_asrc_set_ideal_ratio() 218 ratio |= 1 << (IDEAL_RATIO_DECIMAL_DEPTH - i); in fsl_asrc_set_ideal_ratio() 225 regmap_write(asrc_priv->regmap, REG_ASRIDRL(index), ratio); in fsl_asrc_set_ideal_ratio() 226 regmap_write(asrc_priv->regmap, REG_ASRIDRH(index), ratio >> 24); in fsl_asrc_set_ideal_ratio()
|
/sound/soc/codecs/ |
D | wm8974.c | 390 unsigned int ratio = 2 * f_in / f_out; in wm8974_get_mclkdiv() local 392 if (ratio <= 2) { in wm8974_get_mclkdiv() 394 ratio = 2; in wm8974_get_mclkdiv() 395 } else if (ratio == 3) { in wm8974_get_mclkdiv() 397 } else if (ratio == 4) { in wm8974_get_mclkdiv() 399 } else if (ratio <= 6) { in wm8974_get_mclkdiv() 401 ratio = 6; in wm8974_get_mclkdiv() 402 } else if (ratio <= 8) { in wm8974_get_mclkdiv() 404 ratio = 8; in wm8974_get_mclkdiv() 405 } else if (ratio <= 12) { in wm8974_get_mclkdiv() [all …]
|
D | arizona.c | 1921 int ratio; member 2007 return fll_fratios[i].ratio; in arizona_find_fratio() 2019 int init_ratio, ratio; in arizona_calc_fratio() local 2069 for (ratio = init_ratio; ratio > 0; ratio--) { in arizona_calc_fratio() 2070 if (target % (ratio * Fref)) { in arizona_calc_fratio() 2072 cfg->fratio = ratio - 1; in arizona_calc_fratio() 2075 Fref, refdiv, div, ratio); in arizona_calc_fratio() 2076 return ratio; in arizona_calc_fratio() 2080 for (ratio = init_ratio + 1; ratio <= ARIZONA_FLL_MAX_FRATIO; in arizona_calc_fratio() 2081 ratio++) { in arizona_calc_fratio() [all …]
|
D | wm8523.c | 105 int ratio; member 118 int ratio; member 160 lrclk_ratios[i].ratio) in wm8523_hw_params() 177 if (params_width(params) * 2 <= bclk_ratios[i].ratio) in wm8523_hw_params() 224 val = freq / lrclk_ratios[i].ratio; in wm8523_set_dai_sysclk()
|
D | cs42l51.c | 296 unsigned int ratio; member 345 unsigned int ratio; in cs42l51_hw_params() local 365 ratio = cs42l51->mclk / rate; /* MCLK/LRCK ratio */ in cs42l51_hw_params() 367 if (ratios[i].ratio == ratio) in cs42l51_hw_params()
|
D | cs4270.c | 191 unsigned int ratio; member 334 unsigned int ratio; in cs4270_hw_params() local 340 ratio = cs4270->mclk / rate; /* MCLK/LRCK ratio */ in cs4270_hw_params() 343 if (cs4270_mode_ratios[i].ratio == ratio) in cs4270_hw_params()
|
D | wm9081.c | 90 int ratio; member 457 int ratio; member 512 target /= fll_fratios[i].ratio; in fll_factors() 673 target = wm9081->fs * clk_sys_rates[i].ratio; in configure_clock() 685 new_sysclk = clk_sys_rates[i].ratio in configure_clock() 1058 best_val = abs((wm9081->sysclk_rate / clk_sys_rates[0].ratio) in wm9081_hw_params() 1062 clk_sys_rates[i].ratio) - wm9081->fs); in wm9081_hw_params() 1069 clk_sys_rates[best].ratio); in wm9081_hw_params()
|
D | cs4271.c | 312 unsigned short ratio; /* MCLK / sample rate */ member 355 unsigned int ratio, val; in cs4271_hw_params() local 394 ratio = cs4271->mclk / cs4271->rate; in cs4271_hw_params() 398 (cs4271_clk_tab[i].ratio == ratio)) in cs4271_hw_params()
|
D | cs42xx8.c | 177 unsigned int ratio; member 258 u32 ratio = cs42xx8->sysclk / params_rate(params); in cs42xx8_hw_params() local 265 if (cs42xx8_ratios[i].ratio == ratio) in cs42xx8_hw_params()
|
D | cs42l56.c | 644 u8 ratio; member 723 return clk_ratio_table[i].ratio; in cs42l56_get_mclk_ratio() 878 int ratio; in cs42l56_pcm_hw_params() local 880 ratio = cs42l56_get_mclk_ratio(cs42l56->mclk, params_rate(params)); in cs42l56_pcm_hw_params() 881 if (ratio >= 0) { in cs42l56_pcm_hw_params() 883 CS42L56_CLK_RATIO_MASK, ratio); in cs42l56_pcm_hw_params()
|
D | wm8580.c | 511 int i, ratio, osr; in wm8580_paif_hw_params() local 535 ratio = wm8580->sysclk[dai->driver->id] / params_rate(params); in wm8580_paif_hw_params() 537 if (ratio == wm8580_sysclk_ratios[i]) in wm8580_paif_hw_params() 549 switch (ratio) { in wm8580_paif_hw_params()
|
D | wm8350.c | 968 int ratio; /* FLL_FRATIO */ member 995 fll_div->ratio = 1; in fll_factors() 997 fll_div->ratio = 8; in fll_factors() 1000 t2 = input * fll_div->ratio; in fll_factors() 1050 fll_div.ratio); in wm8350_set_fll() 1058 (fll_div.ratio << 11) | (fll_div. in wm8350_set_fll() 1065 (fll_div.ratio == 8 ? WM8350_FLL_SLOW_LOCK_REF : 0)); in wm8350_set_fll()
|
D | sta32x.c | 658 unsigned int rate, ratio; in sta32x_hw_params() local 668 ratio = sta32x->mclk / rate; in sta32x_hw_params() 669 dev_dbg(codec->dev, "rate: %u, ratio: %u\n", rate, ratio); in sta32x_hw_params() 684 if (mcs_ratio_table[ir][i] == ratio) { in sta32x_hw_params() 691 dev_err(codec->dev, "Unresolvable ratio: %u\n", ratio); in sta32x_hw_params()
|
D | wm8770.c | 419 int ratio; in wm8770_hw_params() local 455 ratio = wm8770->sysclk / params_rate(params); in wm8770_hw_params() 456 if (ratio == mclk_ratios[i]) in wm8770_hw_params()
|
D | sta350.c | 689 unsigned int rate, ratio; in sta350_hw_params() local 699 ratio = sta350->mclk / rate; in sta350_hw_params() 700 dev_dbg(codec->dev, "rate: %u, ratio: %u\n", rate, ratio); in sta350_hw_params() 715 if (mcs_ratio_table[ir][i] == ratio) { in sta350_hw_params() 722 dev_err(codec->dev, "Unresolvable ratio: %u\n", ratio); in sta350_hw_params()
|
D | wm8993.c | 154 int ratio; member 376 int ratio; member 432 target /= fll_fratios[i].ratio; in fll_factors() 1243 best_val = abs((wm8993->sysclk_rate / clk_sys_rates[0].ratio) in wm8993_hw_params() 1247 clk_sys_rates[i].ratio) - wm8993->fs); in wm8993_hw_params() 1254 clk_sys_rates[best].ratio); in wm8993_hw_params()
|
D | es8328.c | 489 int ratio; in es8328_hw_params() local 511 ratio = es8328->mclk_ratios[i]; in es8328_hw_params() 548 return snd_soc_update_bits(codec, reg, ES8328_RATEMASK, ratio); in es8328_hw_params()
|
/sound/pci/ice1712/ |
D | maya44.c | 604 unsigned int ratio, adc_ratio, val; in set_rate() local 609 ratio = WM8776_CLOCK_RATIO_128FS; in set_rate() 612 ratio = WM8776_CLOCK_RATIO_128FS; in set_rate() 615 ratio = WM8776_CLOCK_RATIO_256FS; in set_rate() 618 ratio = WM8776_CLOCK_RATIO_384FS; in set_rate() 621 ratio = WM8776_CLOCK_RATIO_512FS; in set_rate() 624 ratio = WM8776_CLOCK_RATIO_512FS; in set_rate() 627 ratio = WM8776_CLOCK_RATIO_768FS; in set_rate() 643 adc_ratio = ratio; in set_rate() 650 val |= ratio << 4; in set_rate()
|
/sound/soc/samsung/ |
D | smdk_spdif.c | 112 int ret, ratio; in smdk_hw_params() local 130 ratio = 512; in smdk_hw_params() 131 rclk_rate = params_rate(params) * ratio; in smdk_hw_params()
|
D | spdif.c | 185 int i, ratio; in spdif_hw_params() local 219 ratio = spdif->clk_rate / params_rate(params); in spdif_hw_params() 221 if (ratio == spdif_sysclk_ratios[i]) in spdif_hw_params() 230 switch (ratio) { in spdif_hw_params()
|
/sound/soc/sh/rcar/ |
D | src.c | 196 uint ratio; in rsnd_src_set_convert_rate() local 206 ratio = 0; in rsnd_src_set_convert_rate() 208 ratio = 100 * fin / fout; in rsnd_src_set_convert_rate() 210 ratio = 100 * fout / fin; in rsnd_src_set_convert_rate() 212 if (ratio > 600) { in rsnd_src_set_convert_rate()
|
D | adg.c | 59 int i, ratio; in rsnd_adg_calculate_rbgx() local 65 ratio = 2 << (i * 2); in rsnd_adg_calculate_rbgx() 66 if (0 == (div % ratio)) in rsnd_adg_calculate_rbgx() 67 return (u32)((i << 8) | ((div / ratio) - 1)); in rsnd_adg_calculate_rbgx()
|
/sound/soc/xtensa/ |
D | xtfpga-i2s.c | 291 unsigned freq, ratio, level; in xtfpga_i2s_hw_params() local 309 ratio = (freq - (srate * sample_size * 8)) / in xtfpga_i2s_hw_params() 314 ratio << XTFPGA_I2S_CONFIG_RATIO_BASE); in xtfpga_i2s_hw_params() 335 __func__, freq, ratio, level); in xtfpga_i2s_hw_params()
|