From: "Prchal Jiří" <jiri.prchal@aksignal.cz>
To: alsa-devel@alsa-project.org, vbarinov@embeddedalley.com,
mr.swami.reddy@ti.com, peter.ujfalusi@ti.com,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
sudhakar.raj@ti.com, nsekhar@ti.com, lrg@ti.com
Subject: [PATCH] ASoC: tlv320aic3x: add AGC settings
Date: Fri, 29 Jun 2012 10:52:20 +0200 [thread overview]
Message-ID: <4FED6CC4.4070807@aksignal.cz> (raw)
This patch adds AGC target level and times settings for TLV320AIC3106.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
---
sound/soc/codecs/tlv320aic3x.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 50a7112..5335ebc 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -204,6 +204,10 @@ static const char *aic3x_right_hpcom_mux[] =
static const char *aic3x_linein_mode_mux[] = { "single-ended", "differential" };
static const char *aic3x_adc_hpf[] =
{ "Disabled", "0.0045xFs", "0.0125xFs", "0.025xFs" };
+static const char *aic3x_agc_level[] =
+ { "-5.5dB", "-8dB", "-10dB", "-12dB", "-14dB", "-17dB", "-20dB", "-24dB" };
+static const char *aic3x_agc_attack[] = { "8ms", "11ms", "16ms", "20ms" };
+static const char *aic3x_agc_decay[] = { "100ms", "200ms", "400ms", "500ms" };
#define LDAC_ENUM 0
#define RDAC_ENUM 1
@@ -231,6 +235,21 @@ static const struct soc_enum aic3x_enum[] = {
SOC_ENUM_DOUBLE(AIC3X_CODEC_DFILT_CTRL, 6, 4, 4, aic3x_adc_hpf),
};
+#define LAGC_LEV_ENUM 0
+#define RAGC_LEV_ENUM 1
+#define LAGC_ATT_ENUM 2
+#define RAGC_ATT_ENUM 3
+#define LAGC_DEC_ENUM 4
+#define RAGC_DEC_ENUM 5
+static const struct soc_enum aic3x_agc_enum[] = {
+ SOC_ENUM_SINGLE(LAGC_CTRL_A, 4, 8, aic3x_agc_level),
+ SOC_ENUM_SINGLE(RAGC_CTRL_A, 4, 8, aic3x_agc_level),
+ SOC_ENUM_SINGLE(LAGC_CTRL_A, 2, 4, aic3x_agc_attack),
+ SOC_ENUM_SINGLE(RAGC_CTRL_A, 2, 4, aic3x_agc_attack),
+ SOC_ENUM_SINGLE(LAGC_CTRL_A, 0, 4, aic3x_agc_decay),
+ SOC_ENUM_SINGLE(RAGC_CTRL_A, 0, 4, aic3x_agc_decay),
+};
+
/*
* DAC digital volumes. From -63.5 to 0 dB in 0.5 dB steps
*/
@@ -355,6 +374,12 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = {
* adjust PGA to max value when ADC is on and will never go back.
*/
SOC_DOUBLE_R("AGC Switch", LAGC_CTRL_A, RAGC_CTRL_A, 7, 0x01, 0),
+ SOC_ENUM("Left AGC Target level", aic3x_agc_enum[LAGC_LEV_ENUM]),
+ SOC_ENUM("Right AGC Target level", aic3x_agc_enum[RAGC_LEV_ENUM]),
+ SOC_ENUM("Left AGC Attack time", aic3x_agc_enum[LAGC_ATT_ENUM]),
+ SOC_ENUM("Right AGC Attack time", aic3x_agc_enum[RAGC_ATT_ENUM]),
+ SOC_ENUM("Left AGC Decay time", aic3x_agc_enum[LAGC_DEC_ENUM]),
+ SOC_ENUM("Right AGC Decay time", aic3x_agc_enum[RAGC_DEC_ENUM]),
/* Input */
SOC_DOUBLE_R_TLV("PGA Capture Volume", LADC_VOL, RADC_VOL,
--
1.7.7
next reply other threads:[~2012-06-29 8:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 8:52 Prchal Jiří [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-10 12:35 [PATCH] ASoC: tlv320aic3x: add AGC settings Jiri Prchal
2012-07-10 13:42 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FED6CC4.4070807@aksignal.cz \
--to=jiri.prchal@aksignal.cz \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=mr.swami.reddy@ti.com \
--cc=nsekhar@ti.com \
--cc=peter.ujfalusi@ti.com \
--cc=sudhakar.raj@ti.com \
--cc=vbarinov@embeddedalley.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.