libril: Add support for ST-Ericsson Thor M7450 modems

The M7450 modem used in the Galaxy Note 4 (N910C variant) uses a libril
implementation similar to the one employed for Intel XMM* modems by Samsung.

This probably needs future adjustments, but so far fixes basic call functions
and signal strength is displayed correctly.

Change-Id: I2d070102ad11746902527da3c2c7f49485c7d7f1
tirimbino
Christopher N. Hesse 10 years ago
parent a8d0950e22
commit 7bf409edb0
  1. 2
      ril/Android.mk
  2. 3
      ril/libril/Android.mk
  3. 14
      ril/libril/ril.cpp

@ -20,7 +20,7 @@ ifeq ($(BOARD_VENDOR),samsung)
# libril
ifeq ($(BOARD_PROVIDES_LIBRIL),true)
ifneq ($(filter xmm6260 xmm6262 xmm6360 xmm7260,$(BOARD_MODEM_TYPE)),)
ifneq ($(filter xmm6260 xmm6262 xmm6360 xmm7260 m7450,$(BOARD_MODEM_TYPE)),)
include $(RIL_PATH)/libril/Android.mk
endif
endif

@ -26,6 +26,9 @@ endif
ifeq ($(BOARD_MODEM_TYPE),xmm7260)
LOCAL_CFLAGS := -DMODEM_TYPE_XMM7260
endif
ifeq ($(BOARD_MODEM_TYPE),m7450)
LOCAL_CFLAGS := -DMODEM_TYPE_M7450
endif
LOCAL_MODULE:= libril

@ -791,7 +791,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) {
int32_t sizeOfDial;
int32_t t;
int32_t uusPresent;
#ifdef MODEM_TYPE_XMM7260
#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450)
char *csv;
#endif
status_t status;
@ -807,7 +807,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) {
goto invalid;
}
#ifdef MODEM_TYPE_XMM7260
#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450)
/* CallDetails.call_type */
status = p.readInt32(&t);
if (status != NO_ERROR) {
@ -837,7 +837,7 @@ dispatchDial (Parcel &p, RequestInfo *pRI) {
}
if (uusPresent == 0) {
#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260)
#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450)
dial.uusInfo = NULL;
#elif defined(MODEM_TYPE_XMM6260)
/* Samsung hack */
@ -2368,7 +2368,7 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
p.writeInt32(p_cur->als);
p.writeInt32(p_cur->isVoice);
#ifdef MODEM_TYPE_XMM7260
#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450)
p.writeInt32(p_cur->isVideo);
/* Pass CallDetails */
@ -2405,7 +2405,7 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
p_cur->als,
(p_cur->isVoice)?"voc":"nonvoc",
(p_cur->isVoicePrivacy)?"evp":"noevp");
#ifdef MODEM_TYPE_XMM7260
#if defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450)
appendPrintBuf("%s,%s,",
printBuf,
(p_cur->isVideo) ? "vid" : "novid");
@ -3008,7 +3008,7 @@ static int responseRilSignalStrength(Parcel &p,
p.writeInt32(p_cur->GW_SignalStrength.bitErrorRate);
#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260)
#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450)
cdmaDbm = p_cur->CDMA_SignalStrength.dbm & 0xFF;
if (cdmaDbm < 0) {
cdmaDbm = 99;
@ -3021,7 +3021,7 @@ static int responseRilSignalStrength(Parcel &p,
p.writeInt32(cdmaDbm);
p.writeInt32(p_cur->CDMA_SignalStrength.ecio);
#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260)
#if defined(MODEM_TYPE_XMM6262) || defined(MODEM_TYPE_XMM7260) || defined(MODEM_TYPE_M7450)
evdoDbm = p_cur->EVDO_SignalStrength.dbm & 0xFF;
if (evdoDbm < 0) {
evdoDbm = 99;

Loading…
Cancel
Save