From e47a5164d8aa481ca1886c6e9268e3084e89e713 Mon Sep 17 00:00:00 2001 From: Zoey Chen Date: Tue, 1 Dec 2020 12:44:06 +0800 Subject: [PATCH] [Telephony] Implement PhysicalChannelConfig in HAL 1.6 Bug: 169206279 Test: make and VtsHalRadioV1_6Target Change-Id: I4352ea928a76197aae01b887960eaed05698e3eb Merged-In: I4352ea928a76197aae01b887960eaed05698e3eb --- radio/1.6/IRadioIndication.hal | 12 ++++ radio/1.6/types.hal | 71 +++++++++++++++++++ .../functional/radio_hidl_hal_utils_v1_6.h | 5 ++ radio/1.6/vts/functional/radio_indication.cpp | 7 ++ 4 files changed, 95 insertions(+) diff --git a/radio/1.6/IRadioIndication.hal b/radio/1.6/IRadioIndication.hal index 1b56d40bcf..a53d7c1212 100644 --- a/radio/1.6/IRadioIndication.hal +++ b/radio/1.6/IRadioIndication.hal @@ -23,6 +23,7 @@ import @1.6::LinkCapacityEstimate; import @1.6::NetworkScanResult; import @1.6::SignalStrength; import @1.6::SetupDataCallResult; +import @1.6::PhysicalChannelConfig; /** * Interface declaring unsolicited radio indications. @@ -101,4 +102,15 @@ interface IRadioIndication extends @1.5::IRadioIndication { * CellInfo. */ oneway networkScanResult_1_6(RadioIndicationType type, NetworkScanResult result); + + /** + * Indicates physical channel configurations. + * + * An empty configs list indicates that the radio is in idle mode. + * + * @param type Type of radio indication + * @param configs Vector of PhysicalChannelConfigs + */ + oneway currentPhysicalChannelConfigs_1_6(RadioIndicationType type, + vec configs); }; diff --git a/radio/1.6/types.hal b/radio/1.6/types.hal index acd0e083d1..6dd8315813 100644 --- a/radio/1.6/types.hal +++ b/radio/1.6/types.hal @@ -23,7 +23,10 @@ import @1.0::LteSignalStrength; import @1.0::RadioError; import @1.0::RadioResponseType; import @1.0::RegState; +import @1.1::EutranBands; +import @1.1::GeranBands; import @1.1::ScanStatus; +import @1.1::UtranBands; import @1.2::Call; import @1.2::CellInfoCdma; import @1.2::CellConnectionStatus; @@ -41,6 +44,7 @@ import @1.5::CellInfoGsm; import @1.5::CellInfoWcdma; import @1.5::CellInfoTdscdma; import @1.5::LinkAddress; +import @1.5::NgranBands; import @1.5::RegStateResult.AccessTechnologySpecificInfo.Cdma2000RegistrationInfo; import @1.5::RegStateResult.AccessTechnologySpecificInfo.EutranRegistrationInfo; import @1.5::RegistrationFailCause; @@ -733,3 +737,70 @@ struct Call { */ string forwardedNumber; }; + +struct PhysicalChannelConfig { + /** Connection status for cell. Valid values are PRIMARY_SERVING and SECONDARY_SERVING */ + CellConnectionStatus status; + + /** The radio technology for this physical channel */ + RadioTechnology rat; + + /** Downlink Absolute Radio Frequency Channel Number */ + int32_t downlinkChannelNumber; + + /** Uplink Absolute Radio Frequency Channel Number */ + int32_t uplinkChannelNumber; + + /** Downlink cell bandwidth, in kHz */ + int32_t cellBandwidthDownlink; + + /** Uplink cell bandwidth, in kHz */ + int32_t cellBandwidthUplink; + + /** + * A list of data calls mapped to this physical channel. The context id must match the cid of + * @1.5::SetupDataCallResult. An empty list means the physical channel has no data call mapped + * to it. + */ + vec contextIds; + + /** + * The physical cell identifier for this cell. + * + * In UTRAN, this value is primary scrambling code. The range is [0, 511]. + * Reference: 3GPP TS 25.213 section 5.2.2. + * + * In EUTRAN, this value is physical layer cell identity. The range is [0, 503]. + * Reference: 3GPP TS 36.211 section 6.11. + * + * In 5G RAN, this value is physical layer cell identity. The range is [0, 1007]. + * Reference: 3GPP TS 38.211 section 7.4.2.1. + */ + uint32_t physicalCellId; + + /** + * The frequency band to scan. + */ + safe_union Band { + /** Valid only if radioAccessNetwork = GERAN. */ + GeranBands geranBand; + /** Valid only if radioAccessNetwork = UTRAN. */ + UtranBands utranBand; + /** Valid only if radioAccessNetwork = EUTRAN. */ + EutranBands eutranBand; + /** Valid only if radioAccessNetwork = NGRAN. */ + NgranBands ngranBand; + } band; +}; + +/** + * Extended from @1.5 NgranBands + * IRadio 1.6 supports NGRAN bands up to V16.5.0 + */ +enum NgranBands : @1.5::NgranBands { + /** 3GPP TS 38.101-1, Table 5.2-1: FR1 bands */ + BAND_26 = 26, + BAND_46 = 46, + BAND_53 = 53, + BAND_96 = 96, +}; diff --git a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h index fbcd7a9339..5fcfa3b0bb 100644 --- a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h +++ b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h @@ -857,6 +857,11 @@ class RadioIndication_v1_6 : public ::android::hardware::radio::V1_6::IRadioIndi const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::CellInfo>& records); + Return currentPhysicalChannelConfigs_1_6( + RadioIndicationType type, + const ::android::hardware::hidl_vec< + ::android::hardware::radio::V1_6::PhysicalChannelConfig>& configs); + /* 1.5 Api */ Return uiccApplicationsEnablementChanged(RadioIndicationType type, bool enabled); diff --git a/radio/1.6/vts/functional/radio_indication.cpp b/radio/1.6/vts/functional/radio_indication.cpp index bfc54c0ac5..e7a96807a9 100644 --- a/radio/1.6/vts/functional/radio_indication.cpp +++ b/radio/1.6/vts/functional/radio_indication.cpp @@ -30,6 +30,13 @@ Return RadioIndication_v1_6::unthrottleApn(RadioIndicationType /*type*/, return Void(); } +Return RadioIndication_v1_6::currentPhysicalChannelConfigs_1_6( + RadioIndicationType /*type*/, + const ::android::hardware::hidl_vec< + ::android::hardware::radio::V1_6::PhysicalChannelConfig>& /*configs*/) { + return Void(); +} + /* 1.5 Apis */ Return RadioIndication_v1_6::uiccApplicationsEnablementChanged(RadioIndicationType /*type*/, bool /*enabled*/) {