gjdwebserver-overlay/sys-kernel/pinephone-pro-sources/files/0057-arm64-dts-rk3399-pinephone-pro-improve-sound-device.patch

62 lines
2.1 KiB
Diff
Raw Normal View History

2022-01-19 13:27:17 +01:00
From 54ddce1cf18b40b4e89b445885f5bf03a2fb6483 Mon Sep 17 00:00:00 2001
2022-01-15 02:12:55 +01:00
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
Date: Thu, 9 Dec 2021 16:52:29 +0100
2022-01-19 13:27:17 +01:00
Subject: [PATCH] arm64: dts: rk3399-pinephone-pro: improve sound device
definition
2022-01-15 02:12:55 +01:00
This commit renames the sound card and the "Headphone" widget so they
match the names used by the ALSA UCM profiles.
2022-01-19 13:27:17 +01:00
It also adds a jack detection GPIO to the sound card definition.
2022-01-15 02:12:55 +01:00
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@gmail.com>
---
2022-01-19 13:27:17 +01:00
.../boot/dts/rockchip/rk3399-pinephone-pro.dts | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
2022-01-15 02:12:55 +01:00
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
2022-01-19 13:27:17 +01:00
index 13141c643..63f0d5a5c 100644
2022-01-15 02:12:55 +01:00
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
2022-01-19 13:27:17 +01:00
@@ -177,29 +177,30 @@ power {
2022-01-15 02:12:55 +01:00
// spaker - amp enabled by SPK_CTL_H
//
// mclk - GPIO4_A0/I2S_CLK
- //
- // some gpio-jack-detection driver?
- //pinctrl-0 = <&hp_det>; // GPIO4_D4
rt5640-sound {
compatible = "simple-audio-card";
- simple-audio-card,name = "rockchip,rt5640-codec";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_det>;
+ simple-audio-card,name = "PinePhonePro";
simple-audio-card,aux-devs = <&speaker_amp>;
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,hp-det-gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
+ simple-audio-card,pin-switches = "Internal Speaker";
simple-audio-card,widgets =
"Microphone", "Headset Microphone",
"Microphone", "Internal Microphone",
- "Headphone", "Headphone Jack",
+ "Headphone", "Headphones",
"Speaker", "Internal Earpiece",
"Speaker", "Internal Speaker",
"Line", "Line In Modem",
"Line", "Line Out Modem";
simple-audio-card,routing =
- "Headphone Jack", "HPOL",
- "Headphone Jack", "HPOR",
+ "Headphones", "HPOL",
+ "Headphones", "HPOR",
"Internal Earpiece", "SPOLP",
"Internal Earpiece", "SPOLN",
"Internal Speaker", "Speaker Amp OUTL",
2022-01-19 13:27:17 +01:00
--
2.34.1