Commit aca86ec9 authored by Martin Povišer's avatar Martin Povišer Committed by Mark Brown

ASoC: tas2764: Export highpass filter setting

Expose a control for the setting of 'DC blocker' highpass filter in the
playback path of TAS2764.
Signed-off-by: default avatarMartin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-6-povik+lin@cutebit.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent dae191fb
......@@ -593,11 +593,21 @@ static int tas2764_codec_probe(struct snd_soc_component *component)
static DECLARE_TLV_DB_SCALE(tas2764_digital_tlv, 1100, 50, 0);
static DECLARE_TLV_DB_SCALE(tas2764_playback_volume, -10050, 50, 1);
static const char * const tas2764_hpf_texts[] = {
"Disabled", "2 Hz", "50 Hz", "100 Hz", "200 Hz",
"400 Hz", "800 Hz"
};
static SOC_ENUM_SINGLE_DECL(
tas2764_hpf_enum, TAS2764_DC_BLK0,
TAS2764_DC_BLK0_HPF_FREQ_PB_SHIFT, tas2764_hpf_texts);
static const struct snd_kcontrol_new tas2764_snd_controls[] = {
SOC_SINGLE_TLV("Speaker Volume", TAS2764_DVC, 0,
TAS2764_DVC_MAX, 1, tas2764_playback_volume),
SOC_SINGLE_TLV("Amp Gain Volume", TAS2764_CHNL_0, 1, 0x14, 0,
tas2764_digital_tlv),
SOC_ENUM("HPF Corner Frequency", tas2764_hpf_enum),
};
static const struct snd_soc_component_driver soc_component_driver_tas2764 = {
......
......@@ -33,6 +33,10 @@
#define TAS2764_VSENSE_POWER_EN 3
#define TAS2764_ISENSE_POWER_EN 4
/* DC Blocker Control */
#define TAS2764_DC_BLK0 TAS2764_REG(0x0, 0x04)
#define TAS2764_DC_BLK0_HPF_FREQ_PB_SHIFT 0
/* Digital Volume Control */
#define TAS2764_DVC TAS2764_REG(0X0, 0x1a)
#define TAS2764_DVC_MAX 0xc9
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment