0043-pcm512x-Use-a-range-macro-for-Volume-and-rename-to-P.patch 1.1 KB

12345678910111213141516171819202122232425
  1. From 197803c176d753bc23fdf705306596cbd1e8b658 Mon Sep 17 00:00:00 2001
  2. From: Howard Mitchell <hm@hmbedded.co.uk>
  3. Date: Fri, 28 Mar 2014 16:40:31 +0000
  4. Subject: [PATCH 043/114] pcm512x: Use a range macro for Volume and rename to
  5. PCM.
  6. This allows limiting the output gain to avoid clipping in the
  7. DAC ouput stages.
  8. ---
  9. sound/soc/codecs/pcm512x.c | 4 ++--
  10. 1 file changed, 2 insertions(+), 2 deletions(-)
  11. --- a/sound/soc/codecs/pcm512x.c
  12. +++ b/sound/soc/codecs/pcm512x.c
  13. @@ -259,8 +259,8 @@ static const struct soc_enum pcm512x_ved
  14. pcm512x_ramp_step_text);
  15. static const struct snd_kcontrol_new pcm512x_controls[] = {
  16. -SOC_DOUBLE_R_TLV("Digital Playback Volume", PCM512x_DIGITAL_VOLUME_2,
  17. - PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv),
  18. +SOC_DOUBLE_R_RANGE_TLV("PCM", PCM512x_DIGITAL_VOLUME_2,
  19. + PCM512x_DIGITAL_VOLUME_3, 0, 40, 255, 1, digital_tlv),
  20. SOC_DOUBLE_TLV("Analogue Playback Volume", PCM512x_ANALOG_GAIN_CTRL,
  21. PCM512x_LAGN_SHIFT, PCM512x_RAGN_SHIFT, 1, 1, analog_tlv),
  22. SOC_DOUBLE_TLV("Analogue Playback Boost Volume", PCM512x_ANALOG_GAIN_BOOST,