Lines Matching +full:switch +full:- +full:frequency +full:- +full:hz

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);
300 "Flat", "400 Hz", "800 Hz", "2400 Hz"};
317 static DECLARE_TLV_DB_SCALE(tlv_volume, -8000, 100, 1);
320 static DECLARE_TLV_DB_SCALE(tlv_filter, -1500, 100, 0);
347 "Flat", "80 Hz", "120 Hz", "160 Hz"};
352 "500 Hz", "1000 Hz", "1500 Hz", "2500 Hz"};
357 "60 Hz", "80 Hz", "100 Hz", "200 Hz"};
387 SOC_SINGLE("Main Source AutoZero Switch", TDA7419_MAIN_SRC_REG,
391 SOC_ENUM("Loudness Center Frequency", soc_enum_loudness_center_freq),
392 SOC_SINGLE("Loudness High Boost Switch", TDA7419_LOUDNESS_REG,
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),
400 SOC_SINGLE("Clock Fast Mode Switch", TDA7419_MUTE_CLK_REG,
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),
408 SOC_ENUM("Treble Center Frequency", soc_enum_treble_center_freq),
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),
423 SOC_ENUM("Middle Center Frequency", soc_enum_middle_center_freq),
424 SOC_ENUM("Bass Center Frequency", soc_enum_bass_center_freq),
425 SOC_SINGLE("Bass DC Mode Switch", TDA7419_SUB_MID_BASS_REG,
427 SOC_SINGLE("Smoothing Filter Switch", TDA7419_SUB_MID_BASS_REG,
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,
454 SOC_SINGLE("Spectrum Analyzer Run Switch", TDA7419_SA_CLK_AC_REG,
456 SOC_SINGLE("Spectrum Analyzer Reset Switch", TDA7419_SA_CLK_AC_REG,
463 SOC_DAPM_SINGLE("Mix to LF Speaker Switch",
469 SOC_DAPM_SINGLE("Mix to RF Speaker Switch",
475 SOC_DAPM_SINGLE("Switch", TDA7419_MIXING_GAIN_REG,
480 SOC_DAPM_SINGLE("Switch", TDA7419_MIXING_GAIN_REG,
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"},
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()