0489-overlays-Add-swap_lr-and-enable_jack-to-audremap.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 88e9625826d782595ae6b2acf7b8214f5d05726b 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. swap_lr causes the channels to be reversed, and enable_jack prevents the
  6. headphone output from being disabled.
  7. See: https://github.com/raspberrypi/linux/issues/1473
  8. ---
  9. arch/arm/boot/dts/overlays/README | 9 ++++++---
  10. arch/arm/boot/dts/overlays/audremap-overlay.dts | 7 ++++++-
  11. 2 files changed, 12 insertions(+), 4 deletions(-)
  12. --- a/arch/arm/boot/dts/overlays/README
  13. +++ b/arch/arm/boot/dts/overlays/README
  14. @@ -254,9 +254,12 @@ Params: <None>
  15. Name: audremap
  16. -Info: Switches PWM sound output to pins 12 & 13
  17. -Load: dtoverlay=audremap
  18. -Params: <None>
  19. +Info: Switches PWM sound output to pins 12 (Right) & 13 (Left)
  20. +Load: dtoverlay=audremap,<param>=<val>
  21. +Params: swap_lr Reverse the channel allocation, which will also
  22. + swap the audio jack outputs (default off)
  23. + enable_jack Don't switch off the audio jack output
  24. + (default off)
  25. Name: bmp085_i2c-sensor
  26. --- a/arch/arm/boot/dts/overlays/audremap-overlay.dts
  27. +++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts
  28. @@ -6,9 +6,14 @@
  29. fragment@0 {
  30. target = <&audio_pins>;
  31. - __overlay__ {
  32. + frag0: __overlay__ {
  33. brcm,pins = < 12 13 >;
  34. brcm,function = < 4 >; /* alt0 alt0 */
  35. };
  36. };
  37. +
  38. + __overrides__ {
  39. + swap_lr = <&frag0>, "swap_lr?";
  40. + enable_jack = <&frag0>, "enable_jack?";
  41. + };
  42. };