summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorHenrik Segerback <henrik.xh.segerback@stericsson.com>2011-05-20 10:22:24 +0200
committersaid m bagheri <ebgheri@steludxu2848.(none)>2011-06-17 13:41:54 +0200
commit35bd092008dbab559c8f9f7390fbe04512fb0b64 (patch)
tree33f2487aa5f436bea5d34108f3d26342507dd7a4 /sound
parent8a38f28de819dfbcba9a18c98ecc789376213d80 (diff)
Ux500 ASoC: Add controls for negative charge pump
Adds the following ALSA controls for the negative charge pump, which provides power to the headset: Charge Pump High Threshold For Low Voltage Charge Pump Low Threshold For Low Voltage Charge Pump Envelope Detection Charge Pump Envelope Detection Decay Time ST-Ericsson ID: 337868 Change-Id: Ieecab4dc880cb4ea63e4dd4980e78879abc17bf3 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23516 Tested-by: Henrik SEGERBACK <henrik.xh.segerback@stericsson.com> Reviewed-by: Ola LILJA2 <ola.o.lilja@stericsson.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/ab8500_audio.c28
-rw-r--r--sound/soc/codecs/ab8500_audio.h3
2 files changed, 31 insertions, 0 deletions
diff --git a/sound/soc/codecs/ab8500_audio.c b/sound/soc/codecs/ab8500_audio.c
index d56aed95a72..84ae53c6e38 100644
--- a/sound/soc/codecs/ab8500_audio.c
+++ b/sound/soc/codecs/ab8500_audio.c
@@ -1085,6 +1085,26 @@ static const char *enum_hsfadspeed[] = {"2ms", "0.5ms", "10.6ms", "5ms"};
static SOC_ENUM_SINGLE_DECL(soc_enum_hsfadspeed,
REG_DIGMICCONF, REG_DIGMICCONF_HSFADSPEED, enum_hsfadspeed);
+static const char *enum_envdetthre[] = {
+ "250mV", "300mV", "350mV", "400mV",
+ "450mV", "500mV", "550mV", "600mV",
+ "650mV", "700mV", "750mV", "800mV",
+ "850mV", "900mV", "950mV", "1.00V" };
+static SOC_ENUM_SINGLE_DECL(soc_enum_envdetcpen,
+ REG_SIGENVCONF, REG_SIGENVCONF_ENVDETCPEN, enum_dis_ena);
+static SOC_ENUM_SINGLE_DECL(soc_enum_envdeththre,
+ REG_ENVCPCONF, REG_ENVCPCONF_ENVDETHTHRE, enum_envdetthre);
+static SOC_ENUM_SINGLE_DECL(soc_enum_envdetlthre,
+ REG_ENVCPCONF, REG_ENVCPCONF_ENVDETLTHRE, enum_envdetthre);
+
+static const char* enum_envdettime[] = {
+ "26.6us", "53.2us", "106us", "213us",
+ "426us", "851us", "1.70ms", "3.40ms",
+ "6.81ms", "13.6ms", "27.2ms", "54.5ms",
+ "109ms", "218ms", "436ms", "872ms" };
+static SOC_ENUM_SINGLE_DECL(soc_enum_envdettime,
+ REG_SIGENVCONF, REG_SIGENVCONF_ENVDETTIME, enum_envdettime);
+
static const char *enum_ensemicx[] = {"Differential", "Single Ended"};
static SOC_ENUM_SINGLE_DECL(soc_enum_ensemic1,
REG_ANAGAIN1, REG_ANAGAINX_ENSEMICX, enum_ensemicx);
@@ -1342,6 +1362,14 @@ static struct snd_kcontrol_new ab8500_snd_controls[] = {
SOC_ENUM("Headset Fade Speed Playback Switch", soc_enum_hsfadspeed),
+ SOC_ENUM("Charge Pump High Threshold For Low Voltage",
+ soc_enum_envdeththre),
+ SOC_ENUM("Charge Pump Low Threshold For Low Voltage",
+ soc_enum_envdetlthre),
+ SOC_ENUM("Charge Pump Envelope Detection", soc_enum_envdetcpen),
+ SOC_ENUM("Charge Pump Envelope Detection Decay Time",
+ soc_enum_envdettime),
+
SOC_ENUM("Mic 1 Type Capture Switch", soc_enum_ensemic1),
SOC_ENUM("Mic 2 Type Capture Switch", soc_enum_ensemic2),
SOC_ENUM("Mic 1 Low Power Capture Switch", soc_enum_lowpowmic1),
diff --git a/sound/soc/codecs/ab8500_audio.h b/sound/soc/codecs/ab8500_audio.h
index 3c8e44d673c..8e2468d7883 100644
--- a/sound/soc/codecs/ab8500_audio.h
+++ b/sound/soc/codecs/ab8500_audio.h
@@ -241,12 +241,15 @@ int ab8500_audio_setup_if1(struct snd_soc_codec *codec,
#define REG_ANACONF5_HSAUTOEN 0
/* REG_ENVCPCONF */
+#define REG_ENVCPCONF_ENVDETHTHRE 4
+#define REG_ENVCPCONF_ENVDETLTHRE 0
#define REG_ENVCPCONF_ENVDETHTHRE_MAX 0x0F
#define REG_ENVCPCONF_ENVDETLTHRE_MAX 0x0F
/* REG_SIGENVCONF */
#define REG_SIGENVCONF_CPLVEN 5
#define REG_SIGENVCONF_ENVDETCPEN 4
+#define REG_SIGENVCONF_ENVDETTIME 0
#define REG_SIGENVCONF_ENVDETTIME_MAX 0x0F
/* REG_PWMGENCONF1 */