Event handling was always fairly simplistic since there were only two events. With the addition of pin events this needed to be redesigned. The state_change and lost_msgs events are now core events with the guarantee that the last state is always available. The new pin events are a queue of events (up to 64 for each event) and the oldest event will be dropped if the application cannot keep up. Lost events are marked with a new event flag.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -412,6 +412,7 @@ struct cec_log_addrs { · 411 unmodified lines | |||
| 412 | #define CEC_EVENT_PIN_HIGH 4 | 412 | #define CEC_EVENT_PIN_HIGH 4 |
| 413 | 413 | ||
| 414 | #define CEC_EVENT_FL_INITIAL_STATE (1 << 0) | 414 | #define CEC_EVENT_FL_INITIAL_STATE (1 << 0) |
| 415 | #define CEC_EVENT_FL_DROPPED_EVENTS (1 << 1) | ||
| 415 | 416 | ||
| 416 | /** | 417 | /** |
| 417 | * struct cec_event_state_change - used when the CEC adapter changes state. | 418 | * struct cec_event_state_change - used when the CEC adapter changes state. |
| @@ -424,7 +425,7 @@ struct cec_event_state_change { · 6 unmodified lines | |||
| 424 | }; | 425 | }; |
| 425 | 426 | ||
| 426 | /** | 427 | /** |
| 427 | * struct cec_event_lost_msgs - tells you how many messages were lost due. | 428 | * struct cec_event_lost_msgs - tells you how many messages were lost. |
| 428 | * @lost_msgs: how many messages were lost. | 429 | * @lost_msgs: how many messages were lost. |
| 429 | */ | 430 | */ |
| 430 | struct cec_event_lost_msgs { | 431 | struct cec_event_lost_msgs { |