Lines Matching +full:enable +full:- +full:soft +full:- +full:reset

1 // SPDX-License-Identifier: GPL-2.0-only
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()
163 val = 0 - val; 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()
192 ucontrol->value.integer.value[0] = in tda7419_vol_get()
197 ucontrol->value.integer.value[1] = in tda7419_vol_get()
211 val = thresh - val; 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()
234 val = tda7419_vol_put_value(ucontrol->value.integer.value[0], in tda7419_vol_put()
242 val = tda7419_vol_put_value(ucontrol->value.integer.value[1], in tda7419_vol_put()
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);
394 SOC_SINGLE("Loudness Soft Step Switch", TDA7419_LOUDNESS_REG,
396 SOC_SINGLE("Soft Mute Switch", TDA7419_MUTE_CLK_REG, TDA7419_SOFT_MUTE, 1, 1),
398 SOC_ENUM("Soft Mute Time", soc_enum_soft_mute_time),
399 SOC_ENUM("Soft Step Time", soc_enum_soft_step_time),
403 0x7f, -80, 15, 0x10, 0, tlv_volume),
404 SOC_SINGLE("Volume Soft Step Switch", TDA7419_VOLUME_REG,
407 0x1f, -15, 15, 0x10, 1, tlv_filter),
411 0x1f, -15, 15, 0x10, 1, tlv_filter),
413 SOC_SINGLE("Middle Soft Step Switch", TDA7419_MIDDLE_REG,
416 0x1f, -15, 15, 0x10, 1, tlv_filter),
418 SOC_SINGLE("Bass Soft Step Switch", TDA7419_BASS_REG,
422 SOC_ENUM("Subwoofer Cut-off Frequency", soc_enum_sub_cut_off_freq),
430 TDA7419_ATTENUATOR_RF_REG, 0x7f, -80, 15, 0x10, 0,
432 SOC_SINGLE("Left Front Soft Step Switch", TDA7419_ATTENUATOR_LF_REG,
434 SOC_SINGLE("Right Front Soft Step Switch", TDA7419_ATTENUATOR_RF_REG,
437 TDA7419_ATTENUATOR_RR_REG, 0x7f, -80, 15, 0x10, 0,
439 SOC_SINGLE("Left Rear Soft Step Switch", TDA7419_ATTENUATOR_LR_REG,
441 SOC_SINGLE("Right Rear Soft Step Switch", TDA7419_ATTENUATOR_RR_REG,
444 0x7f, -80, 15, 0x10, 0, tlv_volume),
445 SOC_SINGLE("Mixing Level Soft Step Switch", TDA7419_MIXING_LEVEL_REG,
448 0x7f, -80, 15, 0x10, 0, tlv_volume),
449 SOC_SINGLE("Subwoofer Soft Step Switch", TDA7419_ATTENUATOR_SUB_REG,
452 SOC_ENUM("Spectrum Analyzer Reset Mode", soc_enum_reset_mode),
456 SOC_SINGLE("Spectrum Analyzer Reset Switch", TDA7419_SA_CLK_AC_REG,
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"},
579 tda7419 = devm_kzalloc(&i2c->dev, in tda7419_probe()
583 return -ENOMEM; in tda7419_probe()
587 tda7419->regmap = devm_regmap_init_i2c(i2c, &tda7419_regmap_config); in tda7419_probe()
588 if (IS_ERR(tda7419->regmap)) { in tda7419_probe()
589 ret = PTR_ERR(tda7419->regmap); in tda7419_probe()
590 dev_err(&i2c->dev, "error initializing regmap: %d\n", in tda7419_probe()
596 * Reset registers to power-on defaults. The part does not provide a in tda7419_probe()
597 * soft-reset function and the registers are not readable. This ensures in tda7419_probe()
602 regmap_write(tda7419->regmap, in tda7419_probe()
606 ret = devm_snd_soc_register_component(&i2c->dev, in tda7419_probe()
609 dev_err(&i2c->dev, "error registering component: %d\n", in tda7419_probe()