1 /** 2 * Copyright (c) 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.hardware.common.fmq.MQDescriptor; 20 import android.hardware.common.fmq.SynchronizedReadWrite; 21 import android.hardware.common.fmq.UnsynchronizedWrite; 22 import android.media.tv.tuner.ITunerDemux; 23 import android.media.tv.tuner.ITunerDescrambler; 24 import android.media.tv.tuner.ITunerFrontend; 25 import android.media.tv.tuner.ITunerLnb; 26 import android.media.tv.tuner.TunerDemuxCapabilities; 27 import android.media.tv.tuner.TunerFrontendDtmbCapabilities; 28 import android.media.tv.tuner.TunerFrontendInfo; 29 30 /** 31 * TunerService interface handles tuner related operations. 32 * 33 * {@hide} 34 */ 35 //@VintfStability 36 interface ITunerService { 37 38 /** 39 * Gets frontend IDs. 40 */ getFrontendIds(out int[] ids)41 void getFrontendIds(out int[] ids); 42 43 /** 44 * Retrieve the frontend's information. 45 * 46 * @param frontendHandle the handle of the frontend granted by TRM. 47 * @return the information of the frontend. 48 */ getFrontendInfo(in int frontendHandle)49 TunerFrontendInfo getFrontendInfo(in int frontendHandle); 50 51 /** 52 * Get Dtmb Frontend Capabilities. 53 */ getFrontendDtmbCapabilities(in int id)54 TunerFrontendDtmbCapabilities getFrontendDtmbCapabilities(in int id); 55 56 /** 57 * Open a Tuner Frontend interface. 58 * 59 * @param frontendHandle the handle of the frontend granted by TRM. 60 * @return the aidl interface of the frontend. 61 */ openFrontend(in int frontendHandle)62 ITunerFrontend openFrontend(in int frontendHandle); 63 64 /** 65 * Open a new interface of ITunerLnb given a lnbHandle. 66 * 67 * @param lnbHandle the handle of the LNB granted by TRM. 68 * @return a newly created ITunerLnb interface. 69 */ openLnb(in int lnbHandle)70 ITunerLnb openLnb(in int lnbHandle); 71 72 /** 73 * Open a new interface of ITunerLnb given a LNB name. 74 * 75 * @param lnbName the name for an external LNB to be opened. 76 * @return a newly created ITunerLnb interface. 77 */ openLnbByName(in String lnbName)78 ITunerLnb openLnbByName(in String lnbName); 79 80 /** 81 * Create a new instance of Demux. 82 */ openDemux(in int demuxHandle)83 ITunerDemux openDemux(in int demuxHandle); 84 85 /** 86 * Retrieve the Tuner Demux capabilities. 87 * 88 * @return the demux’s capabilities. 89 */ getDemuxCaps()90 TunerDemuxCapabilities getDemuxCaps(); 91 92 /* Open a new interface of ITunerDescrambler given a descramblerHandle. 93 * 94 * @param descramblerHandle the handle of the descrambler granted by TRM. 95 * @return a newly created ITunerDescrambler interface. 96 */ openDescrambler(in int descramblerHandle)97 ITunerDescrambler openDescrambler(in int descramblerHandle); 98 99 /** 100 * Get an integer that carries the Tuner HIDL version. The high 16 bits are the 101 * major version number while the low 16 bits are the minor version. Default 102 * value is unknown version 0. 103 */ getTunerHalVersion()104 int getTunerHalVersion(); 105 } 106