Skip to content

Commit

Permalink
RPiCECAdapterDetection: Include check that we can set passive mode
Browse files Browse the repository at this point in the history
This allows the firmware driver to be discounted when not available (e.g. using KMS driver)
  • Loading branch information
popcornmix committed Dec 20, 2021
1 parent 6239ae1 commit b30fc83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libcec/adapter/RPi/RPiCECAdapterDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
extern "C" {
#include <interface/vmcs_host/vc_cecservice.h>
#include <interface/vchiq_arm/vchiq_if.h>
#include <bcm_host.h>
}

using namespace CEC;
Expand All @@ -54,6 +55,11 @@ bool CRPiCECAdapterDetection::FindAdapter(void)
if ((iResult = vchi_connect(NULL, 0, vchiq_instance)) != VCHIQ_SUCCESS)
return false;

bcm_host_init();
iResult = vc_cec_set_passive(true);
if (iResult != VCHIQ_SUCCESS)
return false;

return true;
}

Expand Down

0 comments on commit b30fc83

Please sign in to comment.