coeff_div
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].fs * rate == alc5623->sysclk)
coeff = coeff_div[coeff].regvalue;
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].fs * rate == alc5632->sysclk)
coeff = coeff_div[coeff].regvalue;
static const struct coeff_div es8323_coeff_div[] = {
const struct _coeff_div *coeff_div)
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
const struct _coeff_div *coeff_div;
coeff_div = coeff_div_v0;
coeff_div = coeff_div_v3;
coeff = get_coeff(es8326->sysclk, params_rate(params), array, coeff_div);
coeff_div[coeff].reg4);
coeff_div[coeff].reg5);
coeff_div[coeff].reg6);
coeff_div[coeff].reg7);
coeff_div[coeff].reg8);
coeff_div[coeff].reg9);
coeff_div[coeff].rega);
coeff_div[coeff].regb);
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk) {
vddd_det = ~(coeff_div[i].dvdd_vol ^ vddd) & 0x01;
dmic_det = ~(coeff_div[i].dmic_sel ^ dmic) & 0x01;
vddd_det |= ~(coeff_div[i].dvdd_vol % 2) & 0x01;
dmic_det |= ~(coeff_div[i].dmic_sel % 2) & 0x01;
coeff_div[coeff].Reg0x04);
coeff_div[coeff].Reg0x05);
coeff_div[coeff].Reg0x06);
coeff_div[coeff].Reg0x07);
coeff_div[coeff].Reg0x08);
coeff_div[coeff].Reg0x09);
coeff_div[coeff].Reg0x0A);
coeff_div[coeff].Reg0x0B);
coeff_div[coeff].Reg0x19);
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk) {
vddd_det = ~(coeff_div[i].dvdd_vol ^ vddd) & 0x01;
dmic_det = ~(coeff_div[i].dmic_sel ^ dmic) & 0x01;
vddd_det |= ~(coeff_div[i].dvdd_vol % 2) & 0x01;
dmic_det |= ~(coeff_div[i].dmic_sel % 2) & 0x01;
regmap_write(es8389->regmap, ES8389_CLK_DIV1, coeff_div[coeff].Reg0x04);
regmap_write(es8389->regmap, ES8389_CLK_MUL, coeff_div[coeff].Reg0x05);
regmap_write(es8389->regmap, ES8389_CLK_MUX1, coeff_div[coeff].Reg0x06);
regmap_write(es8389->regmap, ES8389_CLK_MUX2, coeff_div[coeff].Reg0x07);
regmap_write(es8389->regmap, ES8389_CLK_CTL1, coeff_div[coeff].Reg0x08);
regmap_write(es8389->regmap, ES8389_CLK_CTL2, coeff_div[coeff].Reg0x09);
regmap_write(es8389->regmap, ES8389_CLK_CTL3, coeff_div[coeff].Reg0x0A);
0xC0, coeff_div[coeff].Reg0x0F);
regmap_write(es8389->regmap, ES8389_CLK_DIV2, coeff_div[coeff].Reg0x11);
regmap_write(es8389->regmap, ES8389_ADC_OSR, coeff_div[coeff].Reg0x21);
regmap_write(es8389->regmap, ES8389_ADC_DSP, coeff_div[coeff].Reg0x22);
regmap_write(es8389->regmap, ES8389_OSR_VOL, coeff_div[coeff].Reg0x26);
0xC0, coeff_div[coeff].Reg0x30);
regmap_write(es8389->regmap, ES8389_DAC_DSM_OSR, coeff_div[coeff].Reg0x41);
regmap_write(es8389->regmap, ES8389_DAC_DSP_OSR, coeff_div[coeff].Reg0x42);
0x81, coeff_div[coeff].Reg0x43);
0x72, coeff_div[coeff].Reg0xF0);
regmap_write(es8389->regmap, ES8389_CSM_STATE1, coeff_div[coeff].Reg0xF1);
regmap_write(es8389->regmap, ES8389_SYSTEM16, coeff_div[coeff].Reg0x16);
regmap_write(es8389->regmap, ES8389_SYSTEM18, coeff_div[coeff].Reg0x18);
regmap_write(es8389->regmap, ES8389_SYSTEM19, coeff_div[coeff].Reg0x19);
static const struct clk_coeff coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
snd_soc_component_update_bits(component, ML26124_PLLNL, 0xff, coeff_div[i].pllnl);
snd_soc_component_update_bits(component, ML26124_PLLNH, 0x1, coeff_div[i].pllnh);
snd_soc_component_update_bits(component, ML26124_PLLML, 0xff, coeff_div[i].pllml);
snd_soc_component_update_bits(component, ML26124_PLLMH, 0x3f, coeff_div[i].pllmh);
snd_soc_component_update_bits(component, ML26124_PLLDIV, 0x1f, coeff_div[i].plldiv);
static const struct coeff_clk_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].mclk == mclk && coeff_div[i].rate == rate &&
(coeff_div[i].bclk / coeff_div[i].rate) == timesofbclk)
coeff_div[coeff].reg_val);
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
u16 srate = (coeff_div[i].sr << 2) |
(coeff_div[i].bosr << 1) | coeff_div[i].usb;
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
u16 srate = (coeff_div[i].sr << 2) |
(coeff_div[i].bosr << 1) | coeff_div[i].usb;
} coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate != params_rate(params))
if (coeff_div[i].mclk == wm8737->mclk)
if (coeff_div[i].mclk == wm8737->mclk * 2) {
if (i == ARRAY_SIZE(coeff_div)) {
clocking |= coeff_div[i].usb | (coeff_div[i].sr << WM8737_SR_SHIFT);
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (freq == coeff_div[i].mclk ||
freq == coeff_div[i].mclk * 2) {
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
(coeff_div[coeff].sr << 1) | coeff_div[coeff].usb);
snd_soc_component_write(component, WM8753_SRATE1, srate | (coeff_div[coeff].sr << 1) |
coeff_div[coeff].usb);
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
(coeff_div[coeff].sr << 1) | coeff_div[coeff].usb);
static const struct _coeff_div coeff_div[] = {
for (i = 0; i < ARRAY_SIZE(coeff_div); i++) {
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
(coeff_div[coeff].sr << 1) | coeff_div[coeff].usb);