/sound/soc/samsung/ |
D | neo1973_wm8753.c | 31 unsigned int pll_out = 0, bclk = 0; in neo1973_hifi_hw_params() local 43 bclk = WM8753_BCLK_DIV_4; in neo1973_hifi_hw_params() 47 bclk = WM8753_BCLK_DIV_2; in neo1973_hifi_hw_params() 51 bclk = WM8753_BCLK_DIV_16; in neo1973_hifi_hw_params() 55 bclk = WM8753_BCLK_DIV_8; in neo1973_hifi_hw_params() 59 bclk = WM8753_BCLK_DIV_4; in neo1973_hifi_hw_params() 63 bclk = WM8753_BCLK_DIV_2; in neo1973_hifi_hw_params() 81 ret = snd_soc_dai_set_clkdiv(codec_dai, WM8753_BCLKDIV, bclk); in neo1973_hifi_hw_params()
|
/sound/soc/codecs/ |
D | cros_ec_codec.c | 163 static int set_i2s_bclk(struct snd_soc_component *component, uint32_t bclk) in set_i2s_bclk() argument 167 dev_dbg(component->dev, "%s set i2s bclk to %u\n", __func__, bclk); in set_i2s_bclk() 170 param.bclk = bclk; in set_i2s_bclk() 180 unsigned int rate, bclk; in cros_ec_i2s_hw_params() local 200 bclk = snd_soc_params_to_bclk(params); in cros_ec_i2s_hw_params() 201 return set_i2s_bclk(component, bclk); in cros_ec_i2s_hw_params()
|
D | wm9081.c | 151 int bclk; member 664 if (wm9081->master && wm9081->bclk) { in configure_clock() 671 if (target >= wm9081->bclk && in configure_clock() 1021 wm9081->bclk = wm9081->fs * wm9081->tdm_width * slots; in wm9081_hw_params() 1024 wm9081->bclk = 2 * wm9081->fs; in wm9081_hw_params() 1028 wm9081->bclk *= 16; in wm9081_hw_params() 1031 wm9081->bclk *= 20; in wm9081_hw_params() 1035 wm9081->bclk *= 24; in wm9081_hw_params() 1039 wm9081->bclk *= 32; in wm9081_hw_params() 1047 dev_dbg(component->dev, "Target BCLK is %dHz\n", wm9081->bclk); in wm9081_hw_params() [all …]
|
D | wm2200.c | 1565 int lrclk, bclk, fmt_val; in wm2200_set_fmt() local 1568 bclk = 0; in wm2200_set_fmt() 1590 bclk |= WM2200_AIF1_BCLK_MSTR; in wm2200_set_fmt() 1594 bclk |= WM2200_AIF1_BCLK_MSTR; in wm2200_set_fmt() 1606 bclk |= WM2200_AIF1_BCLK_INV; in wm2200_set_fmt() 1610 bclk |= WM2200_AIF1_BCLK_INV; in wm2200_set_fmt() 1620 WM2200_AIF1_BCLK_INV, bclk); in wm2200_set_fmt() 1698 int i, bclk, lrclk, wl, fl, sr_code; in wm2200_hw_params() local 1713 bclk = snd_soc_params_to_bclk(params); in wm2200_hw_params() 1714 if (bclk < 0) in wm2200_hw_params() [all …]
|
D | wm8960.c | 130 int bclk; member 630 int sysclk, bclk, lrclk; in wm8960_configure_sysclk() local 637 bclk = wm8960->bclk; in wm8960_configure_sysclk() 649 diff = sysclk - bclk * bclk_divs[k] / 10; in wm8960_configure_sysclk() 699 int sysclk, bclk, lrclk, freq_out; in wm8960_configure_pll() local 703 bclk = wm8960->bclk; in wm8960_configure_pll() 727 diff = sysclk - bclk * bclk_divs[k] / 10; in wm8960_configure_pll() 832 wm8960->bclk = snd_soc_params_to_bclk(params); in wm8960_hw_params() 834 wm8960->bclk *= 2; in wm8960_hw_params()
|
D | wm8993.c | 217 unsigned int bclk; member 1207 wm8993->bclk = 2 * wm8993->fs; in wm8993_hw_params() 1211 wm8993->bclk *= wm8993->tdm_width * wm8993->tdm_slots; in wm8993_hw_params() 1215 wm8993->bclk *= 16; in wm8993_hw_params() 1218 wm8993->bclk *= 20; in wm8993_hw_params() 1222 wm8993->bclk *= 24; in wm8993_hw_params() 1226 wm8993->bclk *= 32; in wm8993_hw_params() 1234 dev_dbg(component->dev, "Target BCLK is %dHz\n", wm8993->bclk); in wm8993_hw_params() 1278 - wm8993->bclk; in wm8993_hw_params() 1286 wm8993->bclk = (wm8993->sysclk_rate * 10) / bclk_divs[best].div; in wm8993_hw_params() [all …]
|
D | wm5100.c | 1282 int lrclk, bclk, mask, base; in wm5100_set_fmt() local 1287 bclk = 0; in wm5100_set_fmt() 1309 bclk |= WM5100_AIF1_BCLK_MSTR; in wm5100_set_fmt() 1313 bclk |= WM5100_AIF1_BCLK_MSTR; in wm5100_set_fmt() 1325 bclk |= WM5100_AIF1_BCLK_INV; in wm5100_set_fmt() 1329 bclk |= WM5100_AIF1_BCLK_INV; in wm5100_set_fmt() 1339 WM5100_AIF1_BCLK_INV, bclk); in wm5100_set_fmt() 1402 int i, base, bclk, aif_rate, lrclk, wl, fl, sr; in wm5100_hw_params() local 1419 bclk = snd_soc_params_to_bclk(params); in wm5100_hw_params() 1420 if (bclk < 0) in wm5100_hw_params() [all …]
|
D | arizona.c | 1446 int lrclk, bclk, mode, base; in arizona_set_fmt() local 1451 bclk = 0; in arizona_set_fmt() 1489 bclk |= ARIZONA_AIF1_BCLK_MSTR; in arizona_set_fmt() 1492 bclk |= ARIZONA_AIF1_BCLK_MSTR; in arizona_set_fmt() 1505 bclk |= ARIZONA_AIF1_BCLK_INV; in arizona_set_fmt() 1509 bclk |= ARIZONA_AIF1_BCLK_INV; in arizona_set_fmt() 1521 bclk); in arizona_set_fmt() 1754 int base, int bclk, int lrclk, int frame) in arizona_aif_cfg_changed() argument 1759 if (bclk != (val & ARIZONA_AIF1_BCLK_FREQ_MASK)) in arizona_aif_cfg_changed() 1788 int bclk, lrclk, wl, frame, bclk_target; in arizona_hw_params() local [all …]
|
D | wm8903.c | 1445 int bclk; in wm8903_hw_params() local 1483 bclk = 2 * fs; in wm8903_hw_params() 1486 bclk *= 16; in wm8903_hw_params() 1489 bclk *= 20; in wm8903_hw_params() 1493 bclk *= 24; in wm8903_hw_params() 1497 bclk *= 32; in wm8903_hw_params() 1552 best_val = ((clk_sys * 10) / bclk_divs[0].ratio) - bclk; in wm8903_hw_params() 1555 cur_val = ((clk_sys * 10) / bclk_divs[i].ratio) - bclk; in wm8903_hw_params() 1567 bclk_divs[bclk_div].ratio / 10, bclk, in wm8903_hw_params() 1571 aif3 |= bclk / fs; in wm8903_hw_params()
|
D | da7219.c | 802 struct clk *bclk = da7219->dai_clks[DA7219_DAI_BCLK_IDX]; in da7219_dai_event() local 811 if (bclk) { in da7219_dai_event() 812 ret = clk_prepare_enable(bclk); in da7219_dai_event() 858 if (bclk) in da7219_dai_event() 859 clk_disable_unprepare(bclk); in da7219_dai_event() 1427 struct clk *bclk = da7219->dai_clks[DA7219_DAI_BCLK_IDX]; in da7219_set_dai_tdm_slot() local 1472 if (bclk) { in da7219_set_dai_tdm_slot() 1475 ret = clk_set_rate(bclk, bclk_rate); in da7219_set_dai_tdm_slot() 1563 struct clk *bclk = da7219->dai_clks[DA7219_DAI_BCLK_IDX]; in da7219_hw_params() local 1624 if (bclk) { in da7219_hw_params() [all …]
|
D | wm8985.c | 191 unsigned int bclk; member 760 wm8985->bclk = snd_soc_params_to_bclk(params); in wm8985_hw_params() 761 if ((int)wm8985->bclk < 0) in wm8985_hw_params() 762 return wm8985->bclk; in wm8985_hw_params() 803 dev_dbg(dai->dev, "Target BCLK = %uHz\n", wm8985->bclk); in wm8985_hw_params() 825 if (wm8985->bclk == tmp / bclk_divs[i]) in wm8985_hw_params()
|
D | wm8904.c | 81 int bclk; member 1304 wm8904->bclk = snd_soc_calc_bclk(wm8904->fs, in wm8904_hw_params() 1308 wm8904->bclk = snd_soc_params_to_bclk(params); in wm8904_hw_params() 1328 dev_dbg(component->dev, "Target BCLK is %dHz\n", wm8904->bclk); in wm8904_hw_params() 1376 - wm8904->bclk; in wm8904_hw_params() 1384 wm8904->bclk = (wm8904->sysclk_rate * 10) / bclk_divs[best].div; in wm8904_hw_params() 1386 bclk_divs[best].div, wm8904->bclk); in wm8904_hw_params() 1390 dev_dbg(component->dev, "LRCLK_RATE is %d\n", wm8904->bclk / wm8904->fs); in wm8904_hw_params() 1391 aif3 |= wm8904->bclk / wm8904->fs; in wm8904_hw_params()
|
D | madera.c | 2728 int lrclk, bclk, mode, base; in madera_set_fmt() local 2733 bclk = 0; in madera_set_fmt() 2771 bclk |= MADERA_AIF1_BCLK_MSTR; in madera_set_fmt() 2774 bclk |= MADERA_AIF1_BCLK_MSTR; in madera_set_fmt() 2787 bclk |= MADERA_AIF1_BCLK_INV; in madera_set_fmt() 2791 bclk |= MADERA_AIF1_BCLK_INV; in madera_set_fmt() 2804 bclk); in madera_set_fmt() 3040 int base, int bclk, int lrclk, int frame) in madera_aif_cfg_changed() argument 3049 if (bclk != (val & MADERA_AIF1_BCLK_FREQ_MASK)) in madera_aif_cfg_changed() 3087 int bclk, lrclk, wl, frame, bclk_target, num_rates; in madera_hw_params() local [all …]
|
D | wm8983.c | 101 u32 bclk; member 664 wm8983->bclk = ret; in wm8983_hw_params() 705 dev_dbg(dai->dev, "Target BCLK = %uHz\n", wm8983->bclk); in wm8983_hw_params() 727 if (wm8983->bclk == tmp / bclk_divs[i]) in wm8983_hw_params()
|
D | wm8962.c | 59 int bclk; /* Desired BCLK */ member 2465 if (!wm8962->bclk || !wm8962->lrclk) { in wm8962_configure_bclk() 2523 dev_dbg(component->dev, "DSPCLK is %dHz, BCLK %d\n", dspclk, wm8962->bclk); in wm8962_configure_bclk() 2530 if (dspclk / bclk_divs[i] == wm8962->bclk) { in wm8962_configure_bclk() 2532 bclk_divs[i], wm8962->bclk); in wm8962_configure_bclk() 2539 dspclk / wm8962->bclk); in wm8962_configure_bclk() 2543 aif2 |= wm8962->bclk / wm8962->lrclk; in wm8962_configure_bclk() 2545 wm8962->bclk / wm8962->lrclk, wm8962->lrclk); in wm8962_configure_bclk() 2611 wm8962->bclk = snd_soc_params_to_bclk(params); in wm8962_hw_params() 2613 wm8962->bclk *= 2; in wm8962_hw_params() [all …]
|
D | rt5514.h | 278 int bclk; member
|
D | rt1308.c | 56 int bclk; member 477 rt1308->bclk = rt1308->lrck * (32 << bclk_ms); in rt1308_hw_params()
|
D | wm8995.c | 1555 int lrclk, bclk; in wm8995_hw_params() local 1652 bclk = 0; in wm8995_hw_params() 1659 bclk |= best << WM8995_AIF1_BCLK_DIV_SHIFT; in wm8995_hw_params() 1672 WM8995_AIF1_BCLK_DIV_MASK, bclk); in wm8995_hw_params()
|
D | rt5616.c | 150 int bclk[RT5616_AIFS]; member 979 rt5616->bclk[dai->id] = rt5616->lrck[dai->id] * (32 << bclk_ms); in rt5616_hw_params() 982 rt5616->bclk[dai->id], rt5616->lrck[dai->id]); in rt5616_hw_params()
|
D | max98927.c | 254 static int max98927_get_bclk_sel(int bclk) in max98927_get_bclk_sel() argument 259 if (bclk_sel_table[i] == bclk) in max98927_get_bclk_sel()
|
/sound/soc/amd/ |
D | acp-da7219-max98357a.c | 256 int wclk, bclk; in cz_da7219_params() local 259 bclk = wclk * params_channels(params) * in cz_da7219_params() 266 if (bclk < (wclk * 64)) in cz_da7219_params() 267 bclk = wclk * 64; in cz_da7219_params() 268 return da7219_clk_enable(substream, wclk, bclk); in cz_da7219_params()
|
/sound/soc/fsl/ |
D | fsl_micfil.c | 115 int bclk; in get_pdm_clk() local 126 bclk = rate * 8 * osr / 2; /* kfactor = 0.5 */ in get_pdm_clk() 130 bclk = rate * 4 * osr * 1; /* kfactor = 1 */ in get_pdm_clk() 134 bclk = rate * 2 * osr * 2; /* kfactor = 2 */ in get_pdm_clk() 137 bclk = rate * osr * 4; /* kfactor = 4 */ in get_pdm_clk() 142 bclk = -1; in get_pdm_clk() 146 return bclk; in get_pdm_clk()
|
D | fsl_esai.c | 520 u32 bclk, mask, val; in fsl_esai_hw_params() local 527 bclk = params_rate(params) * slot_width * esai_priv->slots; in fsl_esai_hw_params() 529 ret = fsl_esai_set_bclk(dai, esai_priv->synchronous || tx, bclk); in fsl_esai_hw_params()
|
/sound/soc/atmel/ |
D | mchp-i2s-mcc.c | 395 unsigned int bclk, unsigned int *mra, in mchp_i2s_mcc_config_divs() argument 407 sysclk = bclk; in mchp_i2s_mcc_config_divs() 416 lcm_rate = lcm(sysclk, bclk); in mchp_i2s_mcc_config_divs() 418 (lcm_rate / bclk % 2 == 1 && lcm_rate / bclk > 2)) in mchp_i2s_mcc_config_divs() 423 (clk_rate == bclk || clk_rate / (bclk * 2) <= GENMASK(5, 0)); in mchp_i2s_mcc_config_divs() 467 *mra |= MCHP_I2SMCC_MRA_ISCKDIV(*best_rate / (2 * bclk)); in mchp_i2s_mcc_config_divs()
|
/sound/soc/pxa/ |
D | pxa-ssp.c | 561 int bclk = rate * chn * (width / 8); in pxa_ssp_hw_params() local 602 ret = pxa_ssp_set_pll(priv, bclk); in pxa_ssp_hw_params() 628 ret = pxa_ssp_set_pll(priv, bclk); in pxa_ssp_hw_params() 644 pxa_ssp_set_scr(ssp, bclk / rate); in pxa_ssp_hw_params() 651 if (((priv->sysclk / bclk) == 64) && (width == 16)) { in pxa_ssp_hw_params()
|