[droid] add new internal player for amlogic based SoCs
[vuplus_xbmc] / xbmc / input / linux / LinuxInputDevices.cpp
index a5057e2..790c64f 100644 (file)
@@ -763,6 +763,23 @@ void CLinuxInputDevice::SetupKeyboardAutoRepeat(int fd)
 {
   bool enable = true;
 
+#if defined(HAS_AMLPLAYER)
+  // ignore the native aml driver named 'key_input',
+  //  it is the dedicated power key handler (am_key_input)
+  if (strncmp(m_deviceName, "key_input", strlen("key_input")) == 0)
+    return;
+  // ignore the native aml driver named 'aml_keypad',
+  //  it is the dedicated IR remote handler (amremote)
+  else if (strncmp(m_deviceName, "aml_keypad", strlen("aml_keypad")) == 0)
+    return;
+
+  // turn off any keyboard autorepeat, there is a kernel bug
+  // where if the cpu is max'ed then key up is missed and
+  // we get a flood of EV_REP that never stop until next
+  // key down/up. Very nasty when seeking during video playback.
+  enable = false;
+#endif
+
   if (enable)
   {
     int kbdrep[2] = { 400, 80 };