[PATCH v1] ASoC: codecs: ES8326: Adjust buttons
To adapt to chrome, we have adjusted the buttons to match the system.
This needs a bit more of a commit log explaining what's going on.
+#if IS_ENABLED(CONFIG_SND_SOC_MT8188_MT6359)
- const int hs_keys[] = {
SND_JACK_BTN_0, SND_JACK_BTN_2, SND_JACK_BTN_3
- };
+#else
- const int hs_keys[] = {
SND_JACK_BTN_0, SND_JACK_BTN_1, SND_JACK_BTN_2
- };
+#endif
This will remap the buttons no matter what system we're running on so while it's a bit better it's still going to cause issues. We could use a per board approach like this but it needs to be at runtime, based on the machine compatible rather than a build time selection.
The support for this device was added in e794a894427b1d ("ASoC: mediatek: mt8188-mt6359: add es8326 support") which was added in v6.8 so this would also be a potential issue in mainline, given that this is likely only used by Chromebooks and didn't make it to a LTS yet we could possibly give it a go but we might have to revert.
Because this change is to adapt mt8188-mt6359.On mt8188-mt6359, SND_JACK_BTN_2 corresponds to KEY_VOLUMEUP and SND_JACK_BTN_3 corresponds to KEY_VOLUMEDOWN. So we modified the es8326 driver to adapt the mt8188-mt6359. The changes we are making will not affect the application on all platforms.
participants (1)
-
Zhang Yi