mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Add DVBC/DVBS/ISDBT/ISDBS/ISDBS3/ATSC3 support
bug: 135708935 Test: Manual Change-Id: I667afbe8f4455ba1c70ae3113a2cd6819aa28156
This commit is contained in:
@@ -13,6 +13,7 @@ hidl_interface {
|
||||
"IDescrambler.hal",
|
||||
"IFrontend.hal",
|
||||
"IFrontendCallback.hal",
|
||||
"ILnb.hal",
|
||||
"ITuner.hal",
|
||||
],
|
||||
interfaces: [
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package android.hardware.tv.tuner@1.0;
|
||||
|
||||
import IFrontendCallback;
|
||||
import ILnb;
|
||||
|
||||
/**
|
||||
* A Tuner Frontend is used to tune to a frequency and lock signal.
|
||||
@@ -81,4 +82,98 @@ interface IFrontend {
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
close() generates (Result result);
|
||||
|
||||
/**
|
||||
* Scan the frontend to use the settings given.
|
||||
*
|
||||
* This uses the frontend to start a scan from signal delivery information.
|
||||
* If previous scan isn't completed, this call MUST stop previous scan,
|
||||
* and start a new scan.
|
||||
* Scan is an async call, with FrontendScanMessage sent via callback.
|
||||
*
|
||||
* @param settings Signal delivery information which the frontend uses to
|
||||
* scan the signal.
|
||||
* @param type the type which the frontend uses to scan the signal.
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_STATE if tuning can't be applied at current stage,
|
||||
* UNKNOWN_ERROR if tuning failed for other reasons.
|
||||
*/
|
||||
scan(FrontendSettings settings, FrontendScanType type) generates (Result result);
|
||||
|
||||
/**
|
||||
* Stops a previous scanning.
|
||||
*
|
||||
* If the method completes successfully, the frontend stop previous
|
||||
* scanning.
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successfully stop tuning.
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
stopScan() generates (Result result);
|
||||
|
||||
/**
|
||||
* Gets the statuses of the frontend.
|
||||
*
|
||||
* This retrieve the statuses of the frontend for given status types.
|
||||
*
|
||||
* @param statusTypes an array of status type which the caller request.
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_STATE if tuning can't be applied at current stage,
|
||||
* UNKNOWN_ERROR if tuning failed for other reasons.
|
||||
* @return statuses an array of statuses which response the caller's
|
||||
* request.
|
||||
*/
|
||||
getStatus(vec<FrontendStatusType> statusTypes) generates (Result result, vec<FrontendStatus> statuses);
|
||||
|
||||
/**
|
||||
* Sets Low-Noise Block downconverter (LNB) for satellite frontend.
|
||||
*
|
||||
* This assigns a hardware LNB resource to the satellite frontend. It can be
|
||||
* called multiple times to update LNB assignment. The LNB resource must be
|
||||
* released when the frontend is closed.
|
||||
*
|
||||
* @param lnbId the Id of assigned LNB resource.
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_STATE if the frontend can't be set with a LNB, such as
|
||||
* cable frontend.
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
setLnb(ILnb lnb) generates (Result result);
|
||||
|
||||
/**
|
||||
* Enble or Disable Low Noise Amplifier (LNA).
|
||||
*
|
||||
* @param bEnable true if activate LNA module; false if deactivate LNA
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_STATE if the frontend doesn't support LNA.
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
setLna(bool bEnable) generates (Result result);
|
||||
|
||||
/**
|
||||
* Sends DiSEqC (Digital Satellite Equipment Control) message.
|
||||
*
|
||||
* Client sends DiSeqc message to DiSEqc compatible device through the
|
||||
* frontend. The response message from the device comes back to the client
|
||||
* through frontend's callback onDiseqcMessage.
|
||||
*
|
||||
* @param diseqcMessage a byte array of data for DiSEqC message which is
|
||||
* specified by EUTELSAT Bus Functional Specification Version 4.2.
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_STATE if the frontend can't send DiSEqc Message, such as
|
||||
* cable frontend.
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
sendDiseqcMessage(vec<uint8_t> diseqcMessage) generates (Result result);
|
||||
};
|
||||
|
||||
@@ -33,5 +33,13 @@ interface IFrontendCallback {
|
||||
* Specification Version 4.2.
|
||||
*/
|
||||
oneway onDiseqcMessage(vec<uint8_t> diseqcMessage);
|
||||
};
|
||||
|
||||
/**
|
||||
* The callback function that must be called by HAL implementation to notify
|
||||
* the client of scan messages.
|
||||
*
|
||||
* @param type the type of scan message.
|
||||
* @param message the scan message sent by HAL to the client.
|
||||
*/
|
||||
oneway onScanMessage(FrontendScanMessageType type, FrontendScanMessage message);
|
||||
};
|
||||
|
||||
68
tv/tuner/1.0/ILnb.hal
Normal file
68
tv/tuner/1.0/ILnb.hal
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.hardware.tv.tuner@1.0;
|
||||
|
||||
/**
|
||||
* A Tuner LNB (low-noise block downconverter) is used by satellite frontend
|
||||
* to receive the microwave signal from the satellite, amplify it, and
|
||||
* downconvert the frequency to a lower frequency.
|
||||
*/
|
||||
interface ILnb {
|
||||
/**
|
||||
* Set the lnb's power voltage.
|
||||
*
|
||||
* @param voltage the power's voltage the Lnb to use.
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_ARGUMENT if the selected voltage isn't allowed,
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
setVoltage(FrontendLnbVoltage voltage) generates (Result result);
|
||||
|
||||
/**
|
||||
* Set the lnb's tone mode.
|
||||
*
|
||||
* @param tone the tone mode the Lnb to use.
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_ARGUMENT if the selected tone mode isn't allowed,
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
setTone(FrontendLnbTone tone) generates (Result result);
|
||||
|
||||
/**
|
||||
* Select the lnb's position.
|
||||
*
|
||||
* @param position the position the Lnb to use.
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* INVALID_ARGUMENT if the selected position isn't allowed,
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
setSatellitePosition(FrontendLnbPosition position) generates (Result result);
|
||||
|
||||
/**
|
||||
* Releases the LNB instance
|
||||
*
|
||||
* Associated resources are released. close may be called more than once.
|
||||
* Calls to any other method after this will return an error
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* UNKNOWN_ERROR if failed for other reasons.
|
||||
*/
|
||||
close() generates (Result result);
|
||||
};
|
||||
@@ -19,6 +19,7 @@ package android.hardware.tv.tuner@1.0;
|
||||
import IDemux;
|
||||
import IDescrambler;
|
||||
import IFrontend;
|
||||
import ILnb;
|
||||
|
||||
/**
|
||||
* Top level interface to manage Frontend, Demux and Decrambler hardware
|
||||
@@ -45,6 +46,7 @@ interface ITuner {
|
||||
* @param frontendId the id of the frontend to be opened.
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* UNAVAILABLE if no resource.
|
||||
* UNKNOWN_ERROR if creation failed for other reasons.
|
||||
* @return frontend the newly created frontend interface.
|
||||
*/
|
||||
@@ -62,7 +64,7 @@ interface ITuner {
|
||||
* @return demuxId newly created demux id.
|
||||
* @return demux the newly created demux interface.
|
||||
*/
|
||||
openDemux()
|
||||
openDemux()
|
||||
generates (Result result, DemuxId demuxId, IDemux demux);
|
||||
|
||||
/**
|
||||
@@ -75,6 +77,48 @@ interface ITuner {
|
||||
* UNKNOWN_ERROR if creation failed for other reasons.
|
||||
* @return descrambler the newly created descrambler interface.
|
||||
*/
|
||||
openDescrambler()
|
||||
openDescrambler()
|
||||
generates (Result result, IDescrambler descrambler);
|
||||
|
||||
/**
|
||||
* Create a new instance of Descrambler.
|
||||
*
|
||||
* It is used by the client to create a Descrambler instance.
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* UNKNOWN_ERROR if creation failed for other reasons.
|
||||
* @return descrambler the newly created descrambler interface.
|
||||
*/
|
||||
getFrontendInfo(FrontendId frontendId)
|
||||
generates (Result result, FrontendInfo info);
|
||||
|
||||
/**
|
||||
* Get low-noise block downconverter (LNB) IDs.
|
||||
*
|
||||
* It is used by the client to get all available LNBs' IDs.
|
||||
*
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* UNKNOWN_ERROR if tuning failed for other reasons.
|
||||
* @return frontendIds an array of LnbId for the available LNBs.
|
||||
*/
|
||||
getLnbIds() generates (Result result, vec<LnbId> lnbIds);
|
||||
|
||||
/**
|
||||
* Create a new instance of Lnb given a lnbId.
|
||||
*
|
||||
* It is used by the client to create a Lnb instance for satellite Frontend.
|
||||
*
|
||||
* @param lnbId the id of the LNB to be opened.
|
||||
* @return result Result status of the operation.
|
||||
* SUCCESS if successful,
|
||||
* UNAVAILABLE if no resource.
|
||||
* UNKNOWN_ERROR if creation failed for other reasons.
|
||||
* @return lnb the newly created Lnb interface.
|
||||
*/
|
||||
openLnbById(LnbId lnbId)
|
||||
generates (Result result, ILnb lnb);
|
||||
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user