[TEMP]Add samsung radio hal 1.2
authorPierre-Hugues Husson <phh@phh.me>
Sun, 11 Aug 2019 09:41:36 +0000 (11:41 +0200)
committerJan Altensen <info@stricted.net>
Tue, 3 Sep 2019 17:04:49 +0000 (19:04 +0200)
Change-Id: Id029991050b62c35212e62ee0475f65a7443c911

interfaces/Android.bp [new file with mode: 0644]
interfaces/hardware/radio/1.2/Android.bp [new file with mode: 0644]
interfaces/hardware/radio/1.2/IRadio.hal [new file with mode: 0644]
interfaces/hardware/radio/1.2/IRadioIndication.hal [new file with mode: 0644]
interfaces/hardware/radio/1.2/IRadioResponse.hal [new file with mode: 0644]
interfaces/hardware/radio/1.2/types.hal [new file with mode: 0644]
interfaces/update-makefiles.sh [new file with mode: 0644]

diff --git a/interfaces/Android.bp b/interfaces/Android.bp
new file mode 100644 (file)
index 0000000..a6e9529
--- /dev/null
@@ -0,0 +1,5 @@
+hidl_package_root {    
+    name: "vendor.samsung",    
+    path: "device/samsung/universal8895-common/interfaces",    
+}
+
diff --git a/interfaces/hardware/radio/1.2/Android.bp b/interfaces/hardware/radio/1.2/Android.bp
new file mode 100644 (file)
index 0000000..9521958
--- /dev/null
@@ -0,0 +1,47 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+    name: "vendor.samsung.hardware.radio@1.2",
+    root: "vendor.samsung",
+    srcs: [
+        "types.hal",
+        "IRadio.hal",
+        "IRadioIndication.hal",
+        "IRadioResponse.hal",
+    ],
+    interfaces: [
+        "android.hardware.radio@1.0",
+        "android.hardware.radio@1.1",
+        "android.hardware.radio@1.2",
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "ApnProfile",
+        "DcParam",
+        "NrSignalStrength",
+        "OemAdnRecord",
+        "OemCallDetails",
+        "OemCallDomain",
+        "OemCallModify",
+        "OemCallType",
+        "OemCbConfigArgs",
+        "OemCsgInfo",
+        "OemEncodedUSSD",
+        "OemImsCall",
+        "OemPreferredNetworkInfo",
+        "OemSSReleaseComplete",
+        "OemSimPBResponse",
+        "SecAllowDataParam",
+        "SecAppStatus",
+        "SecCall",
+        "SecCardStatus",
+        "SecDataRegStateResult",
+        "SecDial",
+        "SecOperatorInfo",
+        "SecSendSmsResult",
+        "SecSignalStrength",
+        "SecVoiceRegStateResult",
+    ],
+    gen_java: true,
+}
+
diff --git a/interfaces/hardware/radio/1.2/IRadio.hal b/interfaces/hardware/radio/1.2/IRadio.hal
new file mode 100644 (file)
index 0000000..afc8716
--- /dev/null
@@ -0,0 +1,72 @@
+package vendor.samsung.hardware.radio@1.2;
+
+import android.hardware.radio@1.0::ImsSmsMessage;
+import android.hardware.radio@1.0::GsmSmsMessage;
+import android.hardware.radio@1.0::CdmaSmsMessage;
+import android.hardware.radio@1.2::IRadio;
+
+interface IRadio extends android.hardware.radio@1.2::IRadio {
+    oneway secGetIccCardStatus(int32_t serial);
+    oneway secSupplyNetworkDepersonalization(int32_t serial, string netPin, int32_t lockState);
+    oneway secAcceptCall(int32_t serial, OemCallType callType);
+    oneway secDial(int32_t serial, SecDial dialInfo);
+    oneway secGetCurrentCalls(int32_t serial);
+    oneway secGetSignalStrength(int32_t serial);
+    oneway secGetVoiceRegistrationState(int32_t serial);
+    oneway secGetDataRegistrationState(int32_t serial);
+    oneway secExplicitCallTransfer(int32_t serial, string number);
+    oneway secGetOperator(int32_t serial);
+    oneway secSetBarringPassworD(int32_t serial, string facility, string oldPassword, string newPassword, string newPasswordAgain);
+    oneway secGetImsRegistrationState(int32_t serial);
+    oneway secGetAvailableNetworks(int32_t serial);
+    oneway oemDialEmergencyCall(int32_t serial, SecDial dialInfo);
+    oneway oemCallDeflection(int32_t serial, string address);
+    oneway oemModifyCallInitiate(int32_t serial, OemCallModify callInfo);
+    oneway oemSetImsCallList(int32_t serial, vec<OemImsCall> imsCalls);
+    oneway oemGetPreferredNetworkList(int32_t serial);
+    oneway oemSetPreferredNetworkList(int32_t serial, OemPreferredNetworkInfo info);
+    oneway oemSendEncodedUSSD(int32_t serial, OemEncodedUSSD encodedUSSD);
+    oneway oemHoldCall(int32_t serial);
+    oneway oemGetAcbInfo(int32_t serial);
+    oneway oemSetTransferCall(int32_t serial, vec<string> data);
+    oneway oemGetDisable2g(int32_t serial);
+    oneway oemSetDisable2g(int32_t serial, int32_t state);
+    oneway oemGetICBarring(int32_t serial, string facility, string password, string serviceClass, string aid);
+    oneway oemSetICBarring(int32_t serial, string facility, string iCBNumber, string serviceClass, string aid);
+    oneway oemQueryCnap(int32_t serial);
+    oneway oemRefreshNitzTime(int32_t serial);
+    oneway oemEnableUnsolResponse(int32_t serial);
+    oneway oemCancelTransferCall(int32_t serial, int32_t index);
+    oneway oemAcknowledgeRilConnected(int32_t serial);
+    oneway oemGetPhoneBookStorageInfo(int32_t serial, int32_t fileid);
+    oneway oemGetUsimPBCapa(int32_t serial);
+    oneway oemSetSimPower(int32_t serial, int32_t on);
+    oneway oemSetSimOnOff(int32_t serial, int32_t mode);
+    oneway oemSetSimInitEvent(int32_t serial);
+    oneway oemGetSimLockInfo(int32_t serial, int32_t numLockType, int32_t lockType);
+    oneway oemSupplyIccPerso(int32_t serial, string pin);
+    oneway oemChangeIccPerso(int32_t serial, string oldPass, string newPass); //182
+    oneway oemSendCdmaSmsExpectMore(int32_t serial, CdmaSmsMessage sms);
+    oneway oemGetPhoneBookEntry(int32_t serial, int32_t fileid, int32_t p1);
+    oneway oemAccessPhoneBookEntry(int32_t serial, int32_t command, int32_t fileid, int32_t index, OemAdnRecord adnRecord, string pin2);
+    oneway oemGetCellBroadcastConfig(int32_t serial);
+    oneway oemEmergencySearch(int32_t serial);
+    oneway oemEmergencyControl(int32_t serial, int32_t command);
+    oneway oemGetAtr(int32_t serial);
+    oneway oemSendSms(int32_t serial, GsmSmsMessage message);
+    oneway secSendSMSExpectMore(int32_t serial, GsmSmsMessage message);
+    oneway secSendCdmaSms(int32_t serial, CdmaSmsMessage sms);
+    oneway secSendImsSms(int32_t serial, ImsSmsMessage message);
+
+    oneway secGetCdmaRomaingPreference(int32_t serial);
+    oneway secEnable5g(int32_t serial);
+    oneway secEnable5gOnly(int32_t serial);
+    oneway secDisable5g(int32_t serial);
+    oneway secQuery5gStatus(int32_t serial);
+    oneway secQueryNrDcParam(int32_t serial);
+    oneway secQueryNrBearerAllocation(int32_t serial);
+    oneway secQueryNrSignalStrength(int32_t serial);
+    oneway oemQueryCsgList(int32_t serial);
+    oneway oemSelectCsgManual(int32_t serial, OemCsgInfo csgInfo);
+    oneway secSetDataAllowed(int32_t serial, bool allow, SecAllowDataParam param);
+};
diff --git a/interfaces/hardware/radio/1.2/IRadioIndication.hal b/interfaces/hardware/radio/1.2/IRadioIndication.hal
new file mode 100644 (file)
index 0000000..21d8831
--- /dev/null
@@ -0,0 +1,35 @@
+package vendor.samsung.hardware.radio@1.2;
+
+import android.hardware.radio@1.2::IRadioIndication;
+import android.hardware.radio@1.0::RadioIndicationType;
+
+interface IRadioIndication extends android.hardware.radio@1.2::IRadioIndication {
+    oneway secCurrentSignalStrength(RadioIndicationType type, SecSignalStrength signalStrength);
+    oneway secImsNetworkStateChanged(RadioIndicationType type, vec<int32_t> regState);
+    oneway oemAcbInfoChanged(RadioIndicationType type, vec<int32_t> acbInfo);
+    oneway oemCsFallback(RadioIndicationType type, int32_t state);
+    oneway oemImsPreferenceChangeInd(RadioIndicationType type, vec<int32_t> imsPref);
+    oneway oemVoiceRadioBearerHoStatusInd(RadioIndicationType type, int32_t state);
+    oneway oemHysteresisDcnInd(RadioIndicationType type);
+    oneway oemTimerStatusChangedInd(int32_t type, vec<int32_t> eventNoti);
+    oneway oemModemCapInd(int32_t type, vec<int8_t> data);
+    oneway oemAmInd(int32_t type, string intent);
+    oneway oemTrunRadioOnInd(int32_t type);
+    oneway oemSimPbReadyInd(int32_t type);
+    oneway oemPbInitCompleteInd(int32_t type);
+    oneway oemDeviceReadyNoti(int32_t type);
+    oneway oemStkSmsSendResultInd(int32_t type, int32_t result);
+    oneway oemStkCallControlResultInd(int32_t type, string cmd);
+    oneway oemSimSwapStateChangedInd(int32_t type, int32_t state);
+    oneway oemSimCountMismatchedInd(int32_t type, int32_t state);
+    oneway oemSimIccidNoti(int32_t type, string iccid);
+    oneway oemSimOnOffNoti(int32_t type, int32_t mode);
+    oneway oemReleaseCompleteMessageInd(int32_t typer, OemSSReleaseComplete result);
+    oneway oemSapNoti(int32_t type, vec<int8_t> data);
+    oneway oemNrBearerAllocationChangeInd(int32_t type, int32_t status);
+    oneway oem5gStatusChangeInd(int32_t type, int32_t status);
+    oneway oemNrDcParamChangeInd(int32_t type, DcParam dcParam);
+    oneway oemNrSignalStrengthInd(int32_t type, NrSignalStrength nrSignalStrength);
+    oemLoadApnProfile(string select) generates (ApnProfile apnProf);
+    oemGetSettingValue(string key, string table) generates (int32_t value);
+};
diff --git a/interfaces/hardware/radio/1.2/IRadioResponse.hal b/interfaces/hardware/radio/1.2/IRadioResponse.hal
new file mode 100644 (file)
index 0000000..01549bb
--- /dev/null
@@ -0,0 +1,69 @@
+package vendor.samsung.hardware.radio@1.2;
+
+import android.hardware.radio@1.2::IRadioResponse;
+import android.hardware.radio@1.0::LastCallFailCauseInfo;
+import android.hardware.radio@1.0::RadioResponseInfo;
+
+interface IRadioResponse extends android.hardware.radio@1.2::IRadioResponse {
+    oneway secGetIccCardStatusReponse(RadioResponseInfo info, SecCardStatus cardStatus); //143
+    oneway secSupplyNetworkDepersonalizationResponse(RadioResponseInfo info, int32_t remainingRetries);
+    oneway secAcceptCallResponse(RadioResponseInfo info);
+    oneway secDialResponse(RadioResponseInfo info);
+    oneway secGetCurrentCallsResponse(RadioResponseInfo info, vec<SecCall> calls);
+    oneway secGetSignalStrengthResponse(RadioResponseInfo info, SecSignalStrength sigStrength);
+    oneway secGetVoiceRegistrationStateResponse(RadioResponseInfo info, SecVoiceRegStateResult voiceRegResponse);
+    oneway secGetDataRegistrationStateResponse(RadioResponseInfo info, SecDataRegStateResult dataRegResponse);
+    oneway secExplicitCallTransferResponse(RadioResponseInfo info);
+    oneway secGetOperatorRespnse(RadioResponseInfo info, string longName, string shortName, string plmn, string epdgname); //153
+    oneway oemSetBarringPasswordResponse(RadioResponseInfo info);
+    oneway secgetImsRegistrationStateReponse(RadioResponseInfo info, vec<int32_t> regState);
+    oneway secGetAvailableNetworkResponse(RadioResponseInfo info, vec<SecOperatorInfo> networkInfo);
+    oneway oemDialEmergencyCallResponse(RadioResponseInfo info);
+    oneway oemCallDeflectionResponse(RadioResponseInfo info);
+    oneway oemModifyCallInitiateResponse(RadioResponseInfo info, LastCallFailCauseInfo failCauseInfo);
+    oneway oemSetImsCallListResponse(RadioResponseInfo info);
+    oneway oemGetPreferredNetworkListResponse(RadioResponseInfo info, vec<OemPreferredNetworkInfo> infos);
+    oneway oemSetPreferredNetworkListResponse(RadioResponseInfo info);
+    oneway oemSendEncodedUSSDResponse(RadioResponseInfo info); //163
+    oneway oemHoldCallResponse(RadioResponseInfo info);
+    oneway oemGetDisable2gResponse(RadioResponseInfo info, int32_t isDisable);
+    oneway oemSetDisable2gResponse(RadioResponseInfo info);
+    oneway oenGetAcbInfoResponse(RadioResponseInfo info, vec<int32_t> acbInfo);
+    oneway oemSetTransferCallResponse(RadioResponseInfo info);
+    oneway oemGetICBarringResponse(RadioResponseInfo info, string numberDateList);
+    oneway oemSetICBarringResponse(RadioResponseInfo info);
+    oneway oemQueryCnapResponse(RadioResponseInfo info, int32_t queryCNAP);
+    oneway oemRefreshNitzTimeResponse(RadioResponseInfo info);
+    oneway oemEnableUnsolResponseResponse(RadioResponseInfo info); //173
+    oneway oemCancelTransferCallResponse(RadioResponseInfo info);
+    oneway oemAcknowledgeRilConnectedResponse(RadioResponseInfo info);
+    oneway oemGetPhoneBookStorageInfoResponse(RadioResponseInfo info, vec<int32_t> phoneBookInfo);
+    oneway oemUsimPbCapaResponse(RadioResponseInfo info, vec<int32_t> usimPbCapa);
+    oneway oemSetSimPowerResponse(RadioResponseInfo info, int32_t power);
+    oneway oemSetSimOnOffResponse(RadioResponseInfo info);
+    oneway oemSetSimInitEventResponse(RadioResponseInfo info);
+    oneway oemGetSimLockInfoResponse(RadioResponseInfo info, vec<int32_t> simLockInfO);
+    oneway oemSupplyIccPersoResponse(RadioResponseInfo info);
+    oneway oemChangeIccPersoResponse(RadioResponseInfo info); //183
+    oneway oemGetPhoneBookEntryResponse(RadioResponseInfo info, OemSimPBResponse SimPBResponseInfo);
+    oneway oemAccessPhoneBookEntryResponse(RadioResponseInfo info, int32_t SimPbAccessResp);
+    oneway oemGetCellBroadcastConfigResponse(RadioResponseInfo info, OemCbConfigArgs configs);
+    oneway oemEmergencySearchResponse(RadioResponseInfo info, int32_t respEmergencySearch);
+    oneway oemEmergencyControlResponse(RadioResponseInfo info);
+    oneway oemGetAtrResponse(RadioResponseInfo info, string atr);
+    oneway oemSendCdmaSmsExpectMoreResponse(RadioResponseInfo info, SecSendSmsResult sms);
+    oneway secSendSmsResponse(RadioResponseInfo info, SecSendSmsResult sms);
+    oneway secSendSMSExpectMoreResponse(RadioResponseInfo info, SecSendSmsResult sms);
+    oneway secSendCdmaSmsResponse(RadioResponseInfo info, SecSendSmsResult sms); //193
+    oneway secSendImsSmsResponse(RadioResponseInfo info, SecSendSmsResult sms);
+    oneway secSetDataAllowedResponse(RadioResponseInfo info);
+    oneway secGetCdmaRoamingPreferenceResponse(RadioResponseInfo info, int32_t n, int32_t m);
+    oneway secEnable5gResponse(RadioResponseInfo info);
+    oneway secDisable5gResponse(RadioResponseInfo info);
+    oneway secQuery5gStatusResponse(RadioResponseInfo info);
+    oneway secQueryNrDcParamResponse(RadioResponseInfo info, DcParam endcDcnr);
+    oneway secQueryNrBearerAllocationResponse(RadioResponseInfo info, int32_t bearerStatus);
+    oneway secQueryNrSignalStrengthResponse(RadioResponseInfo info, NrSignalStrength nrSignalStrength);
+    oneway oemQueryCsgListResponse(RadioResponseInfo info, vec<OemCsgInfo> csgInfos);
+    oneway oemSelectCsgManualResponse(RadioResponseInfo info); //205
+};
diff --git a/interfaces/hardware/radio/1.2/types.hal b/interfaces/hardware/radio/1.2/types.hal
new file mode 100644 (file)
index 0000000..188857f
--- /dev/null
@@ -0,0 +1,209 @@
+package vendor.samsung.hardware.radio@1.2;
+
+import android.hardware.radio@1.0::AppStatus;
+import android.hardware.radio@1.0::Dial;
+import android.hardware.radio@1.0::OperatorInfo;
+import android.hardware.radio@1.2::AudioQuality;
+import android.hardware.radio@1.2::Call;
+import android.hardware.radio@1.2::SignalStrength;
+import android.hardware.radio@1.2::VoiceRegStateResult;
+import android.hardware.radio@1.2::DataRegStateResult;
+
+struct SecSignalStrength {
+    SignalStrength base;
+    int32_t signalBar;
+};
+
+struct OemSSReleaseComplete {
+    int32_t size;
+    int32_t dataLen;
+    int32_t params;
+    int32_t status;
+    string data;
+};
+
+struct OemSimPBResponse {
+    vec<int32_t> lengthAlphas;
+    vec<int32_t> dataTypeAlphas;
+    vec<string> alphaTags;
+    vec<int32_t> lengthNumbers;
+    vec<int32_t> dataTypeNumbers;
+    vec<string> numbers;
+    int32_t recordIndex;
+    int32_t nextIndex;
+};
+
+struct OemCbConfigArgs {
+    int32_t bCBEnabled;
+    int32_t selectedId;
+    int32_t msgIdMaxCount;
+    int32_t msgIdCount;
+    string msgIDs;
+};
+
+struct SecSendSmsResult {
+    int32_t messageReg;
+    string ackPDU;
+    int32_t errorCode;
+    int32_t errorClass;
+};
+
+struct OemCsgInfo {
+    int32_t csgId;
+    string name;
+    string plmn;
+    int32_t rat;
+    int32_t category;
+    int32_t signalStrength;
+};
+
+struct SecAllowDataParam {
+    int32_t defaultDataPhoneId;
+    int32_t isDataPreferredDuringCall;
+};
+
+enum OemCallType : int32_t {
+    VOICE = 0,
+    VS_TX = 1,
+    TS_RX = 2,
+    VT = 3,
+};
+
+enum OemCallDomain : int32_t {
+    UNKNOWN = 0,
+    CS = 1,
+    PS = 2,
+    AUTOMATIC = 3,
+};
+
+struct OemCallDetails {
+    OemCallType callType;
+    OemCallDomain callDomain;
+    vec<string> extras;
+};
+
+struct OemCallModify {
+    int32_t callIndex;
+    vec<OemCallDetails> callDetails;
+};
+
+struct SecDial {
+    Dial base;
+    vec<OemCallDetails> callDetails;
+};
+
+struct OemPreferredNetworkInfo {
+    int32_t index;
+    string oper;
+    string plmn;
+    int32_t gsmAct;
+    int32_t gsmCompactAct;
+    int32_t utranAct;
+    int32_t mode;
+};
+
+struct OemEncodedUSSD {
+    vec<int8_t> encodedUSSD;
+    int32_t ussdLength;
+    int32_t dcsCode;
+};
+
+struct OemAdnRecord {
+    vec<int8_t> name;
+    int32_t nameDCS;
+    int32_t namelength;
+    string number;
+    vec<int8_t> gsm8bitEmail;
+    int32_t gsm8bitEmaillength;
+    string anr;
+    string anrA;
+    string anrB;
+    string anrC;
+    vec<int8_t> sne;
+    int32_t sneLength;
+    int32_t sneDCS;
+
+};
+
+struct OemImsCall {
+    int32_t state;
+    int32_t type;
+    int32_t isMt;
+    int32_t isMpty;
+    string number;
+};
+
+struct DcParam {
+    int32_t endc_available;
+    int32_t restrict_dcnr;
+};
+
+struct NrSignalStrength {
+    int32_t rsrp;
+    int32_t snr;
+};
+
+struct ApnProfile {
+    string apn;
+    string proto;
+    string roamingProto;
+    string user;
+    string pw;
+    string auth;
+};
+
+struct SecAppStatus {
+    AppStatus base;
+    int32_t pin1NumRetries;
+    int32_t puk1NumRetries;
+    int32_t pin2NumRetries;
+    int32_t puk2NumRetries;
+    int32_t persoUnblockRetries;
+};
+
+struct SecCardStatus {
+    int32_t cardState;
+    int32_t universalPinState;
+    int32_t gsmUmtsSubscriptionAppIndex;
+    int32_t cdmaSubscriptionAppIndex;
+    int32_t imsSubscriptionAppIndex;
+    vec<SecAppStatus> applications;
+    int32_t physicalSlotId;
+    int32_t atr;
+    int32_t iccid;
+};
+
+struct SecVoiceRegStateResult {
+    VoiceRegStateResult base;
+    int32_t lac;
+    int32_t cid;
+    int32_t psVoiceSupport;
+    int32_t imsEmergencyCallSupport;
+    int32_t imsEmergencyCallBarring;
+    int32_t mobileState;
+    int32_t mobileRat;
+    bool isPsOnlyReg;
+};
+
+struct SecDataRegStateResult {
+    DataRegStateResult base;
+    int32_t lac;
+    int32_t cid;
+    int32_t tac;
+    int32_t snapshotStatus;
+    int32_t mobileState;
+    int32_t mobileRat;
+    int32_t mobileOptionalRat;
+};
+
+struct SecCall {
+    Call base;
+    AudioQuality audioQuality;
+    vec<OemCallDetails> callDetails;
+};
+
+struct SecOperatorInfo {
+    OperatorInfo base;
+    string rat;
+    string lac;
+};
diff --git a/interfaces/update-makefiles.sh b/interfaces/update-makefiles.sh
new file mode 100644 (file)
index 0000000..9469317
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh
+
+do_makefiles_update \
+  "vendor.samsung:device/samsung/universal8895-common/interfaces"