summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/ab8500_audio.c27
-rw-r--r--sound/soc/codecs/ab8500_audio.h8
2 files changed, 34 insertions, 1 deletions
diff --git a/sound/soc/codecs/ab8500_audio.c b/sound/soc/codecs/ab8500_audio.c
index 84ae53c6e38..49b4bf32417 100644
--- a/sound/soc/codecs/ab8500_audio.c
+++ b/sound/soc/codecs/ab8500_audio.c
@@ -1340,6 +1340,12 @@ static SOC_ENUM_SINGLE_DECL(soc_enum_bfifomast,
static SOC_ENUM_SINGLE_DECL(soc_enum_bfifoint,
REG_FIFOCONF3, REG_FIFOCONF3_BFIFORUN_SHIFT, enum_dis_ena);
+/* Sidetone */
+static const char *enum_coeffctrl[] = {"Ready", "Apply"};
+static SOC_ENUM_SINGLE_DECL(soc_enum_coeffctrl,
+ REG_SIDFIRADR, REG_SIDFIRADR_FIRSIDSET, enum_coeffctrl);
+
+
/* TODO: move to DAPM */
static SOC_ENUM_SINGLE_DECL(soc_enum_enfirsids,
REG_SIDFIRCONF, REG_SIDFIRCONF_ENFIRSIDS, enum_dis_ena);
@@ -1585,7 +1591,26 @@ static struct snd_kcontrol_new ab8500_snd_controls[] = {
REG_FIFOCONF6,
REG_FIFOCONF6_BFIFOSAMPLE_SHIFT,
REG_FIFOCONF6_BFIFOSAMPLE_MAX,
- NORMAL)
+ NORMAL),
+
+ /* Sidetone */
+ SOC_SINGLE("Sidetone FIR Coeffecient Index",
+ REG_SIDFIRADR,
+ REG_SIDFIRADR_ADDRESS_SHIFT,
+ REG_SIDFIRADR_ADDRESS_MAX,
+ NORMAL),
+ SOC_ENUM("Sidetone FIR Apply Coeffecients", soc_enum_coeffctrl),
+
+ SOC_SINGLE("Sidetone FIR Coeffecient Value MSB",
+ REG_SIDFIRCOEF1,
+ REG_SIDFIRCOEFX_VALUE_SHIFT,
+ REG_SIDFIRCOEFX_VALUE_MAX,
+ NORMAL),
+ SOC_SINGLE("Sidetone FIR Coeffecient Value LSB",
+ REG_SIDFIRCOEF2,
+ REG_SIDFIRCOEFX_VALUE_SHIFT,
+ REG_SIDFIRCOEFX_VALUE_MAX,
+ NORMAL),
};
static int ab8500_codec_set_format_if1(struct snd_soc_codec *codec, unsigned int fmt)
diff --git a/sound/soc/codecs/ab8500_audio.h b/sound/soc/codecs/ab8500_audio.h
index 8e2468d7883..1ff7dafa3e7 100644
--- a/sound/soc/codecs/ab8500_audio.h
+++ b/sound/soc/codecs/ab8500_audio.h
@@ -505,9 +505,17 @@ int ab8500_audio_setup_if1(struct snd_soc_codec *codec,
/* REG_ANCCONF12 */
/* REG_ANCCONF13 */
/* REG_ANCCONF14 */
+
/* REG_SIDFIRADR */
+#define REG_SIDFIRADR_FIRSIDSET 7
+#define REG_SIDFIRADR_ADDRESS_SHIFT 0
+#define REG_SIDFIRADR_ADDRESS_MAX 0x7F
+
/* REG_SIDFIRCOEF1 */
/* REG_SIDFIRCOEF2 */
+#define REG_SIDFIRCOEFX_VALUE_SHIFT 0
+#define REG_SIDFIRCOEFX_VALUE_MAX 0xFF
+
/* REG_SIDFIRCONF */
#define REG_SIDFIRCONF_ENFIRSIDS 2
#define REG_SIDFIRCONF_FIRSIDSTOIF1 1