[alsa-devel] [RFC 5/5] ARM: tegra: nyan: specify gpio-audio-jack device
Dylan Reid
dgreid at chromium.org
Sat May 23 00:09:23 CEST 2015
Model the audio jack as a headset jack using the new gpio-audio-jack
device.
Signed-off-by: Dylan Reid <dgreid at chromium.org>
---
arch/arm/boot/dts/tegra124-nyan.dtsi | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
index a9aec23..ec33110 100644
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
@@ -1,4 +1,5 @@
#include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/audio-jack-events.h>
#include "tegra124.dtsi"
/ {
@@ -661,6 +662,23 @@
};
};
+ audio_jack: gpio-audio-jack {
+ compatible = "gpio-audio-jack";
+ gpio-audio-jack,jack-name = "Headset Jack";
+ gpio-audio-jack,sw-det-gpios =
+ <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>,
+ <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_LOW>;
+ gpio-audio-jack,gpio-names =
+ "Headphones",
+ "Mic Jack";
+ gpio-audio-jack,report-masks =
+ <JACK_HEADPHONE>,
+ <JACK_MICROPHONE>;
+ gpio-audio-jack,debounce-times =
+ <150>,
+ <150>;
+ };
+
sound {
nvidia,audio-routing =
"Headphones", "HPR",
@@ -674,15 +692,13 @@
nvidia,i2s-controller = <&tegra_i2s1>;
nvidia,audio-codec = <&acodec>;
+ nvidia,headset-dev = <&audio_jack>;
clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
<&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA124_CLK_EXTERN1>;
clock-names = "pll_a", "pll_a_out0", "mclk";
- nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
- nvidia,mic-det-gpios =
- <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
};
gpio-restart {
--
2.2.1.62.g3f15098
More information about the Alsa-devel
mailing list