b23a4ccc51df8086ea75a016b786e9f1ad28bb12
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-3.14 / 0051-Use-a-range-macro-for-Playback-Volume.patch
1 From 53f059eb1ce439b171516c0e6673ab88ca25e166 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 51/54] Use a range macro for Playback Volume.
5
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
12 diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c
13 index 55b6200..2653311 100644
14 --- a/sound/soc/codecs/pcm512x.c
15 +++ b/sound/soc/codecs/pcm512x.c
16 @@ -240,8 +240,8 @@ static const struct soc_enum pcm512x_veds =
17 pcm512x_ramp_step_text);
18
19 static const struct snd_kcontrol_new pcm512x_controls[] = {
20 -SOC_DOUBLE_R_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2,
21 - PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv),
22 +SOC_DOUBLE_R_RANGE_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2,
23 + PCM512x_DIGITAL_VOLUME_3, 0, 48, 255, 1, digital_tlv),
24 SOC_DOUBLE("Playback Digital Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT,
25 PCM512x_RQMR_SHIFT, 1, 1),
26
27 --
28 1.9.1
29