[PATCH 1/2] ASoC: rt711: remap buttons
From: Shuming Fan shumingf@realtek.com
This patch uses the same mapping as the machine driver: BTN_0 : KEY_PLAYPAUSE BTN_1 : KEY_VOICECOMMAND BTN_2 : KEY_VOLUMEUP BTN_3 : KEY_VOLUMEDOWN
Signed-off-by: Shuming Fan shumingf@realtek.com --- sound/soc/codecs/rt711.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt711.c b/sound/soc/codecs/rt711.c index 9f5b2dc16c54..c3a82b462a93 100644 --- a/sound/soc/codecs/rt711.c +++ b/sound/soc/codecs/rt711.c @@ -154,26 +154,26 @@ static unsigned int rt711_button_detect(struct rt711_priv *rt711) case 0x0200: case 0x0100: case 0x0080: - btn_type |= SND_JACK_BTN_0; + btn_type |= SND_JACK_BTN_2; break; case 0x0001: - btn_type |= SND_JACK_BTN_3; + btn_type |= SND_JACK_BTN_1; break; } switch (val81) { case 0x8000: case 0x4000: case 0x2000: - btn_type |= SND_JACK_BTN_1; + btn_type |= SND_JACK_BTN_0; break; case 0x1000: case 0x0800: case 0x0400: - btn_type |= SND_JACK_BTN_2; + btn_type |= SND_JACK_BTN_3; break; case 0x0200: case 0x0100: - btn_type |= SND_JACK_BTN_3; + btn_type |= SND_JACK_BTN_1; break; } read_error:
On Thu, Jun 17, 2021 at 05:08:09PM +0800, shumingf@realtek.com wrote:
From: Shuming Fan shumingf@realtek.com
This patch uses the same mapping as the machine driver: BTN_0 : KEY_PLAYPAUSE BTN_1 : KEY_VOICECOMMAND BTN_2 : KEY_VOLUMEUP BTN_3 : KEY_VOLUMEDOWN
Which machine driver? Can't there be multiple machine drivers, and if they're already overriding things why do this?
participants (2)
-
Mark Brown
-
shumingf@realtek.com