diff options
author | Kalle Kankare <kalle.kankare@vincit.fi> | 2016-07-12 04:41:18 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-07-12 05:00:44 -0400 |
commit | 0593d4612146dc16ff6bd23423bdd434dd7b8c7b (patch) | |
tree | c0a46dffe78548ca3adc819711baa03cb7e8a11e /sound | |
parent | 8419caa7270291e26f8b34b12b29680586c85d30 (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>
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 39a178a88b36..527b759c1562 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c | |||
@@ -385,6 +385,9 @@ static const DECLARE_TLV_DB_RANGE(mic_gain_tlv, | |||
385 | /* tlv for hp volume, -51.5db to 12.0db, step .5db */ | 385 | /* tlv for hp volume, -51.5db to 12.0db, step .5db */ |
386 | static const DECLARE_TLV_DB_SCALE(headphone_volume, -5150, 50, 0); | 386 | static const DECLARE_TLV_DB_SCALE(headphone_volume, -5150, 50, 0); |
387 | 387 | ||
388 | /* tlv for lineout volume, 31 steps of .5db each */ | ||
389 | static const DECLARE_TLV_DB_SCALE(lineout_volume, -1550, 50, 0); | ||
390 | |||
388 | static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { | 391 | static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { |
389 | /* SOC_DOUBLE_S8_TLV with invert */ | 392 | /* SOC_DOUBLE_S8_TLV with invert */ |
390 | { | 393 | { |
@@ -413,6 +416,13 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { | |||
413 | 416 | ||
414 | SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, | 417 | SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, |
415 | 0, 3, 0, mic_gain_tlv), | 418 | 0, 3, 0, mic_gain_tlv), |
419 | |||
420 | SOC_DOUBLE_TLV("Lineout Playback Volume", | ||
421 | SGTL5000_CHIP_LINE_OUT_VOL, | ||
422 | SGTL5000_LINE_OUT_VOL_LEFT_SHIFT, | ||
423 | SGTL5000_LINE_OUT_VOL_RIGHT_SHIFT, | ||
424 | 0x1f, 1, | ||
425 | lineout_volume), | ||
416 | }; | 426 | }; |
417 | 427 | ||
418 | /* mute the codec used by alsa core */ | 428 | /* mute the codec used by alsa core */ |