Skip to content

Commit

Permalink
ASoC: TWL4030: Change the capture volume control to TLV
Browse files Browse the repository at this point in the history
The digital Capture gain control has a range:
0 to 31 dB in 1 dB steps.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Dec 1, 2008
1 parent fa5c769 commit 381a22b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions sound/soc/codecs/twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,24 @@ static DECLARE_TLV_DB_SCALE(master_tlv, -6300, 100, 1);
*/
static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0);

/*
* Capture gain after the ADCs
* from 0 dB to 31 dB in 1 dB steps
*/
static DECLARE_TLV_DB_SCALE(digital_capture_tlv, 0, 100, 0);

static const struct snd_kcontrol_new twl4030_snd_controls[] = {
SOC_DOUBLE_R_TLV("Master Playback Volume",
TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
0, 0x3f, 0, master_tlv),
SOC_DOUBLE_R_TLV("Master PCM Playback Volume",
TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
6, 0x2, 0, master_coarse_tlv),
SOC_DOUBLE_R("Capture Volume",
TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
0, 0x1f, 0),

/* Common capture gain controls */
SOC_DOUBLE_R_TLV("Capture Volume",
TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
0, 0x1f, 0, digital_capture_tlv),
};

/* add non dapm controls */
Expand Down

0 comments on commit 381a22b

Please sign in to comment.