From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Peter Ujfalusi <peter.ujfalusi@nokia.com>
Subject: [PATCH 6/7] ASoC: TWL4030: Add volume controls for outputs
Date: Mon, 1 Dec 2008 20:07:40 +0000 [thread overview]
Message-ID: <1228162061-14769-6-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1228162061-14769-5-git-send-email-broonie@opensource.wolfsonmicro.com>
From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
All outputs have dedicated gain controls except the
HandsFree output.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/twl4030.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 1dae73a..ffd5120 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -367,6 +367,12 @@ static DECLARE_TLV_DB_SCALE(digital_coarse_tlv, 0, 600, 0);
static DECLARE_TLV_DB_SCALE(analog_tlv, -2400, 200, 0);
/*
+ * Gain controls tied to outputs
+ * -6 dB to 6 dB in 6 dB steps (mute instead of -12)
+ */
+static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1);
+
+/*
* Capture gain after the ADCs
* from 0 dB to 31 dB in 1 dB steps
*/
@@ -395,6 +401,21 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = {
TWL4030_REG_ARXL2_APGA_CTL, TWL4030_REG_ARXR2_APGA_CTL,
3, 0x12, 1, analog_tlv),
+ /* Separate output gain controls */
+ SOC_DOUBLE_R_TLV_TWL4030("PreDriv Playback Volume",
+ TWL4030_REG_PREDL_CTL, TWL4030_REG_PREDR_CTL,
+ 4, 3, 0, output_tvl),
+
+ SOC_DOUBLE_TLV_TWL4030("Headset Playback Volume",
+ TWL4030_REG_HS_GAIN_SET, 0, 2, 3, 0, output_tvl),
+
+ SOC_DOUBLE_R_TLV_TWL4030("Carkit Playback Volume",
+ TWL4030_REG_PRECKL_CTL, TWL4030_REG_PRECKR_CTL,
+ 4, 3, 0, output_tvl),
+
+ SOC_SINGLE_TLV_TWL4030("Earpiece Playback Volume",
+ TWL4030_REG_EAR_CTL, 4, 3, 0, output_tvl),
+
/* Common capture gain controls */
SOC_DOUBLE_R_TLV("Capture Volume",
TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
--
1.5.6.5
next prev parent reply other threads:[~2008-12-01 20:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 20:07 [PATCH 0/7] ASoC updates Mark Brown
2008-12-01 20:07 ` [PATCH 1/7] ASoC: Rename snd_soc_register_card() to snd_soc_init_card() Mark Brown
2008-12-01 20:07 ` [PATCH 2/7] ASoC: Annotate core removal function Mark Brown
2008-12-01 20:07 ` [PATCH 3/7] ASoC: Remove in-code changelog from AD73311 driver Mark Brown
2008-12-01 20:07 ` [PATCH 4/7] ASoC: TWL4030: Change the capture volume control to TLV Mark Brown
2008-12-01 20:07 ` [PATCH 5/7] ASoC: TWL4030: Change the common playback volume controls Mark Brown
2008-12-01 20:07 ` Mark Brown [this message]
2008-12-01 20:07 ` [PATCH 7/7] ASoC: Don't free static data in WM9713 Mark Brown
2008-12-05 4:44 ` [PATCH 6/7] ASoC: TWL4030: Add volume controls for outputs naveen krishna ch
2008-12-05 10:44 ` Mark Brown
2008-12-05 11:17 ` naveen krishna ch
2008-12-08 7:13 ` Peter Ujfalusi
2008-12-01 20:31 ` [PATCH 0/7] ASoC updates Takashi Iwai
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=1228162061-14769-6-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=peter.ujfalusi@nokia.com \
--cc=tiwai@suse.de \
/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