/sound/soc/bcm/ |
D | bcm2835-i2s.c | 336 int frame_length, bclk_rate; in bcm2835_i2s_hw_params() local 366 bclk_rate = dev->frame_length * params_rate(params); in bcm2835_i2s_hw_params() 377 bclk_rate = snd_soc_params_to_bclk(params); in bcm2835_i2s_hw_params() 378 if (bclk_rate < 0) in bcm2835_i2s_hw_params() 379 return bclk_rate; in bcm2835_i2s_hw_params() 416 (!dev->clk_prepared || dev->clk_rate != bclk_rate)) { in bcm2835_i2s_hw_params() 420 if (dev->clk_rate != bclk_rate) { in bcm2835_i2s_hw_params() 421 ret = clk_set_rate(dev->clk, bclk_rate); in bcm2835_i2s_hw_params() 424 dev->clk_rate = bclk_rate; in bcm2835_i2s_hw_params() 605 params_rate(params), bclk_rate); in bcm2835_i2s_hw_params()
|
/sound/soc/adi/ |
D | axi-i2s.c | 93 unsigned int bclk_rate; in axi_i2s_hw_params() local 95 bclk_rate = params_rate(params) * AXI_I2S_BITS_PER_FRAME; in axi_i2s_hw_params() 98 bclk_div = DIV_ROUND_UP(clk_get_rate(i2s->clk_ref), bclk_rate) / 2 - 1; in axi_i2s_hw_params()
|
/sound/soc/codecs/ |
D | wm8996.c | 78 int bclk_rate[WM8996_AIFS]; member 1534 int aif, best, cur_val, bclk_rate, bclk_reg, i; in wm8996_update_bclk() local 1552 bclk_rate = wm8996->bclk_rate[aif]; in wm8996_update_bclk() 1557 cur_val = (wm8996->sysclk / bclk_divs[i]) - bclk_rate; in wm8996_update_bclk() 1562 bclk_rate = wm8996->sysclk / bclk_divs[best]; in wm8996_update_bclk() 1564 bclk_divs[best], bclk_rate); in wm8996_update_bclk() 1735 int bits, i, bclk_rate, best; in wm8996_hw_params() local 1769 bclk_rate = snd_soc_params_to_bclk(params); in wm8996_hw_params() 1770 if (bclk_rate < 0) { in wm8996_hw_params() 1771 dev_err(component->dev, "Unsupported BCLK rate: %d\n", bclk_rate); in wm8996_hw_params() [all …]
|
D | wm8995.c | 1553 int bclk_rate; in wm8995_hw_params() local 1590 bclk_rate = snd_soc_params_to_bclk(params); in wm8995_hw_params() 1591 if (bclk_rate < 0) in wm8995_hw_params() 1592 return bclk_rate; in wm8995_hw_params() 1626 dai->id + 1, wm8995->aifclk[dai->id], bclk_rate); in wm8995_hw_params() 1654 cur_val = (wm8995->aifclk[dai->id] * 10 / bclk_divs[i]) - bclk_rate; in wm8995_hw_params() 1661 bclk_rate = wm8995->aifclk[dai->id] * 10 / bclk_divs[best]; in wm8995_hw_params() 1663 bclk_divs[best], bclk_rate); in wm8995_hw_params() 1665 lrclk = bclk_rate / params_rate(params); in wm8995_hw_params() 1667 lrclk, bclk_rate / lrclk); in wm8995_hw_params()
|
D | pcm512x.c | 704 unsigned long bclk_rate) in pcm512x_find_sck() argument 719 pow2 = 1 << fls((pcm512x_pll_max(pcm512x) - 16000000) / bclk_rate); in pcm512x_find_sck() 722 bclk_rate * pow2); in pcm512x_find_sck() 897 unsigned long bclk_rate; in pcm512x_set_dividers() local 926 bclk_rate = params_rate(params) * lrclk_div; in pcm512x_set_dividers() 927 bclk_div = DIV_ROUND_CLOSEST(sck_rate, bclk_rate); in pcm512x_set_dividers() 940 bclk_rate = ret; in pcm512x_set_dividers() 944 sck_rate = pcm512x_find_sck(dai, bclk_rate); in pcm512x_set_dividers() 990 bclk_div = DIV_ROUND_CLOSEST(sck_rate, bclk_rate); in pcm512x_set_dividers()
|
D | da7219.c | 1429 unsigned long sr, bclk_rate; in da7219_set_dai_tdm_slot() local 1474 bclk_rate = sr * frame_size; in da7219_set_dai_tdm_slot() 1475 ret = clk_set_rate(bclk, bclk_rate); in da7219_set_dai_tdm_slot() 1479 bclk_rate, ret); in da7219_set_dai_tdm_slot() 1566 unsigned long sr, bclk_rate; in da7219_hw_params() local 1625 bclk_rate = frame_size * sr; in da7219_hw_params() 1634 bclk_rate = clk_round_rate(bclk, bclk_rate); in da7219_hw_params() 1635 if ((bclk_rate / sr) < frame_size) { in da7219_hw_params() 1641 ret = clk_set_rate(bclk, bclk_rate); in da7219_hw_params() 1645 bclk_rate, ret); in da7219_hw_params()
|
D | rt5631.c | 34 int bclk_rate; member 1362 rt5631->bclk_rate = snd_soc_params_to_bclk(params); in rt5631_hifi_pcm_params() 1363 if (rt5631->bclk_rate < 0) { in rt5631_hifi_pcm_params() 1365 return rt5631->bclk_rate; in rt5631_hifi_pcm_params() 1371 rt5631->bclk_rate / rt5631->rx_rate); in rt5631_hifi_pcm_params()
|
D | wm8994.c | 2929 int i, cur_val, best_val, bclk_rate, best; in wm8994_hw_params() local 2962 bclk_rate = params_rate(params); in wm8994_hw_params() 2965 bclk_rate *= 16; in wm8994_hw_params() 2968 bclk_rate *= 20; in wm8994_hw_params() 2972 bclk_rate *= 24; in wm8994_hw_params() 2976 bclk_rate *= 32; in wm8994_hw_params() 2994 bclk_rate *= 2; in wm8994_hw_params() 2997 bclk_rate *= 4; in wm8994_hw_params() 3011 dai->id, wm8994->aifclk[id], bclk_rate); in wm8994_hw_params() 3045 cur_val = (wm8994->aifclk[id] * 10 / bclk_divs[i]) - bclk_rate; in wm8994_hw_params() [all …]
|
D | cx2072x.c | 676 unsigned int bclk_rate = 0; in cx2072x_config_i2spcm() local 828 bclk_rate = cx2072x->sample_rate * frame_len; in cx2072x_config_i2spcm() 837 mod = do_div(div, bclk_rate); in cx2072x_config_i2spcm() 839 dev_err(dev, "Unsupported BCLK %dHz\n", bclk_rate); in cx2072x_config_i2spcm() 842 dev_dbg(dev, "enables BCLK %dHz output\n", bclk_rate); in cx2072x_config_i2spcm()
|
/sound/soc/tegra/ |
D | tegra210_i2s.c | 544 unsigned int val, bit_count, bclk_rate, num_bclk = sample_size; in tegra210_i2s_set_timing_params() local 554 bclk_rate = srate * channels * num_bclk; in tegra210_i2s_set_timing_params() 556 err = tegra210_i2s_set_clock_rate(dev, bclk_rate); in tegra210_i2s_set_timing_params() 559 bclk_rate, err); in tegra210_i2s_set_timing_params() 574 bit_count = (bclk_rate / (srate * 2)) - 1; in tegra210_i2s_set_timing_params() 577 bit_count = (bclk_rate / srate) - 1; in tegra210_i2s_set_timing_params()
|
/sound/soc/rockchip/ |
D | rockchip_i2s.c | 357 unsigned int mclk_rate, bclk_rate, div_bclk, div_lrck; in rockchip_i2s_hw_params() local 361 bclk_rate = i2s->bclk_ratio * params_rate(params); in rockchip_i2s_hw_params() 362 if (!bclk_rate) in rockchip_i2s_hw_params() 365 div_bclk = DIV_ROUND_CLOSEST(mclk_rate, bclk_rate); in rockchip_i2s_hw_params() 366 div_lrck = bclk_rate / params_rate(params); in rockchip_i2s_hw_params()
|
D | rockchip_i2s_tdm.c | 855 unsigned int mclk_rate, bclk_rate, div_bclk = 4, div_lrck = 64; in rockchip_i2s_tdm_hw_params() local 867 bclk_rate = i2s_tdm->frame_width * params_rate(params); in rockchip_i2s_tdm_hw_params() 868 if (!bclk_rate) in rockchip_i2s_tdm_hw_params() 871 div_bclk = DIV_ROUND_CLOSEST(mclk_rate, bclk_rate); in rockchip_i2s_tdm_hw_params() 872 div_lrck = bclk_rate / params_rate(params); in rockchip_i2s_tdm_hw_params()
|
/sound/soc/atmel/ |
D | atmel_ssc_dai.c | 491 int bclk_rate = snd_soc_params_to_bclk(params); in atmel_ssc_hw_params() local 493 if (bclk_rate < 0) { in atmel_ssc_hw_params() 495 bclk_rate); in atmel_ssc_hw_params() 496 return bclk_rate; in atmel_ssc_hw_params() 499 cmr_div = DIV_ROUND_CLOSEST(ssc_p->mck_rate, 2 * bclk_rate); in atmel_ssc_hw_params()
|
D | mchp-i2s-mcc.c | 517 unsigned int bclk_rate; in mchp_i2s_mcc_hw_params() local 670 bclk_rate = frame_length * params_rate(params); in mchp_i2s_mcc_hw_params() 671 ret = mchp_i2s_mcc_config_divs(dev, bclk_rate, &mra, in mchp_i2s_mcc_hw_params()
|
/sound/soc/sof/ |
D | ipc3-topology.c | 1049 config->sai.bclk_rate = le32_to_cpu(hw_config->bclk_rate); in sof_link_sai_load() 1100 config->esai.bclk_rate = le32_to_cpu(hw_config->bclk_rate); in sof_link_esai_load() 1315 config[i].ssp.bclk_rate = le32_to_cpu(hw_config[i].bclk_rate); in sof_link_ssp_load() 1325 config[i].ssp.mclk_rate, config[i].ssp.bclk_rate, in sof_link_ssp_load() 2352 return private->dai_config->ssp.bclk_rate; in sof_ipc3_dai_get_clk()
|
D | ipc4-topology.c | 1813 return le32_to_cpu(hw_config->bclk_rate); in sof_ipc4_dai_get_clk()
|
/sound/soc/sh/ |
D | rz-ssi.c | 250 unsigned long bclk_rate = rate * channels * channel_bits; in rz_ssi_clk_setup() local 262 if (ssi->audio_clk_1 % bclk_rate) in rz_ssi_clk_setup() 279 div = ssi->audio_mck / bclk_rate; in rz_ssi_clk_setup()
|