Searched refs:gain_r_val (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/sound/soc/codecs/ |
H A D | rt711-sdca.c | 578 if (gain_r_val > mc->max) in rt711_sdca_set_gain_put() 579 gain_r_val = mc->max; in rt711_sdca_set_gain_put() 580 read_r = gain_r_val; in rt711_sdca_set_gain_put() 583 gain_r_val = (gain_r_val * 10) << mc->shift; in rt711_sdca_set_gain_put() 586 gain_r_val = (gain_r_val - mc->shift) * 75; in rt711_sdca_set_gain_put() 588 gain_r_val = (mc->shift - gain_r_val) * 75; in rt711_sdca_set_gain_put() 589 gain_r_val <<= 8; in rt711_sdca_set_gain_put() 590 gain_r_val /= 100; in rt711_sdca_set_gain_put() 592 gain_r_val = ~gain_r_val; in rt711_sdca_set_gain_put() 593 gain_r_val += 1; in rt711_sdca_set_gain_put() [all …]
|
H A D | rt712-sdca.c | 487 unsigned int read_l, read_r, gain_l_val, gain_r_val; in rt712_sdca_set_gain_put() local 516 gain_r_val = ucontrol->value.integer.value[1]; in rt712_sdca_set_gain_put() 517 if (gain_r_val > mc->max) in rt712_sdca_set_gain_put() 518 gain_r_val = mc->max; in rt712_sdca_set_gain_put() 521 gain_r_val = gain_r_val * tendB; in rt712_sdca_set_gain_put() 525 gain_r_val = 0x1e00 - ((mc->max - gain_r_val) * interval_offset); in rt712_sdca_set_gain_put() 527 gain_r_val = 0 - ((mc->max - gain_r_val) * interval_offset); in rt712_sdca_set_gain_put() 528 gain_r_val &= 0xffff; in rt712_sdca_set_gain_put() 531 if (lvalue == gain_l_val && rvalue == gain_r_val) in rt712_sdca_set_gain_put() 537 regmap_write(rt712->mbq_regmap, mc->rreg, gain_r_val); in rt712_sdca_set_gain_put() [all …]
|
H A D | rt722-sdca.c | 353 unsigned int read_l, read_r, gain_l_val, gain_r_val; in rt722_sdca_set_gain_put() local 383 gain_r_val = ucontrol->value.integer.value[1]; in rt722_sdca_set_gain_put() 384 if (gain_r_val > mc->max) in rt722_sdca_set_gain_put() 385 gain_r_val = mc->max; in rt722_sdca_set_gain_put() 388 gain_r_val = gain_r_val * tendB; in rt722_sdca_set_gain_put() 392 gain_r_val = 0x1e00 - ((mc->max - gain_r_val) * interval_offset); in rt722_sdca_set_gain_put() 394 gain_r_val = 0 - ((mc->max - gain_r_val) * interval_offset); in rt722_sdca_set_gain_put() 395 gain_r_val &= 0xffff; in rt722_sdca_set_gain_put() 398 if (lvalue != gain_l_val || rvalue != gain_r_val) in rt722_sdca_set_gain_put() 407 regmap_write(rt722->mbq_regmap, mc->rreg, gain_r_val); in rt722_sdca_set_gain_put() [all …]
|