Thanks to Phil for spotting the suspicious code.
See: https://github.com/raspberrypi/firmware/issues/875
vchi_service_use(state->notify_handle[0]);
}
}
+ // the state machine below only wants a single bit to be set
+ if (tvstate.state & (VC_HDMI_ATTACHED|VC_HDMI_UNPLUGGED))
+ tvstate.state &= ~(VC_HDMI_HDMI | VC_HDMI_DVI);
while(1) {
VCOS_STATUS_T status = vcos_event_wait(&tvservice_notify_available_event);
param1, param2);
switch(reason) {
case VC_HDMI_UNPLUGGED:
- if(tvstate.state & (VC_HDMI_HDMI|VC_HDMI_DVI|VC_HDMI_ATTACHED)) {
+ if(tvstate.state & (VC_HDMI_HDMI|VC_HDMI_DVI)) {
state->copy_protect = 0;
if((tvstate.state & VC_HDMI_ATTACHED) == 0) {
vchi_service_release(state->notify_handle[0]);