1/* 2 * Copyright 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.hardware.tv.tuner@1.1; 18 19import @1.0::FrontendScanType; 20import @1.0::FrontendSettings; 21import @1.0::IFrontend; 22import @1.0::Result; 23 24/** 25 * A Tuner Frontend is used to tune to a frequency and lock signal. 26 * 27 * IFrontend provides a bit stream to the Tuner Demux interface. 28 */ 29interface IFrontend extends @1.0::IFrontend { 30 /** 31 * Tunes the frontend to using the settings given. 32 * 33 * This locks the frontend to a frequency by providing signal 34 * delivery information. If previous tuning isn't completed, this call MUST 35 * stop previous tuning, and start a new tuning. 36 * Tune is an async call, with LOCKED or NO_SIGNAL events sent via callback. 37 * 38 * @param settings Signal delivery information the frontend uses to 39 * search and lock the signal. 40 * @param settingsExt1_1 v1_1 Extended information that would be used in the 1.1 Frontend to 41 * search and lock the signal in a better way. 42 * 43 * @return result Result status of the operation. 44 * SUCCESS if successful, 45 * INVALID_STATE if tuning can't be applied at current stage, 46 * UNKNOWN_ERROR if tuning failed for other reasons. 47 */ 48 tune_1_1(FrontendSettings settings, FrontendSettingsExt1_1 settingsExt1_1) 49 generates (Result result); 50 51 /** 52 * Scan the frontend to use the settings given. 53 * 54 * This uses the frontend to start a scan from signal delivery information. 55 * If previous scan isn't completed, this call MUST stop previous scan, 56 * and start a new scan. 57 * Scan is an async call, with FrontendScanMessage sent via callback. 58 * 59 * @param settings Signal delivery information which the frontend uses to 60 * scan the signal. 61 * @param type the type which the frontend uses to scan the signal. 62 * @param settingsExt1_1 v1_1 Extended information that would be used in the 1.1 Frontend to 63 * search and lock the signal in a better way. 64 * @return result Result status of the operation. 65 * SUCCESS if successful, 66 * INVALID_STATE if tuning can't be applied at current stage, 67 * UNKNOWN_ERROR if tuning failed for other reasons. 68 */ 69 scan_1_1(FrontendSettings settings, FrontendScanType type, 70 FrontendSettingsExt1_1 settingsExt1_1) generates (Result result); 71 72 /** 73 * Link Conditional Access Modules (CAM) to Frontend support Common Interface (CI) bypass mode. 74 * 75 * The client may use this to link CI-CAM to a frontend. CI bypass mode requires that the 76 * CICAM also receives the TS concurrently from the frontend when the Demux is receiving the TS 77 * directly from the frontend. 78 * 79 * @param ciCamId specify CI-CAM Id to link. 80 * @return ltsId Local Transport Stream Id. 81 * @return result Result status of the operation. 82 * SUCCESS if successful, 83 * UNKNOWN_ERROR if failed for other reasons. 84 */ 85 linkCiCam(uint32_t ciCamId) generates (Result result, uint32_t ltsId); 86 87 /** 88 * Unlink Conditional Access Modules (CAM) to Frontend. 89 * 90 * @param ciCamId specify CI-CAM Id to unlink. 91 * @return result Result status of the operation. 92 * SUCCESS if successful, 93 * UNKNOWN_ERROR if failed for other reasons. 94 */ 95 unlinkCiCam(uint32_t ciCamId) generates (Result result); 96 97 /** 98 * Get the v1_1 extended statuses of the frontend. 99 * 100 * This retrieve the extended statuses of the frontend for given extended status types. 101 * 102 * @param statusTypes an array of the extended status types which the caller request. 103 * 104 * @return result Result status of the operation. 105 * SUCCESS if successful, 106 * INVALID_STATE if tuning can't be applied at current stage, 107 * UNKNOWN_ERROR if tuning failed for other reasons. 108 * @return statuses an array of extended statuses the caller requests for. 109 */ 110 getStatusExt1_1(vec<FrontendStatusTypeExt1_1> statusTypes) 111 generates (Result result, vec<FrontendStatusExt1_1> statuses); 112}; 113