blob: f39eb5de481314db9187339098fc7b42fae7750c [file] [log] [blame]
Amy Zhang3ea25a62020-08-04 10:23:52 -07001/*
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.
Amy Zhangbc15b592020-09-25 15:35:55 -070040 * @param settingsExt1_1 v1_1 Extended information that would be used in the 1.1 Frontend to
Amy Zhang3ea25a62020-08-04 10:23:52 -070041 * 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 */
Amy Zhangbc15b592020-09-25 15:35:55 -070048 tune_1_1(FrontendSettings settings, FrontendSettingsExt1_1 settingsExt1_1)
Amy Zhang4699ec62020-09-10 15:51:19 -070049 generates (Result result);
Amy Zhang3ea25a62020-08-04 10:23:52 -070050
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.
Amy Zhangbc15b592020-09-25 15:35:55 -070062 * @param settingsExt1_1 v1_1 Extended information that would be used in the 1.1 Frontend to
Amy Zhang3ea25a62020-08-04 10:23:52 -070063 * 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 */
Amy Zhangbc15b592020-09-25 15:35:55 -070069 scan_1_1(FrontendSettings settings, FrontendScanType type,
70 FrontendSettingsExt1_1 settingsExt1_1) generates (Result result);
Amy Zhang17f8eac2020-08-17 16:52:13 -070071
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 result Result status of the operation.
81 * SUCCESS if successful,
82 * UNKNOWN_ERROR if failed for other reasons.
83 */
84 linkCiCam(uint32_t ciCamId) generates (Result result);
Amy Zhang3ea25a62020-08-04 10:23:52 -070085};