On Wed, Aug 14, 2024 at 02:09:21PM +0800, Zhang Yi wrote:
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.