mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
32 lines
983 B
Diff
32 lines
983 B
Diff
From 4034f4e90fe681ff4645fe724424ae48f3909e19 Mon Sep 17 00:00:00 2001
|
|
From: Ondrej Jirman <megi@xff.cz>
|
|
Date: Fri, 23 Feb 2024 01:58:40 +0100
|
|
Subject: ASoC: sun8i-codec: define button keycodes
|
|
|
|
This is likely not upstreamable, but simple. :)
|
|
---
|
|
sound/soc/sunxi/sun8i-codec.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
|
|
index 44ed07595c87..9bf5dab1b803 100644
|
|
--- a/sound/soc/sunxi/sun8i-codec.c
|
|
+++ b/sound/soc/sunxi/sun8i-codec.c
|
|
@@ -1538,6 +1538,13 @@ static int sun8i_codec_enable_jack_detect(struct snd_soc_component *component,
|
|
if (ret)
|
|
return ret;
|
|
|
|
+ if (jack->jack->type & SND_JACK_MICROPHONE) {
|
|
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
|
|
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
|
|
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
|
|
+ snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
|
+ }
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
--
|
|
2.51.0
|
|
|