Lines Matching +full:invert +full:- +full:enable
139 unsigned int invert:1; member
144 if (tvc->reg == tvc->rreg) in tda7419_vol_is_stereo()
154 (struct tda7419_vol_control *)kcontrol->private_value; in tda7419_vol_info()
156 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in tda7419_vol_info()
157 uinfo->count = tda7419_vol_is_stereo(tvc) ? 2 : 1; in tda7419_vol_info()
158 uinfo->value.integer.min = tvc->min; in tda7419_vol_info()
159 uinfo->value.integer.max = tvc->max; in tda7419_vol_info()
166 unsigned int invert) in tda7419_vol_get_value() argument
170 if (invert) in tda7419_vol_get_value()
171 val = 0 - val; in tda7419_vol_get_value()
173 if (invert) in tda7419_vol_get_value()
174 val = val - thresh; in tda7419_vol_get_value()
176 val = thresh - val; in tda7419_vol_get_value()
190 (struct tda7419_vol_control *)kcontrol->private_value; in tda7419_vol_get()
191 unsigned int reg = tvc->reg; in tda7419_vol_get()
192 unsigned int rreg = tvc->rreg; in tda7419_vol_get()
193 unsigned int mask = tvc->mask; in tda7419_vol_get()
194 int min = tvc->min; in tda7419_vol_get()
195 int thresh = tvc->thresh; in tda7419_vol_get()
196 unsigned int invert = tvc->invert; in tda7419_vol_get() local
203 ucontrol->value.integer.value[0] = in tda7419_vol_get()
204 tda7419_vol_get_value(val, mask, min, thresh, invert); in tda7419_vol_get()
210 ucontrol->value.integer.value[1] = in tda7419_vol_get()
211 tda7419_vol_get_value(val, mask, min, thresh, invert); in tda7419_vol_get()
218 unsigned int invert) in tda7419_vol_put_value() argument
221 if (invert) in tda7419_vol_put_value()
224 val = thresh - val; in tda7419_vol_put_value()
225 } else if ((val > 0) && invert) { in tda7419_vol_put_value()
238 (struct tda7419_vol_control *)kcontrol->private_value; in tda7419_vol_put()
239 unsigned int reg = tvc->reg; in tda7419_vol_put()
240 unsigned int rreg = tvc->rreg; in tda7419_vol_put()
241 unsigned int mask = tvc->mask; in tda7419_vol_put()
242 int thresh = tvc->thresh; in tda7419_vol_put()
243 unsigned int invert = tvc->invert; in tda7419_vol_put() local
247 val = tda7419_vol_put_value(ucontrol->value.integer.value[0], in tda7419_vol_put()
248 thresh, invert); in tda7419_vol_put()
255 val = tda7419_vol_put_value(ucontrol->value.integer.value[1], in tda7419_vol_put()
256 thresh, invert); in tda7419_vol_put()
267 .max = xmax, .thresh = xthresh, .invert = xinvert})
273 .max = xmax, .thresh = xthresh, .invert = xinvert})
311 static DECLARE_TLV_DB_SCALE(tlv_loudness_atten, -1500, 100, 0);
330 static DECLARE_TLV_DB_SCALE(tlv_volume, -8000, 100, 1);
333 static DECLARE_TLV_DB_SCALE(tlv_filter, -1500, 100, 0);
416 0x7f, -80, 15, 0x10, 0, tlv_volume),
420 0x1f, -15, 15, 0x10, 1, tlv_filter),
424 0x1f, -15, 15, 0x10, 1, tlv_filter),
429 0x1f, -15, 15, 0x10, 1, tlv_filter),
435 SOC_ENUM("Subwoofer Cut-off Frequency", soc_enum_sub_cut_off_freq),
443 TDA7419_ATTENUATOR_RF_REG, 0x7f, -80, 15, 0x10, 0,
450 TDA7419_ATTENUATOR_RR_REG, 0x7f, -80, 15, 0x10, 0,
457 0x7f, -80, 15, 0x10, 0, tlv_volume),
461 0x7f, -80, 15, 0x10, 0, tlv_volume),
515 SND_SOC_DAPM_SWITCH("Mix Enable", SND_SOC_NOPM,
524 SND_SOC_DAPM_SWITCH("Subwoofer Enable",
561 {"Subwoofer Enable", "Switch", "Main Source Select"},
563 {"Mix Enable", "Switch", "MIX"},
566 {"LF Output Mixer", "Mix to LF Speaker Switch", "Mix Enable"},
568 {"RF Output Mixer", "Mix to RF Speaker Switch", "Mix Enable"},
574 {"OUTSW", NULL, "Subwoofer Enable"},
593 tda7419 = devm_kzalloc(&i2c->dev, in tda7419_probe()
597 return -ENOMEM; in tda7419_probe()
601 tda7419->regmap = devm_regmap_init_i2c(i2c, &tda7419_regmap_config); in tda7419_probe()
602 if (IS_ERR(tda7419->regmap)) { in tda7419_probe()
603 ret = PTR_ERR(tda7419->regmap); in tda7419_probe()
604 dev_err(&i2c->dev, "error initializing regmap: %d\n", in tda7419_probe()
610 * Reset registers to power-on defaults. The part does not provide a in tda7419_probe()
611 * soft-reset function and the registers are not readable. This ensures in tda7419_probe()
616 regmap_write(tda7419->regmap, in tda7419_probe()
620 ret = devm_snd_soc_register_component(&i2c->dev, in tda7419_probe()
623 dev_err(&i2c->dev, "error registering component: %d\n", in tda7419_probe()