diff options
author | Kalle Kankare <kalle.kankare@vincit.fi> | 2016-07-12 10:41:18 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-05-30 13:49:09 -0700 |
commit | 8929d0a539299bb100923e1878c788af20e28e8b (patch) | |
tree | 22cd6e9ff502c8baf154545c2b24c0792e2d26ad /sound | |
parent | 81fba3fc798d7d149261f734c93e8e024aa9fe21 (diff) |
sgtl5000: add Lineout volume control
This controls the volume for the line out pins of SGTL5000.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 0593d4612146dc16ff6bd23423bdd434dd7b8c7b)
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index ad945bc67b8b..0a35541b6260 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -394,6 +394,9 @@ static const unsigned int mic_gain_tlv[] = { /* tlv for hp volume, -51.5db to 12.0db, step .5db */ static const DECLARE_TLV_DB_SCALE(headphone_volume, -5150, 50, 0); +/* tlv for lineout volume, 31 steps of .5db each */ +static const DECLARE_TLV_DB_SCALE(lineout_volume, -1550, 50, 0); + static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { /* SOC_DOUBLE_S8_TLV with invert */ { @@ -422,6 +425,13 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, 0, 3, 0, mic_gain_tlv), + + SOC_DOUBLE_TLV("Lineout Playback Volume", + SGTL5000_CHIP_LINE_OUT_VOL, + SGTL5000_LINE_OUT_VOL_LEFT_SHIFT, + SGTL5000_LINE_OUT_VOL_RIGHT_SHIFT, + 0x1f, 1, + lineout_volume), }; /* mute the codec used by alsa core */ |