Loading services/tuner/TunerFrontend.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,18 @@ TunerFrontend::~TunerFrontend() { return mFrontend->removeOutputPid(in_pid); } ::ndk::ScopedAStatus TunerFrontend::getFrontendStatusReadiness( const std::vector<FrontendStatusType>& in_statusTypes, std::vector<FrontendStatusReadiness>* _aidl_return) { if (mFrontend == nullptr) { ALOGD("IFrontend is not initialized"); return ::ndk::ScopedAStatus::fromServiceSpecificError( static_cast<int32_t>(Result::UNAVAILABLE)); } return mFrontend->getFrontendStatusReadiness(in_statusTypes, _aidl_return); } /////////////// FrontendCallback /////////////////////// ::ndk::ScopedAStatus TunerFrontend::FrontendCallback::onEvent(FrontendEventType frontendEventType) { ALOGV("FrontendCallback::onEvent, type=%d", frontendEventType); Loading services/tuner/TunerFrontend.h +4 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ using ::aidl::android::hardware::tv::tuner::FrontendScanMessageType; using ::aidl::android::hardware::tv::tuner::FrontendScanType; using ::aidl::android::hardware::tv::tuner::FrontendSettings; using ::aidl::android::hardware::tv::tuner::FrontendStatus; using ::aidl::android::hardware::tv::tuner::FrontendStatusReadiness; using ::aidl::android::hardware::tv::tuner::FrontendStatusType; using ::aidl::android::hardware::tv::tuner::IFrontend; using ::aidl::android::hardware::tv::tuner::IFrontendCallback; Loading Loading @@ -64,6 +65,9 @@ public: ::ndk::ScopedAStatus getFrontendId(int32_t* _aidl_return) override; ::ndk::ScopedAStatus getHardwareInfo(std::string* _aidl_return) override; ::ndk::ScopedAStatus removeOutputPid(int32_t in_pid) override; ::ndk::ScopedAStatus getFrontendStatusReadiness( const std::vector<FrontendStatusType>& in_statusTypes, std::vector<FrontendStatusReadiness>* _aidl_return) override; struct FrontendCallback : public BnFrontendCallback { FrontendCallback(const shared_ptr<ITunerFrontendCallback> tunerFrontendCallback) Loading services/tuner/aidl/android/media/tv/tuner/ITunerFrontend.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.media.tv.tuner; import android.hardware.tv.tuner.FrontendScanType; import android.hardware.tv.tuner.FrontendSettings; import android.hardware.tv.tuner.FrontendStatus; import android.hardware.tv.tuner.FrontendStatusReadiness; import android.hardware.tv.tuner.FrontendStatusType; import android.media.tv.tuner.ITunerFrontendCallback; import android.media.tv.tuner.ITunerLnb; Loading Loading @@ -104,4 +105,9 @@ interface ITunerFrontend { * Filter out unnecessary PID from frontend output. */ void removeOutputPid(int pid); /** * Gets FrontendStatus’ readiness statuses for given status types. */ FrontendStatusReadiness[] getFrontendStatusReadiness(in FrontendStatusType[] statusTypes); } services/tuner/hidl/TunerHidlFrontend.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -433,6 +433,14 @@ TunerHidlFrontend::~TunerHidlFrontend() { static_cast<int32_t>(Result::UNAVAILABLE)); } ::ndk::ScopedAStatus TunerHidlFrontend::getFrontendStatusReadiness( const std::vector<FrontendStatusType>& /* in_statusTypes */, std::vector<FrontendStatusReadiness>* _aidl_return) { _aidl_return->clear(); return ::ndk::ScopedAStatus::fromServiceSpecificError( static_cast<int32_t>(Result::UNAVAILABLE)); } void TunerHidlFrontend::setLna(bool bEnable) { if (mFrontend == nullptr) { ALOGD("IFrontend is not initialized"); Loading services/tuner/hidl/TunerHidlFrontend.h +4 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ using ::aidl::android::hardware::tv::tuner::FrontendScanMessageType; using ::aidl::android::hardware::tv::tuner::FrontendScanType; using ::aidl::android::hardware::tv::tuner::FrontendSettings; using ::aidl::android::hardware::tv::tuner::FrontendStatus; using ::aidl::android::hardware::tv::tuner::FrontendStatusReadiness; using ::aidl::android::hardware::tv::tuner::FrontendStatusType; using ::android::sp; using ::android::hardware::hidl_vec; Loading Loading @@ -84,6 +85,9 @@ public: ::ndk::ScopedAStatus getFrontendId(int32_t* _aidl_return) override; ::ndk::ScopedAStatus getHardwareInfo(std::string* _aidl_return) override; ::ndk::ScopedAStatus removeOutputPid(int32_t in_pid) override; ::ndk::ScopedAStatus getFrontendStatusReadiness( const std::vector<FrontendStatusType>& in_statusTypes, std::vector<FrontendStatusReadiness>* _aidl_return) override; void setLna(bool in_bEnable); Loading Loading
services/tuner/TunerFrontend.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,18 @@ TunerFrontend::~TunerFrontend() { return mFrontend->removeOutputPid(in_pid); } ::ndk::ScopedAStatus TunerFrontend::getFrontendStatusReadiness( const std::vector<FrontendStatusType>& in_statusTypes, std::vector<FrontendStatusReadiness>* _aidl_return) { if (mFrontend == nullptr) { ALOGD("IFrontend is not initialized"); return ::ndk::ScopedAStatus::fromServiceSpecificError( static_cast<int32_t>(Result::UNAVAILABLE)); } return mFrontend->getFrontendStatusReadiness(in_statusTypes, _aidl_return); } /////////////// FrontendCallback /////////////////////// ::ndk::ScopedAStatus TunerFrontend::FrontendCallback::onEvent(FrontendEventType frontendEventType) { ALOGV("FrontendCallback::onEvent, type=%d", frontendEventType); Loading
services/tuner/TunerFrontend.h +4 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ using ::aidl::android::hardware::tv::tuner::FrontendScanMessageType; using ::aidl::android::hardware::tv::tuner::FrontendScanType; using ::aidl::android::hardware::tv::tuner::FrontendSettings; using ::aidl::android::hardware::tv::tuner::FrontendStatus; using ::aidl::android::hardware::tv::tuner::FrontendStatusReadiness; using ::aidl::android::hardware::tv::tuner::FrontendStatusType; using ::aidl::android::hardware::tv::tuner::IFrontend; using ::aidl::android::hardware::tv::tuner::IFrontendCallback; Loading Loading @@ -64,6 +65,9 @@ public: ::ndk::ScopedAStatus getFrontendId(int32_t* _aidl_return) override; ::ndk::ScopedAStatus getHardwareInfo(std::string* _aidl_return) override; ::ndk::ScopedAStatus removeOutputPid(int32_t in_pid) override; ::ndk::ScopedAStatus getFrontendStatusReadiness( const std::vector<FrontendStatusType>& in_statusTypes, std::vector<FrontendStatusReadiness>* _aidl_return) override; struct FrontendCallback : public BnFrontendCallback { FrontendCallback(const shared_ptr<ITunerFrontendCallback> tunerFrontendCallback) Loading
services/tuner/aidl/android/media/tv/tuner/ITunerFrontend.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.media.tv.tuner; import android.hardware.tv.tuner.FrontendScanType; import android.hardware.tv.tuner.FrontendSettings; import android.hardware.tv.tuner.FrontendStatus; import android.hardware.tv.tuner.FrontendStatusReadiness; import android.hardware.tv.tuner.FrontendStatusType; import android.media.tv.tuner.ITunerFrontendCallback; import android.media.tv.tuner.ITunerLnb; Loading Loading @@ -104,4 +105,9 @@ interface ITunerFrontend { * Filter out unnecessary PID from frontend output. */ void removeOutputPid(int pid); /** * Gets FrontendStatus’ readiness statuses for given status types. */ FrontendStatusReadiness[] getFrontendStatusReadiness(in FrontendStatusType[] statusTypes); }
services/tuner/hidl/TunerHidlFrontend.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -433,6 +433,14 @@ TunerHidlFrontend::~TunerHidlFrontend() { static_cast<int32_t>(Result::UNAVAILABLE)); } ::ndk::ScopedAStatus TunerHidlFrontend::getFrontendStatusReadiness( const std::vector<FrontendStatusType>& /* in_statusTypes */, std::vector<FrontendStatusReadiness>* _aidl_return) { _aidl_return->clear(); return ::ndk::ScopedAStatus::fromServiceSpecificError( static_cast<int32_t>(Result::UNAVAILABLE)); } void TunerHidlFrontend::setLna(bool bEnable) { if (mFrontend == nullptr) { ALOGD("IFrontend is not initialized"); Loading
services/tuner/hidl/TunerHidlFrontend.h +4 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ using ::aidl::android::hardware::tv::tuner::FrontendScanMessageType; using ::aidl::android::hardware::tv::tuner::FrontendScanType; using ::aidl::android::hardware::tv::tuner::FrontendSettings; using ::aidl::android::hardware::tv::tuner::FrontendStatus; using ::aidl::android::hardware::tv::tuner::FrontendStatusReadiness; using ::aidl::android::hardware::tv::tuner::FrontendStatusType; using ::android::sp; using ::android::hardware::hidl_vec; Loading Loading @@ -84,6 +85,9 @@ public: ::ndk::ScopedAStatus getFrontendId(int32_t* _aidl_return) override; ::ndk::ScopedAStatus getHardwareInfo(std::string* _aidl_return) override; ::ndk::ScopedAStatus removeOutputPid(int32_t in_pid) override; ::ndk::ScopedAStatus getFrontendStatusReadiness( const std::vector<FrontendStatusType>& in_statusTypes, std::vector<FrontendStatusReadiness>* _aidl_return) override; void setLna(bool in_bEnable); Loading