From: Ryan Lee <ryans.lee@maximintegrated.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, ryans.lee@maximintegrated.com,
kuninori.morimoto.gx@renesas.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Cc: ryan.lee.maxim@gmail.com
Subject: [PATCH 2/9] ASoC: max98927: Added controls for Envelope tracking
Date: Fri, 25 Aug 2017 17:41:03 -0700 [thread overview]
Message-ID: <1503708070-7906-2-git-send-email-ryans.lee@maximintegrated.com> (raw)
In-Reply-To: <1503708070-7906-1-git-send-email-ryans.lee@maximintegrated.com>
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
---
Changes : Added controls to support envelope tracking function
sound/soc/codecs/max98927.c | 20 ++++++++++++++++----
sound/soc/codecs/max98927.h | 4 ++++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c
index 951cc05..1dfcb7b 100644
--- a/sound/soc/codecs/max98927.c
+++ b/sound/soc/codecs/max98927.c
@@ -614,6 +614,18 @@ static SOC_ENUM_SINGLE_DECL(max98927_current_limit,
MAX98927_R0042_BOOST_CTRL1, 1,
max98927_current_limit_text);
+static const char * const max98927_env_track_headroom_text[] = {
+ "0.000V", "0.125V", "0.250V", "0.375V", "0.500V", "0.625V",
+ "0.750V", "0.875V", "1.000V", "1.125V", "1.250V", "1.375V",
+ "1.500V", "1.625V", "1.750V", "1.875V", "2.000V", "2.125V",
+ "2.250V", "2.375V", "2.500V", "2.625V", "2.750V", "2.875V",
+ "3.000V", "3.125V", "3.250V", "3.375V", "3.500V"
+};
+
+static SOC_ENUM_SINGLE_DECL(max98927_env_track_headroom,
+ MAX98927_R0082_ENV_TRACK_VOUT_HEADROOM, 0,
+ max98927_env_track_headroom_text);
+
static const struct snd_kcontrol_new max98927_snd_controls[] = {
SOC_SINGLE_TLV("Speaker Volume", MAX98927_R003C_SPK_GAIN,
0, 6, 0,
@@ -631,6 +643,9 @@ static SOC_ENUM_SINGLE_DECL(max98927_current_limit,
MAX98927_AMP_VOL_SEL_SHIFT, 1, 0),
SOC_ENUM("Boost Output Voltage", max98927_boost_voltage),
SOC_ENUM("Current Limit", max98927_current_limit),
+ SOC_SINGLE("EnvTrack Switch", MAX98927_R0086_ENV_TRACK_CTRL,
+ MAX98927_ENV_TRACKER_EN_SHIFT, 1, 0),
+ SOC_ENUM("EnvTrack Headroom", max98927_env_track_headroom),
};
static const struct snd_soc_dapm_route max98927_audio_map[] = {
@@ -725,13 +740,10 @@ static int max98927_probe(struct snd_soc_codec *codec)
/* Envelope Tracking configuration */
regmap_write(max98927->regmap,
MAX98927_R0082_ENV_TRACK_VOUT_HEADROOM,
- 0x08);
+ 0x0A);
regmap_write(max98927->regmap,
MAX98927_R0086_ENV_TRACK_CTRL,
0x01);
- regmap_write(max98927->regmap,
- MAX98927_R0087_ENV_TRACK_BOOST_VOUT_READ,
- 0x10);
/* voltage, current slot configuration */
regmap_write(max98927->regmap,
diff --git a/sound/soc/codecs/max98927.h b/sound/soc/codecs/max98927.h
index bf7a6f92..3069a09 100644
--- a/sound/soc/codecs/max98927.h
+++ b/sound/soc/codecs/max98927.h
@@ -250,6 +250,10 @@
#define MAX98927_BROWNOUT_DSP_EN (0x1 << 2)
#define MAX98927_BROWNOUT_DSP_SHIFT (2)
+/* MAX98927_R0086_ENV_TRACK_CTRL */
+#define MAX98927_ENV_TRACKER_EN (0x1 << 0)
+#define MAX98927_ENV_TRACKER_EN_SHIFT (0)
+
/* MAX98927_R0100_SOFT_RESET */
#define MAX98927_SOFT_RESET (0x1 << 0)
--
1.9.1
next prev parent reply other threads:[~2017-08-26 0:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-26 0:41 [PATCH 1/9] ASoC: max98927: Added TDM support Ryan Lee
2017-08-26 0:41 ` Ryan Lee [this message]
2017-08-26 0:41 ` [PATCH 3/9] ASoC: max98927: Updated volatile register list Ryan Lee
2017-08-26 0:41 ` [PATCH 4/9] ASoC: max98927: Added missing \n to end of dev_err messages Ryan Lee
2017-08-26 0:41 ` [PATCH 5/9] ASoC: max98927: Removed obsolete variables Ryan Lee
2017-08-26 0:41 ` [PATCH 6/9] ASoC: max98927: Modified chip default register values Ryan Lee
2017-08-26 0:41 ` [PATCH 7/9] ASoC: max98927: Added PM suspend and resume function Ryan Lee
2017-08-26 0:41 ` [PATCH 8/9] ASoC: max98927: Modified DAPM widget and map to enable/disable VI sense path Ryan Lee
2017-08-31 11:54 ` Applied "ASoC: max98927: Modified DAPM widget and map to enable/disable VI sense path" to the asoc tree Mark Brown
2017-08-26 0:41 ` [PATCH 9/9] ASoC: max98927: Changed device property read function Ryan Lee
2017-08-31 11:54 ` Applied "ASoC: max98927: Changed device property read function" to the asoc tree Mark Brown
2017-08-27 14:02 ` [PATCH 1/9] ASoC: max98927: Added TDM support Mark Brown
2017-08-28 23:34 ` Ryan Lee
2017-08-28 23:30 [PATCH 1/9] ASoC: max98927: Added support for DSP_A and DSP_B format Ryan Lee
2017-08-28 23:30 ` [PATCH 2/9] ASoC: max98927: Added controls for Envelope tracking Ryan Lee
2017-08-31 11:43 ` Mark Brown
2017-09-01 21:38 ` Ryan Lee
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=1503708070-7906-2-git-send-email-ryans.lee@maximintegrated.com \
--to=ryans.lee@maximintegrated.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=ryan.lee.maxim@gmail.com \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome