/* special case for PTT products */ if (field->application == HID_GD_JOYSTICK) goto defaulted;
/* non-standard types or multi-HID interfaces - plt_type is PID */ if (!(plt_type & HID_USAGE_PAGE)) { switch (plt_type) { case PLT_DA60: if (allow_consumer) goto defaulted; if (usage->hid == HID_CONSUMER_MUTE) {
mapped_key = KEY_MICMUTE; goto mapped;
} break; default: if (allow_consumer || allow_mute) goto defaulted;
} goto ignored;
}
/* handle standard consumer control mapping */ /* and standard telephony mic mute mapping */ if (allow_consumer || allow_mute) goto defaulted;
/* handle vendor unique types - plt_type is 0xffa0uuuu or 0xffa2uuuu */ /* if not 'basic telephony compliant' - map vendor unique controls */ if (!((plt_type & HID_USAGE) >= PLT_BASIC_TELEPHONY &&
(plt_type & HID_USAGE) != PLT_BASIC_EXCEPTION) &&
!((field->application ^ plt_type) & HID_USAGE_PAGE)) switch (usage->hid) { case PLT1_VOL_UP: case PLT2_VOL_UP:
mapped_key = KEY_VOLUMEUP; goto mapped; case PLT1_VOL_DOWN: case PLT2_VOL_DOWN:
mapped_key = KEY_VOLUMEDOWN; goto mapped; case PLT1_MIC_MUTE: case PLT2_MIC_MUTE:
mapped_key = KEY_MICMUTE; goto mapped;
}
/* * Future mapping of call control or other usages, * if and when keys are defined would go here * otherwise, ignore everything else that was not mapped
*/
/* HZ too low for ms resolution - double key detection disabled */ /* or it is a key release - handle key presses only. */ if (!drv_data->double_key_to || !value) return 0;
/* if HZ does not allow ms resolution - disable double key detection */ if (drv_data->double_key_to < PLT_DOUBLE_KEY_TIMEOUT)
drv_data->double_key_to = 0;
hid_set_drvdata(hdev, drv_data);
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT |
HID_CONNECT_HIDINPUT_FORCE | HID_CONNECT_HIDDEV_FORCE); if (ret)
hid_err(hdev, "hw start failed\n");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.