Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP marsgod

26th November 2012, 03:02 PM   |  #1  
OP Member
Thanks Meter: 453
 
74 posts
Join Date:Joined: Mar 2005
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://forum.xda-developers.com/show...4&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-kerne...99e7bb9d617236

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://forum.xda-developers.com/show...&postcount=661
Attached Files
File Type: rar LGEInfineon.rar - [Click for QR Code] (3.9 KB, 802 views)
File Type: rar liblgeril.rar - [Click for QR Code] (110.2 KB, 294 views)
File Type: diff wm8994.diff - [Click for QR Code] (1.4 KB, 128 views)
File Type: zip newkernel_SU660.zip - [Click for QR Code] (4.83 MB, 197 views)
Last edited by marsgod; 31st December 2012 at 12:29 PM.
The Following 99 Users Say Thank You to marsgod For This Useful Post: [ View ]
26th November 2012, 03:09 PM   |  #2  
Member
Thanks Meter: 13
 
39 posts
Join Date:Joined: May 2011
More
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 by wwewwf996; 26th November 2012 at 03:36 PM.
The Following User Says Thank You to wwewwf996 For This Useful Post: [ View ]
26th November 2012, 03:19 PM   |  #3  
Senior Member
Thanks Meter: 910
 
877 posts
Join Date:Joined: Aug 2010
Let the testing begin
26th November 2012, 03:48 PM   |  #4  
anjo88's Avatar
Senior Member
Flag Seixal
Thanks Meter: 55
 
646 posts
Join Date:Joined: Nov 2010
Donate to Me
More
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 ----------

Quote:
Originally Posted by wwewwf996

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 by anjo88; 26th November 2012 at 03:38 PM.
26th November 2012, 03:56 PM   |  #5  
kumasiaweh's Avatar
Member
Flag bandung
Thanks Meter: 6
 
46 posts
Join Date:Joined: Sep 2011
More
thought i'm the only one ...lol
26th November 2012, 03:57 PM   |  #6  
wfd's Avatar
Senior Member
Flag Togliatti
Thanks Meter: 716
 
319 posts
Join Date:Joined: Mar 2011
More
Quote:
Originally Posted by anjo88

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
The Following User Says Thank You to wfd For This Useful Post: [ View ]
26th November 2012, 03:59 PM   |  #7  
anjo88's Avatar
Senior Member
Flag Seixal
Thanks Meter: 55
 
646 posts
Join Date:Joined: Nov 2010
Donate to Me
More
can anyone rebuild cm10 with that?
26th November 2012, 04:03 PM   |  #8  
i hope its work
Last edited by wucinac; 26th November 2012 at 04:05 PM.
26th November 2012, 04:15 PM   |  #9  
Member
Flag St. Gallen
Thanks Meter: 61
 
96 posts
Join Date:Joined: May 2011
More
Quote:
Originally Posted by anjo88

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?
Last edited by May-C; 26th November 2012 at 04:26 PM.
The Following 4 Users Say Thank You to May-C For This Useful Post: [ View ]
26th November 2012, 04:31 PM   |  #10  
pengus77's Avatar
Recognized Developer
Penguins' Republic of Antarctica
Thanks Meter: 22,904
 
2,069 posts
Join Date:Joined: Mar 2011
Donate to Me
Building right now with the new LGEInfineon.java. Will test as soon as it's done

Thanks for this one !

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes