1 /* 2 * Copyright (C) 2015 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 #ifndef ANDROID_HARDWARE_RADIO_REGIONS_H 18 #define ANDROID_HARDWARE_RADIO_REGIONS_H 19 20 namespace android { 21 22 #define RADIO_BAND_LOWER_FM_ITU1 87500 23 #define RADIO_BAND_UPPER_FM_ITU1 108000 24 #define RADIO_BAND_SPACING_FM_ITU1 100 25 26 #define RADIO_BAND_LOWER_FM_ITU2 87900 27 #define RADIO_BAND_UPPER_FM_ITU2 107900 28 #define RADIO_BAND_SPACING_FM_ITU2 200 29 30 #define RADIO_BAND_LOWER_FM_JAPAN 76000 31 #define RADIO_BAND_UPPER_FM_JAPAN 90000 32 #define RADIO_BAND_SPACING_FM_JAPAN 100 33 34 #define RADIO_BAND_LOWER_FM_OIRT 65800 35 #define RADIO_BAND_UPPER_FM_OIRT 74000 36 #define RADIO_BAND_SPACING_FM_OIRT 10 37 38 #define RADIO_BAND_LOWER_LW 153 39 #define RADIO_BAND_UPPER_LW 279 40 #define RADIO_BAND_SPACING_LW 9 41 42 #define RADIO_BAND_LOWER_MW_IUT1 531 43 #define RADIO_BAND_UPPER_MW_ITU1 1611 44 #define RADIO_BAND_SPACING_MW_ITU1 9 45 46 #define RADIO_BAND_LOWER_MW_IUT2 540 47 #define RADIO_BAND_UPPER_MW_ITU2 1610 48 #define RADIO_BAND_SPACING_MW_ITU2 10 49 50 #define RADIO_BAND_LOWER_SW 2300 51 #define RADIO_BAND_UPPER_SW 26100 52 #define RADIO_BAND_SPACING_SW 5 53 54 55 #ifndef ARRAY_SIZE 56 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) 57 #endif 58 59 const radio_band_config_t sKnownRegionConfigs[] = { 60 { // FM ITU 1 61 RADIO_REGION_ITU_1, 62 { 63 RADIO_BAND_FM, 64 false, 65 RADIO_BAND_LOWER_FM_ITU1, 66 RADIO_BAND_UPPER_FM_ITU1, 67 1, 68 {RADIO_BAND_SPACING_FM_ITU1}, 69 { 70 { 71 RADIO_DEEMPHASIS_50, 72 true, 73 RADIO_RDS_WORLD, 74 true, 75 true, 76 true, 77 } 78 } 79 } 80 }, 81 { // FM Americas 82 RADIO_REGION_ITU_2, 83 { 84 RADIO_BAND_FM, 85 false, 86 RADIO_BAND_LOWER_FM_ITU2, 87 RADIO_BAND_UPPER_FM_ITU2, 88 1, 89 {RADIO_BAND_SPACING_FM_ITU2}, 90 { 91 { 92 RADIO_DEEMPHASIS_75, 93 true, 94 RADIO_RDS_US, 95 true, 96 true, 97 true, 98 } 99 } 100 } 101 }, 102 { // FM Japan 103 RADIO_REGION_JAPAN, 104 { 105 RADIO_BAND_FM, 106 false, 107 RADIO_BAND_LOWER_FM_JAPAN, 108 RADIO_BAND_UPPER_FM_JAPAN, 109 1, 110 {RADIO_BAND_SPACING_FM_JAPAN}, 111 { 112 { 113 RADIO_DEEMPHASIS_50, 114 true, 115 RADIO_RDS_WORLD, 116 true, 117 true, 118 true, 119 } 120 } 121 } 122 }, 123 { // FM Korea 124 RADIO_REGION_KOREA, 125 { 126 RADIO_BAND_FM, 127 false, 128 RADIO_BAND_LOWER_FM_ITU1, 129 RADIO_BAND_UPPER_FM_ITU1, 130 1, 131 {RADIO_BAND_SPACING_FM_ITU1}, 132 { 133 { 134 RADIO_DEEMPHASIS_75, 135 true, 136 RADIO_RDS_WORLD, 137 true, 138 true, 139 true, 140 } 141 } 142 } 143 }, 144 { // FM OIRT 145 RADIO_REGION_OIRT, 146 { 147 RADIO_BAND_FM, 148 false, 149 RADIO_BAND_LOWER_FM_OIRT, 150 RADIO_BAND_UPPER_FM_OIRT, 151 1, 152 {RADIO_BAND_SPACING_FM_OIRT}, 153 { 154 { 155 RADIO_DEEMPHASIS_50, 156 true, 157 RADIO_RDS_WORLD, 158 true, 159 true, 160 true, 161 } 162 } 163 } 164 }, 165 { // FM US HD radio 166 RADIO_REGION_ITU_2, 167 { 168 RADIO_BAND_FM_HD, 169 false, 170 RADIO_BAND_LOWER_FM_ITU2, 171 RADIO_BAND_UPPER_FM_ITU2, 172 1, 173 {RADIO_BAND_SPACING_FM_ITU2}, 174 { 175 { 176 RADIO_DEEMPHASIS_75, 177 true, 178 RADIO_RDS_US, 179 true, 180 true, 181 true, 182 } 183 } 184 } 185 }, 186 { // AM LW 187 RADIO_REGION_ITU_1, 188 { 189 RADIO_BAND_AM, 190 false, 191 RADIO_BAND_LOWER_LW, 192 RADIO_BAND_UPPER_LW, 193 1, 194 {RADIO_BAND_SPACING_LW}, 195 { 196 } 197 } 198 }, 199 { // AM SW 200 RADIO_REGION_ITU_1, 201 { 202 RADIO_BAND_AM, 203 false, 204 RADIO_BAND_LOWER_SW, 205 RADIO_BAND_UPPER_SW, 206 1, 207 {RADIO_BAND_SPACING_SW}, 208 { 209 } 210 } 211 }, 212 { // AM MW ITU1 213 RADIO_REGION_ITU_1, 214 { 215 RADIO_BAND_AM, 216 false, 217 RADIO_BAND_LOWER_MW_IUT1, 218 RADIO_BAND_UPPER_MW_ITU1, 219 1, 220 {RADIO_BAND_SPACING_MW_ITU1}, 221 { 222 } 223 } 224 }, 225 { // AM MW ITU2 226 RADIO_REGION_ITU_2, 227 { 228 RADIO_BAND_AM, 229 false, 230 RADIO_BAND_LOWER_MW_IUT2, 231 RADIO_BAND_UPPER_MW_ITU2, 232 1, 233 {RADIO_BAND_SPACING_MW_ITU2}, 234 { 235 } 236 } 237 } 238 }; 239 240 241 } // namespace android 242 243 #endif // ANDROID_HARDWARE_RADIO_REGIONS_H 244