Lines Matching +full:invert +full:- +full:enable

1 // SPDX-License-Identifier: GPL-2.0-only
131 unsigned int invert:1; member
136 if (tvc->reg == tvc->rreg) in tda7419_vol_is_stereo()
146 (struct tda7419_vol_control *)kcontrol->private_value; in tda7419_vol_info()
148 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in tda7419_vol_info()
149 uinfo->count = tda7419_vol_is_stereo(tvc) ? 2 : 1; in tda7419_vol_info()
150 uinfo->value.integer.min = tvc->min; in tda7419_vol_info()
151 uinfo->value.integer.max = tvc->max; in tda7419_vol_info()
158 unsigned int invert) in tda7419_vol_get_value() argument
162 if (invert) in tda7419_vol_get_value()
163 val = 0 - val; in tda7419_vol_get_value()
165 if (invert) in tda7419_vol_get_value()
166 val = val - thresh; in tda7419_vol_get_value()
168 val = thresh - val; in tda7419_vol_get_value()
182 (struct tda7419_vol_control *)kcontrol->private_value; in tda7419_vol_get()
183 unsigned int reg = tvc->reg; in tda7419_vol_get()
184 unsigned int rreg = tvc->rreg; in tda7419_vol_get()
185 unsigned int mask = tvc->mask; in tda7419_vol_get()
186 int min = tvc->min; in tda7419_vol_get()
187 int thresh = tvc->thresh; in tda7419_vol_get()
188 unsigned int invert = tvc->invert; in tda7419_vol_get() local
192 ucontrol->value.integer.value[0] = in tda7419_vol_get()
193 tda7419_vol_get_value(val, mask, min, thresh, invert); in tda7419_vol_get()
197 ucontrol->value.integer.value[1] = in tda7419_vol_get()
198 tda7419_vol_get_value(val, mask, min, thresh, invert); in tda7419_vol_get()
205 unsigned int invert) in tda7419_vol_put_value() argument
208 if (invert) in tda7419_vol_put_value()
211 val = thresh - val; in tda7419_vol_put_value()
212 } else if ((val > 0) && invert) { in tda7419_vol_put_value()
225 (struct tda7419_vol_control *)kcontrol->private_value; in tda7419_vol_put()
226 unsigned int reg = tvc->reg; in tda7419_vol_put()
227 unsigned int rreg = tvc->rreg; in tda7419_vol_put()
228 unsigned int mask = tvc->mask; in tda7419_vol_put()
229 int thresh = tvc->thresh; in tda7419_vol_put()
230 unsigned int invert = tvc->invert; in tda7419_vol_put() local
234 val = tda7419_vol_put_value(ucontrol->value.integer.value[0], in tda7419_vol_put()
235 thresh, invert); in tda7419_vol_put()
242 val = tda7419_vol_put_value(ucontrol->value.integer.value[1], in tda7419_vol_put()
243 thresh, invert); in tda7419_vol_put()
254 .max = xmax, .thresh = xthresh, .invert = xinvert})
260 .max = xmax, .thresh = xthresh, .invert = xinvert})
298 static DECLARE_TLV_DB_SCALE(tlv_loudness_atten, -1500, 100, 0);
317 static DECLARE_TLV_DB_SCALE(tlv_volume, -8000, 100, 1);
320 static DECLARE_TLV_DB_SCALE(tlv_filter, -1500, 100, 0);
403 0x7f, -80, 15, 0x10, 0, tlv_volume),
407 0x1f, -15, 15, 0x10, 1, tlv_filter),
411 0x1f, -15, 15, 0x10, 1, tlv_filter),
416 0x1f, -15, 15, 0x10, 1, tlv_filter),
422 SOC_ENUM("Subwoofer Cut-off Frequency", soc_enum_sub_cut_off_freq),
430 TDA7419_ATTENUATOR_RF_REG, 0x7f, -80, 15, 0x10, 0,
437 TDA7419_ATTENUATOR_RR_REG, 0x7f, -80, 15, 0x10, 0,
444 0x7f, -80, 15, 0x10, 0, tlv_volume),
448 0x7f, -80, 15, 0x10, 0, tlv_volume),
502 SND_SOC_DAPM_SWITCH("Mix Enable", SND_SOC_NOPM,
511 SND_SOC_DAPM_SWITCH("Subwoofer Enable",
548 {"Subwoofer Enable", "Switch", "Main Source Select"},
550 {"Mix Enable", "Switch", "MIX"},
553 {"LF Output Mixer", "Mix to LF Speaker Switch", "Mix Enable"},
555 {"RF Output Mixer", "Mix to RF Speaker Switch", "Mix Enable"},
561 {"OUTSW", NULL, "Subwoofer Enable"},
580 tda7419 = devm_kzalloc(&i2c->dev, in tda7419_probe()
584 return -ENOMEM; in tda7419_probe()
588 tda7419->regmap = devm_regmap_init_i2c(i2c, &tda7419_regmap_config); in tda7419_probe()
589 if (IS_ERR(tda7419->regmap)) { in tda7419_probe()
590 ret = PTR_ERR(tda7419->regmap); in tda7419_probe()
591 dev_err(&i2c->dev, "error initializing regmap: %d\n", in tda7419_probe()
597 * Reset registers to power-on defaults. The part does not provide a in tda7419_probe()
598 * soft-reset function and the registers are not readable. This ensures in tda7419_probe()
603 regmap_write(tda7419->regmap, in tda7419_probe()
607 ret = devm_snd_soc_register_component(&i2c->dev, in tda7419_probe()
610 dev_err(&i2c->dev, "error registering component: %d\n", in tda7419_probe()