From: Say Date: Sun, 13 Dec 2015 08:25:01 +0000 (+0900) Subject: libril: add initial support for ss333 modem X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1052770c5808000f5fa377bb7b7d6edea2e4d6b;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung.git libril: add initial support for ss333 modem zeroflte uses ss333 Change-Id: If3c9d34ea31c06ce23bd8d0236a9f2ddbab3ddc4 Signed-off-by: Say --- diff --git a/ril/Android.mk b/ril/Android.mk index 8008ace..de33c11 100644 --- a/ril/Android.mk +++ b/ril/Android.mk @@ -20,7 +20,7 @@ ifeq ($(BOARD_VENDOR),samsung) # libril ifeq ($(BOARD_PROVIDES_LIBRIL),true) -ifneq ($(filter xmm6260 xmm6262 xmm6360 xmm7260 m7450,$(BOARD_MODEM_TYPE)),) +ifneq ($(filter xmm6260 xmm6262 xmm6360 xmm7260 m7450 ss333,$(BOARD_MODEM_TYPE)),) include $(RIL_PATH)/libril/Android.mk endif endif diff --git a/ril/libril/Android.mk b/ril/libril/Android.mk index 3eaf2fe..f3d5545 100644 --- a/ril/libril/Android.mk +++ b/ril/libril/Android.mk @@ -34,6 +34,9 @@ endif ifeq ($(BOARD_MODEM_TYPE),m7450) LOCAL_CFLAGS := -DMODEM_TYPE_M7450 endif +ifeq ($(BOARD_MODEM_TYPE),ss333) +LOCAL_CFLAGS := -DMODEM_TYPE_SS333 +endif LOCAL_C_INCLUDES += $(TARGET_OUT_HEADER)/librilutils LOCAL_C_INCLUDES += external/nanopb-c diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 8df3e51..beae829 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -789,7 +789,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { int32_t sizeOfDial; int32_t t; int32_t uusPresent; -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) +#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) || defined(MODEM_TYPE_SS333) char *csv; #endif status_t status; @@ -806,7 +806,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { goto invalid; } -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) +#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) || defined(MODEM_TYPE_SS333) /* CallDetails.call_type */ status = p.readInt32(&t); if (status != NO_ERROR) { @@ -836,7 +836,8 @@ dispatchDial (Parcel &p, RequestInfo *pRI) { } if (uusPresent == 0) { -#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) +#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) \ + || defined(MODEM_TYPE_M7450) || defined(MODEM_TYPE_SS333) dial.uusInfo = NULL; #elif defined(MODEM_TYPE_XMM6260) /* Samsung hack */ @@ -2386,8 +2387,10 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) { p.writeInt32(p_cur->als); p.writeInt32(p_cur->isVoice); -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) +#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) || defined(MODEM_TYPE_SS333) +#ifndef MODEM_TYPE_SS333 p.writeInt32(p_cur->isVideo); +#endif /* Pass CallDetails */ p.writeInt32(0); @@ -2423,7 +2426,7 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) { p_cur->als, (p_cur->isVoice)?"voc":"nonvoc", (p_cur->isVoicePrivacy)?"evp":"noevp"); -#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) +#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) || defined(MODEM_TYPE_SS333) appendPrintBuf("%s,%s,", printBuf, (p_cur->isVideo) ? "vid" : "novid"); @@ -3026,7 +3029,8 @@ static int responseRilSignalStrength(Parcel &p, p.writeInt32(p_cur->GW_SignalStrength.bitErrorRate); -#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) +#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) \ + || defined(MODEM_TYPE_M7450) || defined(MODEM_TYPE_SS333) cdmaDbm = p_cur->CDMA_SignalStrength.dbm & 0xFF; if (cdmaDbm < 0) { cdmaDbm = 99; @@ -3039,7 +3043,8 @@ static int responseRilSignalStrength(Parcel &p, p.writeInt32(cdmaDbm); p.writeInt32(p_cur->CDMA_SignalStrength.ecio); -#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450) +#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) \ + || defined(MODEM_TYPE_M7450) || defined(MODEM_TYPE_SS333) evdoDbm = p_cur->EVDO_SignalStrength.dbm & 0xFF; if (evdoDbm < 0) { evdoDbm = 99;