• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2021, 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.hardware.tv.tuner.FrontendScanType;
20 import android.hardware.tv.tuner.FrontendSettings;
21 import android.hardware.tv.tuner.FrontendStatus;
22 import android.hardware.tv.tuner.FrontendStatusReadiness;
23 import android.hardware.tv.tuner.FrontendStatusType;
24 import android.media.tv.tuner.ITunerFrontendCallback;
25 import android.media.tv.tuner.ITunerLnb;
26 
27 /**
28  * Tuner Frontend interface handles frontend related operations.
29  *
30  * {@hide}
31  */
32 interface ITunerFrontend {
33     /**
34      * Set the frontend callback.
35      *
36      * @param tunerFrontendCallback the callback to receive frontend related info.
37      */
setCallback(in ITunerFrontendCallback tunerFrontendCallback)38     void setCallback(in ITunerFrontendCallback tunerFrontendCallback);
39 
40     /**
41      * Tunes the frontend to using the settings given.
42      *
43      * @param settings the settings to tune with.
44      */
tune(in FrontendSettings settings)45     void tune(in FrontendSettings settings);
46 
47     /**
48      * Stop the previous tuning.
49      */
stopTune()50     void stopTune();
51 
52     /**
53      * Scan the frontend to use the settings given.
54      *
55      * @param settings the settings to scan with.
56      * @param frontendScanType scan with given type.
57      */
scan(in FrontendSettings settings, in FrontendScanType frontendScanType)58     void scan(in FrontendSettings settings, in FrontendScanType frontendScanType);
59 
60     /**
61      * Stop the previous scanning.
62      */
stopScan()63     void stopScan();
64 
65     /**
66      * Sets Low-Noise Block downconverter (LNB) for satellite frontend.
67      *
68      * @param tuner lnb interface.
69      */
setLnb(in ITunerLnb lnb)70     void setLnb(in ITunerLnb lnb);
71 
72     /**
73      * Link Frontend to the cicam with given id.
74      *
75      * @return lts id
76      */
linkCiCamToFrontend(in int ciCamId)77     int linkCiCamToFrontend(in int ciCamId);
78 
79     /**
80      * Unink Frontend to the cicam with given id.
81      */
unlinkCiCamToFrontend(in int ciCamId)82     void unlinkCiCamToFrontend(in int ciCamId);
83 
84     /**
85      * Releases the ITunerFrontend instance.
86      */
close()87     void close();
88 
89     /**
90      * Gets the statuses of the frontend.
91      */
getStatus(in FrontendStatusType[] statusTypes)92     FrontendStatus[] getStatus(in FrontendStatusType[] statusTypes);
93 
94     /**
95      * Gets the id of the frontend.
96      */
getFrontendId()97     int getFrontendId();
98 
99     /**
100      * Request hardware information about the frontend.
101      */
getHardwareInfo()102     String getHardwareInfo();
103 
104     /**
105      * Filter out unnecessary PID from frontend output.
106      */
removeOutputPid(int pid)107     void removeOutputPid(int pid);
108 
109     /**
110      * Gets FrontendStatus’ readiness statuses for given status types.
111      */
getFrontendStatusReadiness(in FrontendStatusType[] statusTypes)112     FrontendStatusReadiness[] getFrontendStatusReadiness(in FrontendStatusType[] statusTypes);
113 }
114