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.frontend; 18 19 import android.annotation.SystemApi; 20 21 /** 22 * DTMB Capabilities. 23 * 24 * <p>DTMB Frontend is only supported in Tuner HAL 1.1 or higher. 25 * @hide 26 */ 27 @SystemApi 28 public final class DtmbFrontendCapabilities extends FrontendCapabilities { 29 private final int mModulationCap; 30 private final int mTransmissionModeCap; 31 private final int mGuardIntervalCap; 32 private final int mTimeInterleaveModeCap; 33 private final int mCodeRateCap; 34 private final int mBandwidthCap; 35 DtmbFrontendCapabilities(int modulationCap, int transmissionModeCap, int guardIntervalCap, int timeInterleaveModeCap, int codeRateCap, int bandwidthCap)36 private DtmbFrontendCapabilities(int modulationCap, int transmissionModeCap, 37 int guardIntervalCap, int timeInterleaveModeCap, int codeRateCap, int bandwidthCap) { 38 mModulationCap = modulationCap; 39 mTransmissionModeCap = transmissionModeCap; 40 mGuardIntervalCap = guardIntervalCap; 41 mTimeInterleaveModeCap = timeInterleaveModeCap; 42 mCodeRateCap = codeRateCap; 43 mBandwidthCap = bandwidthCap; 44 } 45 46 /** 47 * Gets modulation capability. 48 * 49 * @return the bit mask of all the supported modulations. 50 */ 51 @DtmbFrontendSettings.Modulation getModulationCapability()52 public int getModulationCapability() { 53 return mModulationCap; 54 } 55 56 /** 57 * Gets Transmission Mode capability. 58 * 59 * @return the bit mask of all the supported transmission modes. 60 */ 61 @DtmbFrontendSettings.TransmissionMode getTransmissionModeCapability()62 public int getTransmissionModeCapability() { 63 return mTransmissionModeCap; 64 } 65 66 /** 67 * Gets Guard Interval capability. 68 * 69 * @return the bit mask of all the supported guard intervals. 70 */ 71 @DtmbFrontendSettings.GuardInterval getGuardIntervalCapability()72 public int getGuardIntervalCapability() { 73 return mGuardIntervalCap; 74 } 75 76 /** 77 * Gets Time Interleave Mode capability. 78 * 79 * @return the bit mask of all the supported time interleave modes. 80 */ 81 @DtmbFrontendSettings.TimeInterleaveMode getTimeInterleaveModeCapability()82 public int getTimeInterleaveModeCapability() { 83 return mTimeInterleaveModeCap; 84 } 85 86 /** 87 * Gets Code Rate capability. 88 * 89 * @return the bit mask of all the supported code rates. 90 */ 91 @DtmbFrontendSettings.CodeRate getCodeRateCapability()92 public int getCodeRateCapability() { 93 return mCodeRateCap; 94 } 95 96 /** 97 * Gets Bandwidth capability. 98 * 99 * @return the bit mask of all the supported bandwidth. 100 */ 101 @DtmbFrontendSettings.Bandwidth getBandwidthCapability()102 public int getBandwidthCapability() { 103 return mBandwidthCap; 104 } 105 } 106