summaryrefslogtreecommitdiff
path: root/target/linux/brcm2708/patches-4.4/0324-Allow-up-to-24dB-digital-gain-to-be-applied-when-usi.patch
blob: ad4d3b1b960e75c365e8c06a498524b1b2dcf0e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From d81de2a4a1223296b17dac8e652b0b31911f6dd1 Mon Sep 17 00:00:00 2001
From: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
Date: Fri, 6 May 2016 09:42:55 +0100
Subject: [PATCH 324/423] Allow up to 24dB digital gain to be applied when
 using IQAudIO DAC

24db_digital_gain DT param can be used to specify that PCM512x
codec "Digital" volume control should not be limited to 0dB gain,
and if specified will allow the full 24dB gain.

Signed-off-by: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
---
 arch/arm/boot/dts/overlays/README                  | 17 +++++++++++++++--
 arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts |  6 +++++-
 2 files changed, 20 insertions(+), 3 deletions(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -490,8 +490,21 @@ Params: <None>
 
 Name:   iqaudio-dac
 Info:   Configures the IQaudio DAC audio card
-Load:   dtoverlay=iqaudio-dac
-Params: <None>
+Load:   dtoverlay=iqaudio-dac,<param>
+Params: 24db_digital_gain       Allow gain to be applied via the PCM512x codec
+                                Digital volume control. Enable with
+                                "dtoverlay=iqaudio-dac,24db_digital_gain"
+                                (The default behaviour is that the Digital
+                                volume control is limited to a maximum of
+                                0dB. ie. it can attenuate but not provide
+                                gain. For most users, this will be desired
+                                as it will prevent clipping. By appending
+                                the 24db_digital_gain parameter, the Digital
+                                volume control will allow up to 24dB of
+                                gain. If this parameter is enabled, it is the
+                                responsibility of the user to ensure that
+                                the Digital volume control is set to a value
+                                that does not result in clipping/distortion!)
 
 
 Name:   iqaudio-dacplus
--- a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts
+++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts
@@ -30,10 +30,14 @@
 
 	fragment@2 {
 		target = <&sound>;
-		__overlay__ {
+		frag2: __overlay__ {
 			compatible = "iqaudio,iqaudio-dac";
 			i2s-controller = <&i2s>;
 			status = "okay";
 		};
 	};
+
+	__overrides__ {
+		24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?";
+	};
 };