diff --git a/tv/tuner/1.0/IFilter.hal b/tv/tuner/1.0/IFilter.hal index 94e3c0ce26..567971f019 100644 --- a/tv/tuner/1.0/IFilter.hal +++ b/tv/tuner/1.0/IFilter.hal @@ -120,12 +120,13 @@ interface IFilter { * presented by file descripor in the handle as released. * * @param avMemory A handle associated to the memory for audio or video. + * @param avDataId An Id provides additional information for AV data. * @return result Result status of the operation. * SUCCESS if successful, * INVALID_ARGUMENT if failed for wrong parameter. * UNKNOWN_ERROR if failed for other reasons. */ - releaseAvHandle(handle avMemory) generates (Result result); + releaseAvHandle(handle avMemory, uint64_t avDataId) generates (Result result); /** * Set the filter's data source. diff --git a/tv/tuner/1.0/ITuner.hal b/tv/tuner/1.0/ITuner.hal index 2712c13708..ba183f180d 100644 --- a/tv/tuner/1.0/ITuner.hal +++ b/tv/tuner/1.0/ITuner.hal @@ -123,4 +123,21 @@ interface ITuner { * @return lnb the newly created Lnb interface. */ openLnbById(LnbId lnbId) generates (Result result, ILnb lnb); + + /** + * Create a new instance of Lnb given a LNB name. + * + * It is used by the client to create a LNB instance for external device. + * + * @param lnbName the name for an external LNB to be opened. The app + * provides the name. Frammework doesn't depend on the name, instead + * use lnbId return from this call. + * @return result Result status of the operation. + * SUCCESS if successful, + * UNAVAILABLE if no resource. + * UNKNOWN_ERROR if creation failed for other reasons. + * @return lnbId the id of the LNB to be opened. + * @return lnb the newly created Lnb interface. + */ + openLnbByName(string lnbName) generates (Result result, LnbId lnbId, ILnb lnb); }; diff --git a/tv/tuner/1.0/default/Filter.cpp b/tv/tuner/1.0/default/Filter.cpp index b3160fc1f7..54d09520e0 100644 --- a/tv/tuner/1.0/default/Filter.cpp +++ b/tv/tuner/1.0/default/Filter.cpp @@ -120,7 +120,7 @@ Return Filter::flush() { return Result::SUCCESS; } -Return Filter::releaseAvHandle(const hidl_handle& /*avMemory*/) { +Return Filter::releaseAvHandle(const hidl_handle& /*avMemory*/, uint64_t /*avDataId*/) { ALOGV("%s", __FUNCTION__); return Result::SUCCESS; diff --git a/tv/tuner/1.0/default/Filter.h b/tv/tuner/1.0/default/Filter.h index d397f73081..0dc992a2ba 100644 --- a/tv/tuner/1.0/default/Filter.h +++ b/tv/tuner/1.0/default/Filter.h @@ -70,7 +70,7 @@ class Filter : public IFilter { virtual Return flush() override; - virtual Return releaseAvHandle(const hidl_handle& avMemory) override; + virtual Return releaseAvHandle(const hidl_handle& avMemory, uint64_t avDataId) override; virtual Return close() override; diff --git a/tv/tuner/1.0/default/Tuner.cpp b/tv/tuner/1.0/default/Tuner.cpp index c143d61154..c6017f0c76 100644 --- a/tv/tuner/1.0/default/Tuner.cpp +++ b/tv/tuner/1.0/default/Tuner.cpp @@ -139,6 +139,15 @@ sp Tuner::getFrontendById(uint32_t frontendId) { return mFrontends[frontendId]; } +Return Tuner::openLnbByName(const hidl_string& /*lnbName*/, openLnbByName_cb _hidl_cb) { + ALOGV("%s", __FUNCTION__); + + sp lnb = new Lnb(); + + _hidl_cb(Result::SUCCESS, 1234, lnb); + return Void(); +} + void Tuner::setFrontendAsDemuxSource(uint32_t frontendId, uint32_t demuxId) { mFrontendToDemux[frontendId] = demuxId; } diff --git a/tv/tuner/1.0/default/Tuner.h b/tv/tuner/1.0/default/Tuner.h index 96da257b0a..7a8a9198ce 100644 --- a/tv/tuner/1.0/default/Tuner.h +++ b/tv/tuner/1.0/default/Tuner.h @@ -55,6 +55,9 @@ class Tuner : public ITuner { virtual Return openLnbById(LnbId lnbId, openLnbById_cb _hidl_cb) override; + virtual Return openLnbByName(const hidl_string& lnbName, + openLnbByName_cb _hidl_cb) override; + sp getFrontendById(uint32_t frontendId); void setFrontendAsDemuxSource(uint32_t frontendId, uint32_t demuxId); diff --git a/tv/tuner/1.0/types.hal b/tv/tuner/1.0/types.hal index 944da5a840..bcd4b9eddd 100644 --- a/tv/tuner/1.0/types.hal +++ b/tv/tuner/1.0/types.hal @@ -536,6 +536,16 @@ enum FrontendDvbsStandard : uint8_t { S2X = 1 << 3, }; +/** + * VCM mode in DVBS. + */ +@export +enum FrontendDvbsVcmMode : uint32_t { + UNDEFINED, + AUTO, + MANUAL, +}; + /** * Signal Settings for an DVBS Frontend. */ @@ -561,6 +571,8 @@ struct FrontendDvbsSettings { uint32_t inputStreamId; FrontendDvbsStandard standard; + + FrontendDvbsVcmMode vcmMode; }; /** @@ -960,7 +972,7 @@ enum FrontendIsdbs3Modulation : uint32_t { /** * hardware is able to detect and set Modulation automatically */ - AUTO = 1 << 5, + AUTO = 1 << 0, MOD_BPSK = 1 << 1, MOD_QPSK = 1 << 2, MOD_8PSK = 1 << 3, @@ -1105,7 +1117,7 @@ struct FrontendIsdbtCapabilities { bitfield bandwidthCap; - bitfield constellationCap; + bitfield modulationCap; bitfield coderateCap; @@ -1227,6 +1239,11 @@ enum FrontendScanMessageType : uint32_t { * Locked symbol rate. */ SYMBOL_RATE, + /** + * Locked HIERARCHY for DVBT2 frontend. + */ + HIERARCHY, + ANALOG_TYPE, /** * Locked Plp Ids for DVBT2 frontend. */ @@ -1272,14 +1289,18 @@ safe_union FrontendScanMessage { uint8_t progressPercent; /** - * Signal frequency in Hertz + * Signal frequencies in Hertz */ - uint32_t frequency; + vec frequencies; /** * Symbols per second */ - uint32_t symbolRate; + vec symbolRates; + + FrontendDvbtHierarchy hierarchy; + + FrontendAnalogType analogType; vec plpIds; @@ -1287,10 +1308,12 @@ safe_union FrontendScanMessage { vec inputStreamIds; - safe_union standard { + safe_union Standard { FrontendDvbsStandard sStd; FrontendDvbtStandard tStd; + + FrontendAnalogSifStandard sifStd; } std; /** @@ -2020,18 +2043,14 @@ enum DemuxScHevcIndex : uint32_t { }; /** - * Index type to be used in the filter for record + * Start Code Index type to be used in the filter for record */ @export -enum DemuxRecordIndexType : uint32_t { +enum DemuxRecordScIndexType : uint32_t { /** - * Don't use index + * Don't use SC index */ NONE, - /** - * Use TS index - */ - TS, /** * Use Start Code index */ @@ -2046,15 +2065,16 @@ enum DemuxRecordIndexType : uint32_t { * Filter Settings for Record data. */ struct DemuxFilterRecordSettings { - DemuxRecordIndexType indexType; + bitfield tsIndexMask; - safe_union IndexMask { - bitfield tsIndexMask; + DemuxRecordScIndexType scIndexType; - bitfield scIndexMask; + safe_union ScIndexMask { - bitfield scHevcIndexMask; - } indexMask; + bitfield sc; + + bitfield scHevc; + } scIndexMask; }; /** @@ -2398,6 +2418,12 @@ struct DemuxFilterMediaEvent { */ uint32_t dataLength; + /** + * The offset in the memory block which is shared among multiple + * MediaEvents. + */ + uint32_t offset; + /** * A handle associated to the memory where audio or video data stays. */ @@ -2408,6 +2434,12 @@ struct DemuxFilterMediaEvent { */ bool isSecureMemory; + /** + * An Id is used by HAL to provide additional information for AV data. + * For secure audio, it's the audio handle used by Audio Track. + */ + uint64_t avDataId; + /** * MPU sequence number of filtered data (only for MMTP) */ @@ -2448,16 +2480,17 @@ struct DemuxFilterPesEvent { struct DemuxFilterTsRecordEvent { DemuxPid pid; + bitfield tsIndexMask; + /** * Indexes of record output */ - safe_union IndexMask { - bitfield tsIndexMask; + safe_union ScIndexMask { - bitfield scIndexMask; + bitfield sc; - bitfield scHevcIndexMask; - } indexMask; + bitfield scHevc; + } scIndexMask; /** * Byte number from beginning of the filter's output