platform_hardware_interfaces/tv/tuner/1.0/ITuner.hal

81 lines
2.7 KiB
Text
Raw Normal View History

/*
* 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;
import IDemux;
import IDescrambler;
import IFrontend;
/**
* Top level interface to manage Frontend, Demux and Decrambler hardware
* resouces which are needed for Android TV.
*/
interface ITuner {
/**
* Get Frontend IDs
*
* It is used by the client to get all available frontends' IDs.
*
* @return result Result status of the operation.
* SUCCESS if successful,
* UNKNOWN_ERROR if tuning failed for other reasons.
* @return frontendIds an array of FrontendId for the available frontends.
*/
getFrontendIds() generates (Result result, vec<FrontendId> frontendIds);
/**
* Create a new instance of Frontend given a frontendId.
*
* It is used by the client to create a frontend instance.
*
* @param frontendId the id of the frontend to be opened.
* @return result Result status of the operation.
* SUCCESS if successful,
* UNKNOWN_ERROR if creation failed for other reasons.
* @return frontend the newly created frontend interface.
*/
openFrontendById(FrontendId frontendId)
generates (Result result, IFrontend frontend);
/**
* Create a new instance of Demux.
*
* It is used by the client to create a Demux instance.
*
* @return result Result status of the operation.
* SUCCESS if successful,
* UNKNOWN_ERROR if creation failed for other reasons.
* @return demuxId newly created demux id.
* @return demux the newly created demux interface.
*/
openDemux()
generates (Result result, DemuxId demuxId, IDemux demux);
/**
* 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.
*/
openDescrambler()
generates (Result result, IDescrambler descrambler);
};