brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0490-overlays-Add-swap_lr-and-enable_jack-to-audremap.patch
1 From f8e026145de28acf5e36183f5c8b489bf172e9c8 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 19 Aug 2016 15:39:01 +0100
4 Subject: [PATCH] overlays: Add swap_lr and enable_jack to audremap
5
6 swap_lr causes the channels to be reversed, and enable_jack prevents the
7 headphone output from being disabled.
8
9 See: https://github.com/raspberrypi/linux/issues/1473
10 ---
11 arch/arm/boot/dts/overlays/README | 9 ++++++---
12 arch/arm/boot/dts/overlays/audremap-overlay.dts | 7 ++++++-
13 2 files changed, 12 insertions(+), 4 deletions(-)
14
15 --- a/arch/arm/boot/dts/overlays/README
16 +++ b/arch/arm/boot/dts/overlays/README
17 @@ -254,9 +254,12 @@ Params: <None>
18
19
20 Name: audremap
21 -Info: Switches PWM sound output to pins 12 & 13
22 -Load: dtoverlay=audremap
23 -Params: <None>
24 +Info: Switches PWM sound output to pins 12 (Right) & 13 (Left)
25 +Load: dtoverlay=audremap,<param>=<val>
26 +Params: swap_lr Reverse the channel allocation, which will also
27 + swap the audio jack outputs (default off)
28 + enable_jack Don't switch off the audio jack output
29 + (default off)
30
31
32 Name: bmp085_i2c-sensor
33 --- a/arch/arm/boot/dts/overlays/audremap-overlay.dts
34 +++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts
35 @@ -6,9 +6,14 @@
36
37 fragment@0 {
38 target = <&audio_pins>;
39 - __overlay__ {
40 + frag0: __overlay__ {
41 brcm,pins = < 12 13 >;
42 brcm,function = < 4 >; /* alt0 alt0 */
43 };
44 };
45 +
46 + __overrides__ {
47 + swap_lr = <&frag0>, "swap_lr?";
48 + enable_jack = <&frag0>, "enable_jack?";
49 + };
50 };