[Dev] [CM10] Fixing in call audio bug for CM10

Search This thread

marsgod

Senior Member
Mar 1, 2005
74
453
The call issue of CM10 ROMs is present for some people. There will be a trouble when making a call each other could not hear voice or the other side would only hear big noise.
If you reboot the phone once a day (e.g. at the morning) it usually won't occur during the whole day, sometimes it will not fix the problem by reboot.

I checked the offical V30C and V28G radio logcat , and found it is differnet to the CM10 radio logcat.

you can verify this by
Code:
 adb logcat -b radio

when making a call.

The offical V28G logcat radio is something like this:
Code:
D/GSM     (  351): [getVoiceMailNumber] isNetworkRoaming: false
D/PHONE   (  351): VM: PhoneSubInfo.getVoiceMailNUmber: 
D/GSM     (  351): isTwoDigitShortCode
D/GSM     (  351): dialing w/ mmi 'null'...
D/GSM     (  351): [GSMConn] acquireWakeLock
D/RILJ    (  351): [0162]> DIAL
D/RILC    (   88): [0162]> DIAL (num=88888888,clir=0)
D/RILC    (   88): [0162]< DIAL
D/RILJ    (  351): [0162]< DIAL 
D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,2}
D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
D/RILJ    (  351): [0163]> LGE_SET_CPATH 3
D/RILC    (   88): [0163]> RIL_REQUEST_LGE_SET_CPATH (3)
D/RILJ    (  351): [0164]> LGE_SET_CPATH 1
D/RILC    (   88): [0164]> RIL_REQUEST_LGE_SET_CPATH (1)
D/RILC    (   88): [0163]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0163]< LGE_SET_CPATH 
D/RILC    (   88): [0164]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0164]< LGE_SET_CPATH 
D/RILJ    (  351): [0165]> GET_CURRENT_CALLS
D/RILC    (   88): [0165]> GET_CURRENT_CALLS 
D/RILC    (   88): [0166]> GET_CURRENT_CALLS 
D/RILC    (   88): [0165]< GET_CURRENT_CALLS {[id=1,DIALING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
D/RILJ    (  351): [0165]< GET_CURRENT_CALLS  [id=1,DIALING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
D/RILC    (   88): [0166]< GET_CURRENT_CALLS {[id=1,DIALING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
D/RILJ    (  351): [0166]< GET_CURRENT_CALLS  [id=1,DIALING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
D/RILJ    (  351): [0167]> LGE_SET_CPATH 8
D/RILC    (   88): [0167]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILJ    (  351): [0168]> LGE_SET_CPATH 8
D/RILC    (   88): [0168]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILC    (   88): [0167]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0167]< LGE_SET_CPATH 
D/RILJ    (  351): [0168]< LGE_SET_CPATH 
D/RILJ    (  351): [0169]> LGE_SET_CPATH 8
D/RILC    (   88): [0169]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILC    (   88): [0169]< RIL_REQUEST_LGE_SET_CPATH
D/RILC    (   88): [0170]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILC    (   88): [0170]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0170]< LGE_SET_CPATH 
D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,3}
D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,3}
D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
D/RILJ    (  351): [0171]> GET_CURRENT_CALLS
D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
D/RILC    (   88): [0171]> GET_CURRENT_CALLS 
D/RILJ    (  351): [0172]> GET_CURRENT_CALLS
D/RILC    (   88): [0172]> GET_CURRENT_CALLS 
D/RILC    (   88): [0171]< GET_CURRENT_CALLS {[id=1,ALERTING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
D/RILJ    (  351): [0171]< GET_CURRENT_CALLS  [id=1,ALERTING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
D/RILC    (   88): [0172]< GET_CURRENT_CALLS {[id=1,ALERTING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
D/RILJ    (  351): [0172]< GET_CURRENT_CALLS  [id=1,ALERTING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
D/RILJ    (  351): [0173]> LGE_SET_CPATH 8
D/RILC    (   88): [0173]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILC    (   88): [0173]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0173]< LGE_SET_CPATH 
D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,7}
D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,0}
D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_COLP {88888888,type=129,subaddr=,satype=-1, alpha=}
D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
D/RILJ    (  351): [UNSL]< LGE_COLP COLP { number: 88888888, type: 129, subaddr:, satype: -1, alpha:  }
D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
D/RILJ    (  351): [0174]> GET_CURRENT_CALLS
D/RILC    (   88): [0174]> GET_CURRENT_CALLS 
D/RILC    (   88): [0174]< GET_CURRENT_CALLS {[id=1,ACTIVE,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
D/RILJ    (  351): [0175]> LGE_SET_CPATH 8
D/RILJ    (  351): [0174]< GET_CURRENT_CALLS  [id=1,ACTIVE,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
D/RILC    (   88): [0175]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILC    (   88): [0175]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0175]< LGE_SET_CPATH 
D/RILJ    (  351): [0176]> LGE_SET_CPATH 8
D/RILC    (   88): [0176]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILC    (   88): [0176]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0176]< LGE_SET_CPATH 
D/RILC    (   88): [UNSL]< UNSOL_SIGNAL_STRENGTH {[signalStrength=18,bitErrorRate=-1,                CDMA_SS.dbm=-1,CDMA_SSecio=-1,                EVDO_SS.dbm=-1,EVDO_SS.ecio=-1,                EVDO_SS.signalNoiseRatio=-1,                LTE_SS.signalStrength=-1,LTE_SS.rsrp=-1,LTE_SS.rsrq=-1,                LTE_SS.rssnr=-1,LTE_SS.cqi=-1]}
D/RILJ    (  351): [0177]> LGE_HANG_UP_CALL
D/RILC    (   88): [0177]> RIL_REQUEST_LGE_HANG_UP_CALL 
D/RILC    (   88): [0177]< RIL_REQUEST_LGE_HANG_UP_CALL
D/RILJ    (  351): [0177]< LGE_HANG_UP_CALL 
D/RILJ    (  351): [0178]> GET_CURRENT_CALLS
D/RILC    (   88): [0178]> GET_CURRENT_CALLS 
D/RILC    (   88): [0178]< GET_CURRENT_CALLS {[id=1,ACTIVE,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
D/RILJ    (  351): [0178]< GET_CURRENT_CALLS  [id=1,ACTIVE,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
D/RILJ    (  351): [0179]> LGE_SET_CPATH 8
D/RILC    (   88): [0179]> RIL_REQUEST_LGE_SET_CPATH (8)
D/RILC    (   88): [0179]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0179]< LGE_SET_CPATH 
D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,6}
D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
D/RILJ    (  351): [0180]> GET_CURRENT_CALLS
D/RILC    (   88): [0180]> GET_CURRENT_CALLS 
D/RILJ    (  351): [0181]> GET_CURRENT_CALLS
D/RILC    (   88): [0181]> GET_CURRENT_CALLS 
D/RILC    (   88): [0180]< GET_CURRENT_CALLS }
D/RILJ    (  351): [0180]< GET_CURRENT_CALLS  
D/RILC    (   88): [0181]< GET_CURRENT_CALLS }
D/RILJ    (  351): [0181]< GET_CURRENT_CALLS  
D/RILJ    (  351): [0182]> LGE_SET_CPATH 0
D/RILC    (   88): [0182]> RIL_REQUEST_LGE_SET_CPATH (0)
D/RILC    (   88): [0182]< RIL_REQUEST_LGE_SET_CPATH
D/RILJ    (  351): [0182]< LGE_SET_CPATH 
D/RILC    (   88): [UNSL]< UNSOL_SIGNAL_STRENGTH {[signalStrength=19,bitErrorRate=-1,                CDMA_SS.dbm=-1,CDMA_SSecio=-1,                EVDO_SS.dbm=-1,EVDO_SS.ecio=-1,                EVDO_SS.signalNoiseRatio=-1,                LTE_SS.signalStrength=-1,LTE_SS.rsrp=-1,LTE_SS.rsrq=-1,                LTE_SS.rssnr=-1,LTE_SS.cqi=-1]}

As you can see,
1. when the call start, the ril send
LGE_SET_CPATH 3
LGE_SET_CPATH 1 (if you make the call via headset, it will be LGE_SET_CPATH 2)
2. during the call session, the ril send
LGE_SET_CPATH 8
3. after ending the call , the ril send
LGE_SET_CPATH 0

so, I make a fix for the LGEInfineon.java(thank rmcc provide the original code, if I didn't remenber wrong...), try to simulate this command sequence in it(not very accu, but I think it will be OK).
you can put this file in your source tree “device/lge/star-common/ril/telephony/java/com/android/internal/telephony”, then rebuild the CM10 source.
Hope this can fix the CM10 call bug.

PS: lipisak built a CM10 here: http://xdaforums.com/showpost.php?p=34672614&postcount=47
[WARNING]: I am not sure whether this fix will fix the audio bug or not, so it is a DEV test....


2012/11/27:
Another found : In V30C lge-ril.so, it used /dev/block/mmcblk0p5 as a datastorge for write_nvidia function, which will write IMEI, SWV, SWOV, INFO in it. But as CM partitions definition, /dev/block/mmcblk0p5 is used as boot.img....... I am not sure it will cause problem or not. But a dirty fix of lge-ril.so, which will use a hexeditor modified the binary code, would workaround this.
If in your logcat -b radio found these: write IMEI ok, write IMEI ng. write SWV ok, write SWV ng, write SWOV ok, write SWOV ng, write INFO ok, write INFO ng. then your boot.img would be corrupted.[Thank wkpark pointed out that In V30C, /dev/block/mmcblk0p5 is /misc not /data/ve, /dev/block/mmcblk0p10 is the /data/ve in V30C]

2012/11/29:
Fix MSC partition problem[PLEASE NOTE: THIS ASSUME YOU USE THE OLD GB BOOTLOADER & PARTITION, not OFFICIAL BOOTLOADER & PARTITION]
1. use the attached liblgeril.so, this is a quick fix in binary : mmcblk0p5=>mmcblk0p3
2. modified your kernel source code arch/arm/mach-tegra/lge/star/include/lge/board-star-nv.h
Code:
#ifdef CONFIG_CM_BOOTLOADER_COMPAT
#define LGE_NVDATA_PARTITION                    "/dev/block/mmcblk0p3"
#else
#define LGE_NVDATA_PARTITION                    "/dev/block/mmcblk0p5"
#endif
then recompile your kernel.
3. fix init.rc. modify the rild group id:
Code:
group radio cache inet misc audio sdcard_rw log system media_rw
4. fix uevent.tegra.rc, add a line at bottom:
Code:
/dev/block/mmcblk0p3      0660   system     radio

2012/12/04:
Found a temp fix for this, when you encounter the call bug, just reboot into recovery, do nothing, reboot. This will fix the phone for a while..

2012/12/07:
By compare linux 3.6.9 kernel source to V30C kernel source code, I found that the V30C kernel source wm8994.c has some bugs in it. There are a copy/paste bug and many "switch" "case" "break" mismatch bugs. I made a patch file to fix this. Goto your kernel source sound/soc/codes, input patch wm8994.c < wm8994.diff

2012/12/25:
Another fix for audio problem:
During the wm8994 suspend/resume , it use a unsafe version of read/write registers. I just modify the code , use a mutex lock protect version of register read/write.
Hope this can make some help.

https://github.com/marsgod/lge-kernel-star/commit/02fab112d1dc63387b4474fbcf99e7bb9d617236

I guess when an incoming call trigger, the wm8994 resume, it will take a long time 'restore' the wm8994 registers(because it use the I2C interface), if this process were interrupted by another read/write wm8994 attemp, it will cause problem.

2012/12/29:
Based on above patch, I built two kernel for P990 & SU660, as the attached files. Please have a try.
Just use CWM flash these zip files. The zip file will only update your kernel & modules, there is NO need make a factory reset or clean your cache/data.

EDIT: for P990 kernel , please check http://xdaforums.com/showpost.php?p=36032539&postcount=661
 

Attachments

  • LGEInfineon.rar
    3.9 KB · Views: 821
  • liblgeril.rar
    110.2 KB · Views: 310
  • wm8994.diff
    1.4 KB · Views: 139
  • newkernel_SU660.zip
    4.8 MB · Views: 215
Last edited:

wwewwf996

Member
May 12, 2011
39
13
If this will work, you're my 'effin hero!

EDIT: Can somebody tell me where do I need to put the files more exactly? I searched for the location mentioned in the first post but couldn't find it...
 
Last edited:
  • Like
Reactions: mat369

anjo88

Senior Member
Nov 26, 2010
945
85
Seixal
this is was I'm talking about let´s see how it is a will five u my thanks just for u tried!

---------- Post added at 04:48 PM ---------- Previous post was at 04:32 PM ----------

If this will work, you're my 'effin hero!

EDIT: Can somebody tell me where do I need to put the files more exactly? I searched for the location mentioned in the first post but couldn't find it...

same question here to put the file?
 
Last edited:

wfd

Senior Member
Mar 22, 2011
341
708
Togliatti
this is was I'm talking about let´s see how it is a will five u my thanks just for u tried!

---------- Post added at 04:48 PM ---------- Previous post was at 04:32 PM ----------



same question here to put the file?

No where. Its source code, need to be built with cm10 stuff.

Marsgod, why don't you write some notes into official repo for arcee?

Sent from my LG-P990 using xda app-developers app
 
  • Like
Reactions: michalis1961

May-C

Senior Member
May 20, 2011
97
61
St. Gallen
this is was I'm talking about let´s see how it is a will five u my thanks just for u tried!

---------- Post added at 04:48 PM ---------- Previous post was at 04:32 PM ----------



same question here to put the file?

As you can see the thread has a [DEV] in the title. Did ever cross your mind that if you don't know what to do with this file you are not addressed? :confused:
 
Last edited:

hyyuga

Senior Member
Apr 11, 2011
218
45
Hm the problem will be trying to reproduce the in call bug.. but thanks in advance nevertheless:p

Sent from my LG-P990 using Tapatalk
 

anjo88

Senior Member
Nov 26, 2010
945
85
Seixal
Building right now with the new LGEInfineon.java. Will test as soon as it's done :)

Thanks for this one !
Can u share it when it´s build?

---------- Post added at 05:46 PM ---------- Previous post was at 05:45 PM ----------

As you can see the thread has a [DEV] in the title. Did ever cross your mind that if you don't know what to do with this file you are not addressed? :confused:

U said? if i have umbunto a rebuild at my own!
 

May-C

Senior Member
May 20, 2011
97
61
St. Gallen
In the first post it is mentioned that the sources came from RC. But if I compare the "fixed" LGEInfineon.java with the ones I find in Github it doesn't seem to be based on one of them.

Is it based on a uncommited Source or something like that?
 

ergoen

Senior Member
Jan 29, 2011
201
307
Göteborg
In the first post it is mentioned that the sources came from RC. But if I compare the "fixed" LGEInfineon.java with the ones I find in Github it doesn't seem to be based on one of them.

Is it based on a uncommited Source or something like that?

It seems to be based on this:
https://github.com/CyanogenMod/andr...m/android/internal/telephony/LGEInfineon.java

this is off topic, but ricardo cequeira just uploaded a new screenshot on google plus :) android version 4.2 https://plus.google.com/photos/115049428938715274412/albums/5815099440000881585/5815099446397047970

Why post it here if you know that is is off topic? :confused:
 

wfd

Senior Member
Mar 22, 2011
341
708
Togliatti
In the first post it is mentioned that the sources came from RC. But if I compare the "fixed" LGEInfineon.java with the ones I find in Github it doesn't seem to be based on one of them.

Is it based on a uncommited Source or something like that?

Yeah man, according to diff it looks not like "fixed", it more looks like "complete rewrited"

Code:
33a34,36
> /* Headset detect stuffs */
> import android.media.AudioManager;
> 
50a54,55
> 
> 					audioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
81c86,91
<     static final int RIL_UNSOL_LGE_SIM_STATE_CHANGED_NEW = 1061;
---
>     static final int RIL_UNSOL_LGE_1X_REG_DONE = 1061;
>     static final int RIL_UNSOL_LGE_XCALLSTAT = 1052;
>     static final int RIL_UNSOL_LGE_COLP = 1036;
>     static final int RIL_UNSOL_LGE_FACTORY_READY = 1080;
>     
>     static final int RIL_REQUEST_LGE_SET_CPATH=252;
92c102,104
<             case 1080: ret =  responseVoid(p); break; // RIL_UNSOL_LGE_FACTORY_READY
---
>             case RIL_UNSOL_LGE_COLP: ret =  responseVoid(p); break;
>             case RIL_UNSOL_LGE_XCALLSTAT: ret =  responseInts(p); break;
>             case RIL_UNSOL_LGE_FACTORY_READY: ret =  responseVoid(p); break; 
94c106
<             case RIL_UNSOL_LGE_SIM_STATE_CHANGED_NEW: ret =  responseVoid(p); break;
---
>             case RIL_UNSOL_LGE_1X_REG_DONE: ret =  responseVoid(p); break;
128c140,155
<             case 1080: // RIL_UNSOL_LGE_FACTORY_READY (NG)
---
>             case RIL_UNSOL_LGE_XCALLSTAT:
>                 if (RILJ_LOGD) unsljLogRet(response, ret);
>                 
>                 // +XCALLSTAT: 1,2 => LGE_SET_CPATH 3, then send LGE_SET_CPATH 1
>                 SetupCallCPATH(ret);
>                 // GET_CURRENT_CALLS  [id=1,DIALING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] => LGE_SET_CPATH 8
>                 // GET_CURRENT_CALLS  [id=1,ALERTING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] => LGE_SET_CPATH 8
>                 // GET_CURRENT_CALLS  [id=1,ACTIVE,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] => LGE_SET_CPATH 8
>                 // GET_CURRENT_CALLS } => LGE_SET_CPATH 0
>                 // +XCALLSTAT: 1,2 => LGE_SET_CPATH 3, then send LGE_SET_CPATH 1
> 
>                 mCallStateRegistrants
>                     .notifyRegistrants(new AsyncResult(null, null, null));
>             break;
> 
>             case RIL_UNSOL_LGE_FACTORY_READY: // RIL_UNSOL_LGE_FACTORY_READY (NG)
130c157
<                 RIL_REQUEST_HANG_UP_CALL = 206;
---
> //                RIL_REQUEST_HANG_UP_CALL = 206;
133c160
<             case RIL_UNSOL_LGE_SIM_STATE_CHANGED_NEW:
---
>             case RIL_UNSOL_LGE_1X_REG_DONE:
171a199,255
>     @Override
>     protected void
>     processSolicited (Parcel p) {
>         int serial, error;
>         int dataPosition = p.dataPosition(); // save off position within the Parcel
> 
>         serial = p.readInt();
>         error = p.readInt();
> 
>         RILRequest rr;
> 
>         rr = findAndRemoveRequestFromList(serial);
> 
>         if (rr == null) {
>             riljLog("Unexpected solicited response! sn: " + serial + " error: " + error);
>             return;
>         }
> 
>         Object ret = null;
> 
>         if (error == 0 || p.dataAvail() > 0) {
>             // either command succeeds or command fails but with data payload
>             switch (rr.mRequest) {
>             case RIL_REQUEST_LGE_SET_CPATH: ret =  responseVoid(p); break;
>             default:
>             
>             		// recovery the removed request
>                 synchronized (super.mRequestsList) {
>                   super.mRequestsList.add(rr);
>                   super.mRequestMessagesWaiting++;
>                 }
>                 // Rewind the Parcel
>                 p.setDataPosition(dataPosition);
> 
>                 // Forward responses that we are not overriding to the super class
>                 super.processSolicited(p);
>                 return;
>             } 
>         }
> 
>         if (error != 0) {
>             rr.onError(error, ret);
>             rr.release();
>             return;
>         }
> 
>         if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest)
>             + " " + retToString(rr.mRequest, ret));
> 
>         if (rr.mResult != null) {
>             AsyncResult.forMessage(rr.mResult, ret, null);
>             rr.mResult.sendToTarget();
>         }
> 
>         rr.release();
>     }
> 
219a304,395
> 		private AudioManager audioManager;
> 
>     private void
>     SetupCallCPATH(Object ret) {
>         int CPATH=0;
>         int CallState = ((int[])ret)[1];
>         
>         if (RILJ_LOGD) riljLog(" CALLSTATE=[ " + CallState + "]");
>         if(CallState == 2) {
> 					// +XCALLSTAT: 1,2 => LGE_SET_CPATH 3, then send LGE_SET_CPATH 1
> 					CPATH=3;
>         	RILRequest rr = RILRequest.obtain(RIL_REQUEST_LGE_SET_CPATH,null);
> 
>         	if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + CPATH);
> 
>         	rr.mp.writeInt(1);
>         	rr.mp.writeInt(CPATH);
>         	send(rr);
> 
> 					// normal call: CPATH=1
> 					// Headset call: CPATH=2
> 					// BT call: isBluetoothA2dpOn()??
> 					if (audioManager.isWiredHeadsetOn()==false && audioManager.isBluetoothA2dpOn()==false)
> 						CPATH=1;
> 					else
> 						CPATH=2;
>         	RILRequest rr2 = RILRequest.obtain(RIL_REQUEST_LGE_SET_CPATH,null);
> 
>         	if (RILJ_LOGD) riljLog(rr2.serialString() + "> " + requestToString(rr2.mRequest) + " " + CPATH);
> 
>         	rr2.mp.writeInt(1);
>         	rr2.mp.writeInt(CPATH);
>         	send(rr2);
> 				} 
>     }
> 
>     @Override
>     protected Object
>     responseCallList(Parcel p) {
>         int num;
>         int CPATH=0;
>         int dataPosition = p.dataPosition(); // save off position within the Parcel
> 
>         num = p.readInt();
>         
>         if (num==0)
>         {
>         	// LGE_SET_CPATH 0
>         	CPATH=0;
>         }
>         else
>         if (num>0)
>         {
>         	// LGE_SET_CPATH 8
>         	CPATH=8;
>         }
>         RILRequest rr = RILRequest.obtain(RIL_REQUEST_LGE_SET_CPATH,null);
> 
>         if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " " + CPATH);
> 
>         rr.mp.writeInt(1);
>         rr.mp.writeInt(CPATH);
>         send(rr);
>         
>         // Rewind the Parcel
>         p.setDataPosition(dataPosition);
>         
>         // Forward responses that we are not overriding to the super class
>         return super.responseCallList(p);
>     }
> 
>     static String
>     requestToString(int request) {
>         switch(request) {
>             case RIL_REQUEST_LGE_SET_CPATH: return "LGE_SET_CPATH";
>             default: return RIL.requestToString(request);
>         }
>     }
> 
>     static String
>     responseToString(int request)
>     {
>         switch(request) {
>             case RIL_UNSOL_LGE_COLP: return "LGE_COLP";
>             case RIL_UNSOL_LGE_XCALLSTAT: return "LGE_XCALLSTAT";
>             case RIL_UNSOL_LGE_FACTORY_READY: return "LGE_FACTORY_READY";
>             case RIL_UNSOL_LGE_SIM_STATE_CHANGED: return "LGE_SIM_STATE_CHANGED";
>             case RIL_UNSOL_LGE_1X_REG_DONE:  return "LGE_1X_REG_DONE";
>             default: return RIL.responseToString(request);
>         }
>     }
>
 

Top Liked Posts

  • There are no posts matching your filters.
  • 99
    The call issue of CM10 ROMs is present for some people. There will be a trouble when making a call each other could not hear voice or the other side would only hear big noise.
    If you reboot the phone once a day (e.g. at the morning) it usually won't occur during the whole day, sometimes it will not fix the problem by reboot.

    I checked the offical V30C and V28G radio logcat , and found it is differnet to the CM10 radio logcat.

    you can verify this by
    Code:
     adb logcat -b radio

    when making a call.

    The offical V28G logcat radio is something like this:
    Code:
    D/GSM     (  351): [getVoiceMailNumber] isNetworkRoaming: false
    D/PHONE   (  351): VM: PhoneSubInfo.getVoiceMailNUmber: 
    D/GSM     (  351): isTwoDigitShortCode
    D/GSM     (  351): dialing w/ mmi 'null'...
    D/GSM     (  351): [GSMConn] acquireWakeLock
    D/RILJ    (  351): [0162]> DIAL
    D/RILC    (   88): [0162]> DIAL (num=88888888,clir=0)
    D/RILC    (   88): [0162]< DIAL
    D/RILJ    (  351): [0162]< DIAL 
    D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,2}
    D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
    D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
    D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
    D/RILJ    (  351): [0163]> LGE_SET_CPATH 3
    D/RILC    (   88): [0163]> RIL_REQUEST_LGE_SET_CPATH (3)
    D/RILJ    (  351): [0164]> LGE_SET_CPATH 1
    D/RILC    (   88): [0164]> RIL_REQUEST_LGE_SET_CPATH (1)
    D/RILC    (   88): [0163]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0163]< LGE_SET_CPATH 
    D/RILC    (   88): [0164]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0164]< LGE_SET_CPATH 
    D/RILJ    (  351): [0165]> GET_CURRENT_CALLS
    D/RILC    (   88): [0165]> GET_CURRENT_CALLS 
    D/RILC    (   88): [0166]> GET_CURRENT_CALLS 
    D/RILC    (   88): [0165]< GET_CURRENT_CALLS {[id=1,DIALING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
    D/RILJ    (  351): [0165]< GET_CURRENT_CALLS  [id=1,DIALING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
    D/RILC    (   88): [0166]< GET_CURRENT_CALLS {[id=1,DIALING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
    D/RILJ    (  351): [0166]< GET_CURRENT_CALLS  [id=1,DIALING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
    D/RILJ    (  351): [0167]> LGE_SET_CPATH 8
    D/RILC    (   88): [0167]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILJ    (  351): [0168]> LGE_SET_CPATH 8
    D/RILC    (   88): [0168]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILC    (   88): [0167]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0167]< LGE_SET_CPATH 
    D/RILJ    (  351): [0168]< LGE_SET_CPATH 
    D/RILJ    (  351): [0169]> LGE_SET_CPATH 8
    D/RILC    (   88): [0169]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILC    (   88): [0169]< RIL_REQUEST_LGE_SET_CPATH
    D/RILC    (   88): [0170]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILC    (   88): [0170]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0170]< LGE_SET_CPATH 
    D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,3}
    D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
    D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
    D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
    D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,3}
    D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
    D/RILJ    (  351): [0171]> GET_CURRENT_CALLS
    D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
    D/RILC    (   88): [0171]> GET_CURRENT_CALLS 
    D/RILJ    (  351): [0172]> GET_CURRENT_CALLS
    D/RILC    (   88): [0172]> GET_CURRENT_CALLS 
    D/RILC    (   88): [0171]< GET_CURRENT_CALLS {[id=1,ALERTING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
    D/RILJ    (  351): [0171]< GET_CURRENT_CALLS  [id=1,ALERTING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
    D/RILC    (   88): [0172]< GET_CURRENT_CALLS {[id=1,ALERTING,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
    D/RILJ    (  351): [0172]< GET_CURRENT_CALLS  [id=1,ALERTING,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
    D/RILJ    (  351): [0173]> LGE_SET_CPATH 8
    D/RILC    (   88): [0173]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILC    (   88): [0173]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0173]< LGE_SET_CPATH 
    D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,7}
    D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
    D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,0}
    D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_COLP {88888888,type=129,subaddr=,satype=-1, alpha=}
    D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
    D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
    D/RILJ    (  351): [UNSL]< LGE_COLP COLP { number: 88888888, type: 129, subaddr:, satype: -1, alpha:  }
    D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
    D/RILJ    (  351): [0174]> GET_CURRENT_CALLS
    D/RILC    (   88): [0174]> GET_CURRENT_CALLS 
    D/RILC    (   88): [0174]< GET_CURRENT_CALLS {[id=1,ACTIVE,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
    D/RILJ    (  351): [0175]> LGE_SET_CPATH 8
    D/RILJ    (  351): [0174]< GET_CURRENT_CALLS  [id=1,ACTIVE,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
    D/RILC    (   88): [0175]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILC    (   88): [0175]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0175]< LGE_SET_CPATH 
    D/RILJ    (  351): [0176]> LGE_SET_CPATH 8
    D/RILC    (   88): [0176]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILC    (   88): [0176]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0176]< LGE_SET_CPATH 
    D/RILC    (   88): [UNSL]< UNSOL_SIGNAL_STRENGTH {[signalStrength=18,bitErrorRate=-1,                CDMA_SS.dbm=-1,CDMA_SSecio=-1,                EVDO_SS.dbm=-1,EVDO_SS.ecio=-1,                EVDO_SS.signalNoiseRatio=-1,                LTE_SS.signalStrength=-1,LTE_SS.rsrp=-1,LTE_SS.rsrq=-1,                LTE_SS.rssnr=-1,LTE_SS.cqi=-1]}
    D/RILJ    (  351): [0177]> LGE_HANG_UP_CALL
    D/RILC    (   88): [0177]> RIL_REQUEST_LGE_HANG_UP_CALL 
    D/RILC    (   88): [0177]< RIL_REQUEST_LGE_HANG_UP_CALL
    D/RILJ    (  351): [0177]< LGE_HANG_UP_CALL 
    D/RILJ    (  351): [0178]> GET_CURRENT_CALLS
    D/RILC    (   88): [0178]> GET_CURRENT_CALLS 
    D/RILC    (   88): [0178]< GET_CURRENT_CALLS {[id=1,ACTIVE,toa=129,norm,mo,als=0,voc,noevp,88888888,cli=0,name='(null)',0}
    D/RILJ    (  351): [0178]< GET_CURRENT_CALLS  [id=1,ACTIVE,toa=129,norm,mo,0,voc,noevp,,cli=1,,0] 
    D/RILJ    (  351): [0179]> LGE_SET_CPATH 8
    D/RILC    (   88): [0179]> RIL_REQUEST_LGE_SET_CPATH (8)
    D/RILC    (   88): [0179]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0179]< LGE_SET_CPATH 
    D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
    D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
    D/RILC    (   88): [UNSL]< RIL_UNSOL_LGE_XCALLSTAT {1,6}
    D/RILC    (   88): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED 
    D/RILJ    (  351): [UNSL]< LGE_XCALLSTAT
    D/RILJ    (  351): [UNSL]< UNSOL_RESPONSE_CALL_STATE_CHANGED
    D/RILJ    (  351): [0180]> GET_CURRENT_CALLS
    D/RILC    (   88): [0180]> GET_CURRENT_CALLS 
    D/RILJ    (  351): [0181]> GET_CURRENT_CALLS
    D/RILC    (   88): [0181]> GET_CURRENT_CALLS 
    D/RILC    (   88): [0180]< GET_CURRENT_CALLS }
    D/RILJ    (  351): [0180]< GET_CURRENT_CALLS  
    D/RILC    (   88): [0181]< GET_CURRENT_CALLS }
    D/RILJ    (  351): [0181]< GET_CURRENT_CALLS  
    D/RILJ    (  351): [0182]> LGE_SET_CPATH 0
    D/RILC    (   88): [0182]> RIL_REQUEST_LGE_SET_CPATH (0)
    D/RILC    (   88): [0182]< RIL_REQUEST_LGE_SET_CPATH
    D/RILJ    (  351): [0182]< LGE_SET_CPATH 
    D/RILC    (   88): [UNSL]< UNSOL_SIGNAL_STRENGTH {[signalStrength=19,bitErrorRate=-1,                CDMA_SS.dbm=-1,CDMA_SSecio=-1,                EVDO_SS.dbm=-1,EVDO_SS.ecio=-1,                EVDO_SS.signalNoiseRatio=-1,                LTE_SS.signalStrength=-1,LTE_SS.rsrp=-1,LTE_SS.rsrq=-1,                LTE_SS.rssnr=-1,LTE_SS.cqi=-1]}

    As you can see,
    1. when the call start, the ril send
    LGE_SET_CPATH 3
    LGE_SET_CPATH 1 (if you make the call via headset, it will be LGE_SET_CPATH 2)
    2. during the call session, the ril send
    LGE_SET_CPATH 8
    3. after ending the call , the ril send
    LGE_SET_CPATH 0

    so, I make a fix for the LGEInfineon.java(thank rmcc provide the original code, if I didn't remenber wrong...), try to simulate this command sequence in it(not very accu, but I think it will be OK).
    you can put this file in your source tree “device/lge/star-common/ril/telephony/java/com/android/internal/telephony”, then rebuild the CM10 source.
    Hope this can fix the CM10 call bug.

    PS: lipisak built a CM10 here: http://xdaforums.com/showpost.php?p=34672614&postcount=47
    [WARNING]: I am not sure whether this fix will fix the audio bug or not, so it is a DEV test....


    2012/11/27:
    Another found : In V30C lge-ril.so, it used /dev/block/mmcblk0p5 as a datastorge for write_nvidia function, which will write IMEI, SWV, SWOV, INFO in it. But as CM partitions definition, /dev/block/mmcblk0p5 is used as boot.img....... I am not sure it will cause problem or not. But a dirty fix of lge-ril.so, which will use a hexeditor modified the binary code, would workaround this.
    If in your logcat -b radio found these: write IMEI ok, write IMEI ng. write SWV ok, write SWV ng, write SWOV ok, write SWOV ng, write INFO ok, write INFO ng. then your boot.img would be corrupted.[Thank wkpark pointed out that In V30C, /dev/block/mmcblk0p5 is /misc not /data/ve, /dev/block/mmcblk0p10 is the /data/ve in V30C]

    2012/11/29:
    Fix MSC partition problem[PLEASE NOTE: THIS ASSUME YOU USE THE OLD GB BOOTLOADER & PARTITION, not OFFICIAL BOOTLOADER & PARTITION]
    1. use the attached liblgeril.so, this is a quick fix in binary : mmcblk0p5=>mmcblk0p3
    2. modified your kernel source code arch/arm/mach-tegra/lge/star/include/lge/board-star-nv.h
    Code:
    #ifdef CONFIG_CM_BOOTLOADER_COMPAT
    #define LGE_NVDATA_PARTITION                    "/dev/block/mmcblk0p3"
    #else
    #define LGE_NVDATA_PARTITION                    "/dev/block/mmcblk0p5"
    #endif
    then recompile your kernel.
    3. fix init.rc. modify the rild group id:
    Code:
    group radio cache inet misc audio sdcard_rw log system media_rw
    4. fix uevent.tegra.rc, add a line at bottom:
    Code:
    /dev/block/mmcblk0p3      0660   system     radio

    2012/12/04:
    Found a temp fix for this, when you encounter the call bug, just reboot into recovery, do nothing, reboot. This will fix the phone for a while..

    2012/12/07:
    By compare linux 3.6.9 kernel source to V30C kernel source code, I found that the V30C kernel source wm8994.c has some bugs in it. There are a copy/paste bug and many "switch" "case" "break" mismatch bugs. I made a patch file to fix this. Goto your kernel source sound/soc/codes, input patch wm8994.c < wm8994.diff

    2012/12/25:
    Another fix for audio problem:
    During the wm8994 suspend/resume , it use a unsafe version of read/write registers. I just modify the code , use a mutex lock protect version of register read/write.
    Hope this can make some help.

    https://github.com/marsgod/lge-kernel-star/commit/02fab112d1dc63387b4474fbcf99e7bb9d617236

    I guess when an incoming call trigger, the wm8994 resume, it will take a long time 'restore' the wm8994 registers(because it use the I2C interface), if this process were interrupted by another read/write wm8994 attemp, it will cause problem.

    2012/12/29:
    Based on above patch, I built two kernel for P990 & SU660, as the attached files. Please have a try.
    Just use CWM flash these zip files. The zip file will only update your kernel & modules, there is NO need make a factory reset or clean your cache/data.

    EDIT: for P990 kernel , please check http://xdaforums.com/showpost.php?p=36032539&postcount=661
    38
    Another fix for audio problem:

    During the wm8994 suspend/resume , it use a unsafe version of read/write registers. I just modify the code , use a mutex lock protect version of register read/write.
    Hope this can make some help.

    https://github.com/marsgod/lge-kernel-star/commit/02fab112d1dc63387b4474fbcf99e7bb9d617236

    After a week's testing, I got NO call bug.
    Kernel developers can safely apply this patch.
    Hope this can merge into official kernel release.
    35
    Allright, here's the kernel zip:
    http://goo.im/devs/tonyp/P990-stuff/JB/P990-oldBL-testkernel-tonyp-20121229.zip
    This is for the old BL of course. As I'm on the new one this is untested, please provide feedback.

    It does include the new fix by marsgod and the wifi fixes by pengus77 - apart from that it's arcee's CM10 kernel.
    All credits to them.

    Regarding the callbug - you need to wait at least two days before you should post "no callbugs".
    If you do have one post right away.
    20
    Yes me too, it's obviously not a baseband problem because it even doesn't matter whether you're using SU660 BB's or the P990 ones.

    Isn't it that calling and beïng called work as follows:

    - phone.apk sends a request to the RIL (pick up when beïng called or DIAL when call)
    - RIL sends request to baseband
    - Baseband commands with the carrier: picks up the line or dials a number
    - Baseband receives sync back from carier, like 'connected'
    - Baseband sends this back to the RIL
    - RIL sends this back to phone.apk or directly into the kernel, I don't know

    Then 3 cases are posible:
    - Both sending audio and receiving audio works
    - Receiving audio works, sending (mic) doesn't work
    - Receivind audio works, sending is highly distorted and noisy

    So there are some options left:
    1: Kernel contains driver parts of the SU660 which aren't supported by P990. doesn't sound plausible, because excellent calling is also possible sometimes.
    2: SU660 has two mics, one for noise cancelling and one for calling (just a guess, p990 has only one mic, SU660... dont know), RIL requests the kernel to activate mic, but wrong mic is beïng activated so only the noise cancel mic is working (but there is no noise canceling mic) hmm not really plausible, just guessing.

    I don't know if i'm right, but I just want to figure out all options.

    Thank man, I think there maybe some other possible reasons:
    1. The official ROM used a unlock bootloader, and difference partition table. Some RIL or audio part will try to communicate with bootloader or check partition's saved values...I found that lge-ril.so try to save info in its MSC partition, and this is call mmcblk0p5 in official partion, but mmcblk0p3 in CM10 partition.
    2. rild service started up with group media_rw , but CM10 rild startup without this permission.it will cause the rild access MSC partition fail.
    3.wm8994 codec has some strange audio path config , and you can see this in dmesg, a audio path config fail. I think at run time, after some days , the wm8994 codec will work wrong when you making a call. It just "connect " wrong audio path to your baseband.
    4. some other reasons, such as the ram_console use a physical address 0x17800000 save reserved buffer, maybe this will corrupt some other apps (maybe RIL?)

    BTW, I used a SU660, the CM10 call bug still exist, so it is not just a SU660/P990 difference. I am testing some new fixes in my phone, made some calls and found no bug now, still testing..........
    20
    2012/12/29:
    Based on above patch, I built two kernel for P990 & SU660, as the attached files. Please have a try.
    Just use CWM flash these zip files. The zip file will only update your kernel & modules, there is NO need make a factory reset or clean your cache/data.

    Please feedback after 7 days or when you encounter a call bug.

    (please check the first post for download the zip files)