Home
last modified time | relevance | path

Searched refs:ratio (Results 1 – 25 of 70) sorted by relevance

123

/sound/soc/codecs/
Dcs42xx8.c183 unsigned int ratio[3]; member
267 u32 ratio[2]; in cs42xx8_hw_params() local
279 ratio[tx] = rate[tx] > 0 ? cs42xx8->sysclk / rate[tx] : 0; in cs42xx8_hw_params()
280 ratio[!tx] = rate[!tx] > 0 ? cs42xx8->sysclk / rate[!tx] : 0; in cs42xx8_hw_params()
304 (cs42xx8_ratios[i].ratio[0] == ratio[tx] || in cs42xx8_hw_params()
305 cs42xx8_ratios[i].ratio[1] == ratio[tx] || in cs42xx8_hw_params()
306 cs42xx8_ratios[i].ratio[2] == ratio[tx]) : in cs42xx8_hw_params()
307 (cs42xx8_ratios[i].ratio[fm[tx]] == ratio[tx])) && in cs42xx8_hw_params()
311 if (!ratio[tx]) in cs42xx8_hw_params()
316 (cs42xx8_ratios[i].ratio[0] == ratio[!tx] || in cs42xx8_hw_params()
[all …]
Dwm8974.c386 unsigned int ratio = 2 * f_in / f_out; in wm8974_get_mclkdiv() local
388 if (ratio <= 2) { in wm8974_get_mclkdiv()
390 ratio = 2; in wm8974_get_mclkdiv()
391 } else if (ratio == 3) { in wm8974_get_mclkdiv()
393 } else if (ratio == 4) { in wm8974_get_mclkdiv()
395 } else if (ratio <= 6) { in wm8974_get_mclkdiv()
397 ratio = 6; in wm8974_get_mclkdiv()
398 } else if (ratio <= 8) { in wm8974_get_mclkdiv()
400 ratio = 8; in wm8974_get_mclkdiv()
401 } else if (ratio <= 12) { in wm8974_get_mclkdiv()
[all …]
Darizona.c2056 int ratio; member
2142 return fll_fratios[i].ratio; in arizona_find_fratio()
2154 int init_ratio, ratio; in arizona_calc_fratio() local
2204 for (ratio = init_ratio; ratio > 0; ratio--) { in arizona_calc_fratio()
2205 if (target % (ratio * Fref)) { in arizona_calc_fratio()
2207 cfg->fratio = ratio - 1; in arizona_calc_fratio()
2210 Fref, refdiv, div, ratio); in arizona_calc_fratio()
2211 return ratio; in arizona_calc_fratio()
2215 for (ratio = init_ratio + 1; ratio <= ARIZONA_FLL_MAX_FRATIO; in arizona_calc_fratio()
2216 ratio++) { in arizona_calc_fratio()
[all …]
Dpcm3060.c115 unsigned int ratio; in pcm3060_hw_params() local
130 ratio = priv->dai[dai->id].sclk_freq / rate; in pcm3060_hw_params()
132 switch (ratio) { in pcm3060_hw_params()
152 dev_err(comp->dev, "unsupported ratio: %d\n", ratio); in pcm3060_hw_params()
Dmadera.c3369 int ratio; member
3429 return fll_sync_fratios[i].ratio; in madera_find_sync_fratio()
3439 int ratio = 1; in madera_find_main_fratio() local
3441 while ((fout / (ratio * fref)) > MADERA_FLL_MAX_N) in madera_find_main_fratio()
3442 ratio++; in madera_find_main_fratio()
3445 *fratio = ratio - 1; in madera_find_main_fratio()
3447 return ratio; in madera_find_main_fratio()
3484 int init_ratio, ratio; in madera_calc_fratio() local
3541 for (ratio = init_ratio; ratio > 0; ratio--) { in madera_calc_fratio()
3542 if (fll->fout % (ratio * fref)) { in madera_calc_fratio()
[all …]
Dwm8523.c101 int ratio; member
114 int ratio; member
156 lrclk_ratios[i].ratio) in wm8523_hw_params()
173 if (params_width(params) * 2 <= bclk_ratios[i].ratio) in wm8523_hw_params()
220 val = freq / lrclk_ratios[i].ratio; in wm8523_set_dai_sysclk()
Dcs4270.c191 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()
Des8316.c386 const unsigned int ratio = supported_mclk_lrck_ratios[i]; in es8316_set_dai_sysclk() local
388 if (freq % ratio == 0) in es8316_set_dai_sysclk()
389 es8316->allowed_rates[count++] = freq / ratio; in es8316_set_dai_sysclk()
476 const unsigned int ratio = supported_mclk_lrck_ratios[i]; in es8316_pcm_hw_params() local
478 if (es8316->sysclk % ratio != 0) in es8316_pcm_hw_params()
480 if (es8316->sysclk / ratio == params_rate(params)) in es8316_pcm_hw_params()
Dwm9081.c86 int ratio; member
453 int ratio; member
508 target /= fll_fratios[i].ratio; in fll_factors()
669 target = wm9081->fs * clk_sys_rates[i].ratio; in configure_clock()
681 new_sysclk = clk_sys_rates[i].ratio in configure_clock()
1055 best_val = abs((wm9081->sysclk_rate / clk_sys_rates[0].ratio) in wm9081_hw_params()
1059 clk_sys_rates[i].ratio) - wm9081->fs); in wm9081_hw_params()
1066 clk_sys_rates[best].ratio); in wm9081_hw_params()
Dcs42l51.c330 unsigned int ratio; member
392 unsigned int ratio; in cs42l51_hw_params() local
414 ratio = cs42l51->mclk / rate; /* MCLK/LRCK ratio */ in cs42l51_hw_params()
416 if (ratios[i].ratio == ratio) in cs42l51_hw_params()
Dcs4271.c303 unsigned short ratio; /* MCLK / sample rate */ member
346 unsigned int ratio, val; in cs4271_hw_params() local
385 ratio = cs4271->mclk / cs4271->rate; in cs4271_hw_params()
389 (cs4271_clk_tab[i].ratio == ratio)) in cs4271_hw_params()
Dwm8524.c48 int ratio; member
104 val = freq / lrclk_ratios[i].ratio; in wm8524_set_dai_sysclk()
Dmax9867.c186 unsigned long int rate, ratio; in max9867_dai_hw_params() local
202 ratio = max9867->pclk / rate; in max9867_dai_hw_params()
206 switch (ratio) { in max9867_dai_hw_params()
Duda1334.c80 int ratio; member
136 val = freq / lrclk_ratios[i].ratio; in uda1334_set_dai_sysclk()
Dcs42l56.c630 u8 ratio; member
709 return clk_ratio_table[i].ratio; in cs42l56_get_mclk_ratio()
864 int ratio; in cs42l56_pcm_hw_params() local
866 ratio = cs42l56_get_mclk_ratio(cs42l56->mclk, params_rate(params)); in cs42l56_pcm_hw_params()
867 if (ratio >= 0) { in cs42l56_pcm_hw_params()
869 CS42L56_CLK_RATIO_MASK, ratio); in cs42l56_pcm_hw_params()
/sound/soc/fsl/
Dfsl_esai.c142 static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio, in fsl_esai_divisor_cal() argument
153 if (ratio > 2 * 8 * 256 * maxfp || ratio < 2) { in fsl_esai_divisor_cal()
157 } else if (ratio % 2) { in fsl_esai_divisor_cal()
162 ratio /= 2; in fsl_esai_divisor_cal()
164 psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8; in fsl_esai_divisor_cal()
167 if (ratio <= 256) { in fsl_esai_divisor_cal()
168 pm = ratio; in fsl_esai_divisor_cal()
182 if (prod == ratio) in fsl_esai_divisor_cal()
184 else if (prod / ratio == 1) in fsl_esai_divisor_cal()
185 sub = prod - ratio; in fsl_esai_divisor_cal()
[all …]
Dfsl_sai.c159 unsigned int ratio) in fsl_sai_set_dai_bclk_ratio() argument
163 sai->bclk_ratio = ratio; in fsl_sai_set_dai_bclk_ratio()
353 u32 savediv = 0, ratio, savesub = freq; in fsl_sai_set_bclk() local
366 ratio = clk_rate / freq; in fsl_sai_set_bclk()
368 ret = clk_rate - ratio * freq; in fsl_sai_set_bclk()
379 ratio, freq, clk_rate); in fsl_sai_set_bclk()
381 if (ratio % 2 == 0 && ratio >= 2 && ratio <= 512) in fsl_sai_set_bclk()
382 ratio /= 2; in fsl_sai_set_bclk()
387 savediv = ratio; in fsl_sai_set_bclk()
/sound/pci/ice1712/
Dmaya44.c590 unsigned int ratio, adc_ratio, val; in set_rate() local
595 ratio = WM8776_CLOCK_RATIO_128FS; in set_rate()
598 ratio = WM8776_CLOCK_RATIO_128FS; in set_rate()
601 ratio = WM8776_CLOCK_RATIO_256FS; in set_rate()
604 ratio = WM8776_CLOCK_RATIO_384FS; in set_rate()
607 ratio = WM8776_CLOCK_RATIO_512FS; in set_rate()
610 ratio = WM8776_CLOCK_RATIO_512FS; in set_rate()
613 ratio = WM8776_CLOCK_RATIO_768FS; in set_rate()
629 adc_ratio = ratio; in set_rate()
636 val |= ratio << 4; in set_rate()
/sound/soc/rockchip/
Drockchip_pdm.c46 unsigned int ratio; member
110 unsigned int i, count, ratio; in get_pdm_ds_ratio() local
112 ratio = 0; in get_pdm_ds_ratio()
114 return ratio; in get_pdm_ds_ratio()
119 ratio = ds_ratio[i].ratio; in get_pdm_ds_ratio()
121 return ratio; in get_pdm_ds_ratio()
/sound/soc/samsung/
Dsmdk_spdif.c106 int ret, ratio; in smdk_hw_params() local
124 ratio = 512; in smdk_hw_params()
125 rclk_rate = params_rate(params) * ratio; in smdk_hw_params()
Dspdif.c180 int i, ratio; in spdif_hw_params() local
214 ratio = spdif->clk_rate / params_rate(params); in spdif_hw_params()
216 if (ratio == spdif_sysclk_ratios[i]) in spdif_hw_params()
225 switch (ratio) { in spdif_hw_params()
/sound/soc/sh/rcar/
Dsrc.c205 uint ratio; in rsnd_src_set_convert_rate() local
219 ratio = 0; in rsnd_src_set_convert_rate()
221 ratio = 100 * fin / fout; in rsnd_src_set_convert_rate()
223 ratio = 100 * fout / fin; in rsnd_src_set_convert_rate()
225 if (ratio > 600) { in rsnd_src_set_convert_rate()
Dadg.c67 int i, ratio; in rsnd_adg_calculate_rbgx() local
73 ratio = 2 << (i * 2); in rsnd_adg_calculate_rbgx()
74 if (0 == (div % ratio)) in rsnd_adg_calculate_rbgx()
75 return (u32)((i << 8) | ((div / ratio) - 1)); in rsnd_adg_calculate_rbgx()
/sound/soc/bcm/
Dbcm2835-i2s.c228 unsigned int ratio) in bcm2835_i2s_set_dai_bclk_ratio() argument
232 if (!ratio) { in bcm2835_i2s_set_dai_bclk_ratio()
237 if (ratio > BCM2835_I2S_MAX_FRAME_LENGTH) in bcm2835_i2s_set_dai_bclk_ratio()
243 dev->slot_width = ratio / 2; in bcm2835_i2s_set_dai_bclk_ratio()
244 dev->frame_length = ratio; in bcm2835_i2s_set_dai_bclk_ratio()
/sound/soc/xtensa/
Dxtfpga-i2s.c288 unsigned freq, ratio, level; in xtfpga_i2s_hw_params() local
306 ratio = (freq - (srate * sample_size * 8)) / in xtfpga_i2s_hw_params()
311 ratio << XTFPGA_I2S_CONFIG_RATIO_BASE); in xtfpga_i2s_hw_params()
332 __func__, freq, ratio, level); in xtfpga_i2s_hw_params()

123