• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package android.media.tv.tuner;
18 
19 import android.media.tv.tuner.ITunerFrontendCallback;
20 import android.media.tv.tuner.ITunerLnb;
21 import android.media.tv.tuner.TunerFrontendSettings;
22 import android.media.tv.tuner.TunerFrontendStatus;
23 
24 /**
25  * Tuner Frontend interface handles frontend related operations.
26  *
27  * {@hide}
28  */
29 interface ITunerFrontend {
30     /**
31      * Set the frontend callback.
32      *
33      * @param tunerFrontendCallback the callback to receive frontend related info.
34      */
setCallback(in ITunerFrontendCallback tunerFrontendCallback)35     void setCallback(in ITunerFrontendCallback tunerFrontendCallback);
36 
37     /**
38      * Tunes the frontend to using the settings given.
39      *
40      * @param settings the settings to tune with.
41      */
tune(in TunerFrontendSettings settings)42     void tune(in TunerFrontendSettings settings);
43 
44     /**
45      * Stop the previous tuning.
46      */
stopTune()47     void stopTune();
48 
49     /**
50      * Scan the frontend to use the settings given.
51      *
52      * @param settings the settings to scan with.
53      * @param frontendScanType scan with given type.
54      */
scan(in TunerFrontendSettings settings, in int frontendScanType)55     void scan(in TunerFrontendSettings settings, in int frontendScanType);
56 
57     /**
58      * Stop the previous scanning.
59      */
stopScan()60     void stopScan();
61 
62     /**
63      * Sets Low-Noise Block downconverter (LNB) for satellite frontend.
64      *
65      * @param tuner lnb interface.
66      */
setLnb(in ITunerLnb lnb)67     void setLnb(in ITunerLnb lnb);
68 
69     /**
70      * Enable or Disable Low Noise Amplifier (LNA).
71      *
72      * @param bEnable enable Lna or not.
73      */
setLna(in boolean bEnable)74     void setLna(in boolean bEnable);
75 
76     /**
77      * Link Frontend to the cicam with given id.
78      *
79      * @return lts id
80      */
linkCiCamToFrontend(in int ciCamId)81     int linkCiCamToFrontend(in int ciCamId);
82 
83     /**
84      * Unink Frontend to the cicam with given id.
85      */
unlinkCiCamToFrontend(in int ciCamId)86     void unlinkCiCamToFrontend(in int ciCamId);
87 
88     /**
89      * Releases the ITunerFrontend instance.
90      */
close()91     void close();
92 
93     /**
94      * Gets the statuses of the frontend.
95      */
getStatus(in int[] statusTypes)96     TunerFrontendStatus[] getStatus(in int[] statusTypes);
97 
98     /**
99      * Gets the 1.1 extended statuses of the frontend.
100      */
getStatusExtended_1_1(in int[] statusTypes)101     TunerFrontendStatus[] getStatusExtended_1_1(in int[] statusTypes);
102 
103     /**
104      * Gets the id of the frontend.
105      */
getFrontendId()106     int getFrontendId();
107 }
108