summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0490-overlays-Add-swap_lr-and-enable_jack-to-audremap.patch
blob: 7261163354be6cdb19184f2099e20d4ff3459aa0 (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
From f8e026145de28acf5e36183f5c8b489bf172e9c8 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Fri, 19 Aug 2016 15:39:01 +0100
Subject: [PATCH] overlays: Add swap_lr and enable_jack to audremap

swap_lr causes the channels to be reversed, and enable_jack prevents the
headphone output from being disabled.

See: https://github.com/raspberrypi/linux/issues/1473
---
 arch/arm/boot/dts/overlays/README               | 9 ++++++---
 arch/arm/boot/dts/overlays/audremap-overlay.dts | 7 ++++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -254,9 +254,12 @@ Params: <None>
 
 
 Name:   audremap
-Info:   Switches PWM sound output to pins 12 & 13
-Load:   dtoverlay=audremap
-Params: <None>
+Info:   Switches PWM sound output to pins 12 (Right) & 13 (Left)
+Load:   dtoverlay=audremap,<param>=<val>
+Params: swap_lr                 Reverse the channel allocation, which will also
+                                swap the audio jack outputs (default off)
+        enable_jack             Don't switch off the audio jack output
+                                (default off)
 
 
 Name:   bmp085_i2c-sensor
--- a/arch/arm/boot/dts/overlays/audremap-overlay.dts
+++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts
@@ -6,9 +6,14 @@
 
         fragment@0 {
                 target = <&audio_pins>;
-                __overlay__ {
+                frag0: __overlay__ {
                         brcm,pins = < 12 13 >;
                         brcm,function = < 4 >; /* alt0 alt0 */
                 };
         };
+
+	__overrides__ {
+		swap_lr = <&frag0>, "swap_lr?";
+		enable_jack = <&frag0>, "enable_jack?";
+	};
 };