* [PATCH 4/4] ASoC: tlv320aic3x: add AGC settings
@ 2012-07-10 7:41 Jiri Prchal
2012-07-10 8:57 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Prchal @ 2012-07-10 7:41 UTC (permalink / raw)
To: broonie, alsa-devel; +Cc: Jiri Prchal
This patch adds AGC target level and times settings for TLV320AIC3x.
Enums uses small arrays of two channels left and right since it uses different registers.
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 0b17e66..11e195f 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -256,6 +256,25 @@ static const struct soc_enum aic3x_enum[] = {
SOC_ENUM_DOUBLE(AIC3X_CODEC_DFILT_CTRL, 6, 4, 4, aic3x_adc_hpf),
};
+static const char *aic3x_agc_level[] =
+ { "-5.5dB", "-8dB", "-10dB", "-12dB", "-14dB", "-17dB", "-20dB", "-24dB" };
+static const struct soc_enum aic3x_agc_level_enum[] = {
+ SOC_ENUM_SINGLE(LAGC_CTRL_A, 4, 8, aic3x_agc_level),
+ SOC_ENUM_SINGLE(RAGC_CTRL_A, 4, 8, aic3x_agc_level),
+};
+
+static const char *aic3x_agc_attack[] = { "8ms", "11ms", "16ms", "20ms" };
+static const struct soc_enum aic3x_agc_attack_enum[] = {
+ SOC_ENUM_SINGLE(LAGC_CTRL_A, 2, 4, aic3x_agc_attack),
+ SOC_ENUM_SINGLE(RAGC_CTRL_A, 2, 4, aic3x_agc_attack),
+};
+
+static const char *aic3x_agc_decay[] = { "100ms", "200ms", "400ms", "500ms" };
+static const struct soc_enum aic3x_agc_decay_enum[] = {
+ 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
*/
@@ -380,6 +399,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_level_enum[0]),
+ SOC_ENUM("Right AGC Target level", aic3x_agc_level_enum[1]),
+ SOC_ENUM("Left AGC Attack time", aic3x_agc_attack_enum[0]),
+ SOC_ENUM("Right AGC Attack time", aic3x_agc_attack_enum[1]),
+ SOC_ENUM("Left AGC Decay time", aic3x_agc_decay_enum[0]),
+ SOC_ENUM("Right AGC Decay time", aic3x_agc_decay_enum[1]),
/* De-emphasis */
SOC_DOUBLE("De-emphasis Switch", AIC3X_CODEC_DFILT_CTRL, 2, 0, 0x01, 0),
--
1.7.7
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 4/4] ASoC: tlv320aic3x: add AGC settings
2012-07-10 7:41 [PATCH 4/4] ASoC: tlv320aic3x: add AGC settings Jiri Prchal
@ 2012-07-10 8:57 ` Mark Brown
2012-07-10 9:16 ` Prchal Jiří
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2012-07-10 8:57 UTC (permalink / raw)
To: Jiri Prchal; +Cc: alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 269 bytes --]
On Tue, Jul 10, 2012 at 09:41:10AM +0200, Jiri Prchal wrote:
> This patch adds AGC target level and times settings for TLV320AIC3x.
> Enums uses small arrays of two channels left and right since it uses different registers.
Patches 1-3 don't seem to have been sent...
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 4/4] ASoC: tlv320aic3x: add AGC settings
2012-07-10 8:57 ` Mark Brown
@ 2012-07-10 9:16 ` Prchal Jiří
2012-07-10 11:54 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Prchal Jiří @ 2012-07-10 9:16 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel
Oh, sorry about that,
sending patch from git I cannot remove this numbering starting with 1 on already applied patch.
How can I fix it?
Dne 10.7.2012 10:57, Mark Brown napsal(a):
> On Tue, Jul 10, 2012 at 09:41:10AM +0200, Jiri Prchal wrote:
>> This patch adds AGC target level and times settings for TLV320AIC3x.
>> Enums uses small arrays of two channels left and right since it uses different registers.
>
> Patches 1-3 don't seem to have been sent...
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-10 11:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10 7:41 [PATCH 4/4] ASoC: tlv320aic3x: add AGC settings Jiri Prchal
2012-07-10 8:57 ` Mark Brown
2012-07-10 9:16 ` Prchal Jiří
2012-07-10 11:54 ` Mark Brown
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.