summaryrefslogtreecommitdiffstats
path: root/services/radio/RadioRegions.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-03-05 15:12:40 -0800
committerEric Laurent <elaurent@google.com>2015-03-10 18:20:33 -0700
commit4e09069a29fc18d0799808cc26f71e9b068e98ad (patch)
treec546f0130241ac0fea083fca8ec2582e22785aaa /services/radio/RadioRegions.h
parentdedc86dcb6d63e93518c8974c077e50912d15e9c (diff)
downloadframeworks_av-4e09069a29fc18d0799808cc26f71e9b068e98ad.zip
frameworks_av-4e09069a29fc18d0799808cc26f71e9b068e98ad.tar.gz
frameworks_av-4e09069a29fc18d0799808cc26f71e9b068e98ad.tar.bz2
radio service initial implementation
First implementation of broadcast radio service. This native service runs in mediaserver process and controls broadcast radio hardware modules. There is one ihardware module per broadcast radio class. The service allows serveral clients to control tuners on hardware modules and manages resource conflicts. Change-Id: I21469a084c7ccd65042b8ac5f724d060044c45ab
Diffstat (limited to 'services/radio/RadioRegions.h')
-rw-r--r--services/radio/RadioRegions.h225
1 files changed, 225 insertions, 0 deletions
diff --git a/services/radio/RadioRegions.h b/services/radio/RadioRegions.h
new file mode 100644
index 0000000..3335b8a
--- /dev/null
+++ b/services/radio/RadioRegions.h
@@ -0,0 +1,225 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_RADIO_REGIONS_H
+#define ANDROID_HARDWARE_RADIO_REGIONS_H
+
+namespace android {
+
+#define RADIO_BAND_LOWER_FM_ITU1 87500
+#define RADIO_BAND_UPPER_FM_ITU1 108000
+#define RADIO_BAND_SPACING_FM_ITU1 100
+
+#define RADIO_BAND_LOWER_FM_ITU2 87900
+#define RADIO_BAND_UPPER_FM_ITU2 107900
+#define RADIO_BAND_SPACING_FM_ITU2 200
+
+#define RADIO_BAND_LOWER_FM_JAPAN 76000
+#define RADIO_BAND_UPPER_FM_JAPAN 90000
+#define RADIO_BAND_SPACING_FM_JAPAN 100
+
+#define RADIO_BAND_LOWER_FM_OIRT 65800
+#define RADIO_BAND_UPPER_FM_OIRT 74000
+#define RADIO_BAND_SPACING_FM_OIRT 10
+
+#define RADIO_BAND_LOWER_LW 153
+#define RADIO_BAND_UPPER_LW 279
+#define RADIO_BAND_SPACING_LW 9
+
+#define RADIO_BAND_LOWER_MW_IUT1 531
+#define RADIO_BAND_UPPER_MW_ITU1 1611
+#define RADIO_BAND_SPACING_MW_ITU1 9
+
+#define RADIO_BAND_LOWER_MW_IUT2 540
+#define RADIO_BAND_UPPER_MW_ITU2 1610
+#define RADIO_BAND_SPACING_MW_ITU2 10
+
+#define RADIO_BAND_LOWER_SW 2300
+#define RADIO_BAND_UPPER_SW 26100
+#define RADIO_BAND_SPACING_SW 5
+
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#endif
+
+const radio_band_config_t sKnownRegionConfigs[] = {
+ { // FM ITU 1
+ RADIO_REGION_ITU_1,
+ {
+ RADIO_BAND_FM,
+ false,
+ RADIO_BAND_LOWER_FM_ITU1,
+ RADIO_BAND_UPPER_FM_ITU1,
+ 1,
+ {RADIO_BAND_SPACING_FM_ITU1},
+ {
+ RADIO_DEEMPHASIS_50,
+ true,
+ RADIO_RDS_WORLD,
+ true,
+ true,
+ }
+ }
+ },
+ { // FM Americas
+ RADIO_REGION_ITU_2,
+ {
+ RADIO_BAND_FM,
+ false,
+ RADIO_BAND_LOWER_FM_ITU2,
+ RADIO_BAND_UPPER_FM_ITU2,
+ 1,
+ {RADIO_BAND_SPACING_FM_ITU2},
+ {
+ RADIO_DEEMPHASIS_75,
+ true,
+ RADIO_RDS_US,
+ true,
+ true,
+ }
+ }
+ },
+ { // FM Japan
+ RADIO_REGION_JAPAN,
+ {
+ RADIO_BAND_FM,
+ false,
+ RADIO_BAND_LOWER_FM_JAPAN,
+ RADIO_BAND_UPPER_FM_JAPAN,
+ 1,
+ {RADIO_BAND_SPACING_FM_JAPAN},
+ {
+ RADIO_DEEMPHASIS_50,
+ true,
+ RADIO_RDS_WORLD,
+ true,
+ true,
+ }
+ }
+ },
+ { // FM Korea
+ RADIO_REGION_KOREA,
+ {
+ RADIO_BAND_FM,
+ false,
+ RADIO_BAND_LOWER_FM_ITU1,
+ RADIO_BAND_UPPER_FM_ITU1,
+ 1,
+ {RADIO_BAND_SPACING_FM_ITU1},
+ {
+ RADIO_DEEMPHASIS_75,
+ true,
+ RADIO_RDS_WORLD,
+ true,
+ true,
+ }
+ }
+ },
+ { // FM OIRT
+ RADIO_REGION_OIRT,
+ {
+ RADIO_BAND_FM,
+ false,
+ RADIO_BAND_LOWER_FM_OIRT,
+ RADIO_BAND_UPPER_FM_OIRT,
+ 1,
+ {RADIO_BAND_SPACING_FM_OIRT},
+ {
+ RADIO_DEEMPHASIS_50,
+ true,
+ RADIO_RDS_WORLD,
+ true,
+ true,
+ }
+ }
+ },
+ { // FM US HD radio
+ RADIO_REGION_ITU_2,
+ {
+ RADIO_BAND_FM_HD,
+ false,
+ RADIO_BAND_LOWER_FM_ITU2,
+ RADIO_BAND_UPPER_FM_ITU2,
+ 1,
+ {RADIO_BAND_SPACING_FM_ITU2},
+ {
+ RADIO_DEEMPHASIS_75,
+ true,
+ RADIO_RDS_US,
+ true,
+ true,
+ }
+ }
+ },
+ { // AM LW
+ RADIO_REGION_ITU_1,
+ {
+ RADIO_BAND_AM,
+ false,
+ RADIO_BAND_LOWER_LW,
+ RADIO_BAND_UPPER_LW,
+ 1,
+ {RADIO_BAND_SPACING_LW},
+ {
+ }
+ }
+ },
+ { // AM SW
+ RADIO_REGION_ITU_1,
+ {
+ RADIO_BAND_AM,
+ false,
+ RADIO_BAND_LOWER_SW,
+ RADIO_BAND_UPPER_SW,
+ 1,
+ {RADIO_BAND_SPACING_SW},
+ {
+ }
+ }
+ },
+ { // AM MW ITU1
+ RADIO_REGION_ITU_1,
+ {
+ RADIO_BAND_AM,
+ false,
+ RADIO_BAND_LOWER_MW_IUT1,
+ RADIO_BAND_UPPER_MW_ITU1,
+ 1,
+ {RADIO_BAND_SPACING_MW_ITU1},
+ {
+ }
+ }
+ },
+ { // AM MW ITU2
+ RADIO_REGION_ITU_2,
+ {
+ RADIO_BAND_AM,
+ false,
+ RADIO_BAND_LOWER_MW_IUT2,
+ RADIO_BAND_UPPER_MW_ITU2,
+ 1,
+ {RADIO_BAND_SPACING_MW_ITU2},
+ {
+ }
+ }
+ }
+};
+
+
+} // namespace android
+
+#endif // ANDROID_HARDWARE_RADIO_REGIONS_H