[CM7/CM6]Battery drain fix | Build #9 | 2011-03-18 | merged to cm7

Status
Not open for further replies.
Search This thread

mad-murdock

Retired Recognized Developer
Oct 11, 2010
2,390
1,679
Detmold
snap20110308_114114_small.png
snap20110308_090526_small.png


Patches got merged to CM7

Will be included from nightly 27 onwards. Thread is about to be closed. Use nightly thread for further discussion if any.


Achievment earned: RIVER RUNS RED (write in red on first post of a thread with at least 50 pages)

Build #9 contains Kali's latest kernel plus the 2 patches from hrkfdn about the aic3254 dsp chip. no other tweaks involvled, since i like kali's fast and simple work.

get build #9 here - md5: cc9372655750994cddfd12460dcdcb8b
http://postkreative.eu/mad/mad-batfix-B9-signed.zip
http://uberfail.org/mad/mad-batfix-B9-signed.zip
mirrors by phunkycow - thanks a bunch!

just flash this .zip file from recovery. reflash it each time you installed a new nightly build. #6 and newer contains a cleanup-function to remove older deprecated files from system. reported to work with cm6

no workaround needed anymore with #9

Now that we seem to have reached the final version - thanks to you all and your feedback - without it, it would have been much harder to trace down all issues.

FAQ
  • Q: Where has the CHANGELOG gone?
    A: Move to the top of 2nd post - just scroll down a bit.
  • Q: Do i need anthing else but the latest patch?
    A: No. Except for a cm7 RC or nightly rom installed.
  • Q: Why do i need to reflash after a new nightly?
    A: Because we cannot backup the boot image. So once you flash a nightly/RC, you also get its kernel.
  • Q: Whats this FM-Radio thing i read about?
    A: One discussed way to solve the battery drain in cm7 nigthlies and future RC's would be to use hrkfdn's patches and disable all fm-radio support (not only the apk file, but also the libs and framework). This patch is bypassing disabling FM-Radio and still doing its job. Result of quiet some work.
  • Q: Will this patch work with other roms?
    A: Sense based roms dont need it at all. Non sense roms could use the patch on their kernel, but its not sure if this kernel runs with other roms. You can either try it, or ask in your kernel thread to include the patches. But, this is not final/stable yet. Guranteed to work with CM7, reported to work with CM6.
  • Q: When will this be in CM7 nightlies?
    A: When all issues are solved. It seems thats the case with #8 - so expect nightly integration soon.

Known Issues in #9
  • None yet.

Monitor Status of DSP Chip
  • get gscript light free from market
  • start it, menu -> add script
  • use "dmesg aic" as title
  • leave "Needs SU?" checked
  • write "dmesg | grep -i aic | grep -v suspend | grep -v resume | tail -n 25" into the lower command box and save
  • back in adw: menu -> add -> shortcuts -> GScript Lite -> dmesg aic
This results in one-click-to-check-homescreen-shortcut

Sample dmesg output
Code:
<6>[  106.647766] aic3254_ioctl: index 13 for 40047313
<6>[  106.647949] aic3254_set_config: table(0x40047313) index(13)
<6>[  106.648071] aic3254_set_config: enable rx
<6>[  106.648498] aic3254_config: size = 15
<6>[  106.649475] aic3254_config: size = 11
<6>[  122.602355] aic3254_ioctl: index 29 for 40047313
<6>[  122.602508] aic3254_set_config: table(0x40047313) index(29)
<6>[  122.602722] aic3254_config: size = 8
<6>[  122.603973] aic3254_set_config: disable rx
<6>[  122.604095] aic3254_powerdown: power off AIC3254
<6>[  122.604217] aic3254_config: size = 32

at first, the dsp is enabled (enable rx) when i started a mp3 - then the dsp chip is powered off again when i stopped the playback. this power off should occur each time, you stop using sound playback or microphone.

requested feedback:
are there situations, when power off does not work? when you for example have to invoke the old "voice dial" workaround to make poweroff appear again?

Closing comments
build #9 should be the final version. if no more issues arise in the next 48 hours, i will integrate it into cm7 nightlies.
in case you wanna use #5 again, i made a copy of the old opening post below this post, including downloads and instructions.

happy battery life
mad
 
Last edited:

mad-murdock

Retired Recognized Developer
Oct 11, 2010
2,390
1,679
Detmold
changelog
#9: remove AicBootFix.apk from app-drawer and list of applications. its secret now!
#8: added final(?) AicBootFix.apk, removed old bootfix, removed suspend/resume messages, added hopes this is the final version without issues
#7: reverted the latest patch of hrkfdn on behalf of himself. this kernel now only contains the first and second spi_aic3254.c patches.
#6: switched to hrkfdn's patches - added aicbootfix - looking forward to keep fm enabled.
#5: no need to use workaround anymore - modified power daemon and kernel driver take care of it. just flash .zip file once - will add itself to cm's auto backup facility.
#4: stoped logcat spam. opened an own thread, since cm7-ace-nightly started beeing the wrong place now.
#3: addind missing wifi module of #2
#2: added kernel and status - decreased ioctl time from 60s to 20s
#1: initial release

archive of old bat fix / method - build #5 - do not use unless you got good reason

This thread/patch aims to fix the battery drain all non-sense ace roms currently have. As soon as this is tested and working for everyone without issues, it will be merged into cm7 and probably also to other roms.

update 2011/03/11: sorry for being away two days. was unforseen. whats the status? hrkfdn started developing a own patch to the aic driver. by now, it seems much better than my solution. it still got an issue with fm radio on boot - but once that is figured out, that patch will be superior to my solution and probably make its way to nightly. until then, have fun with #5 - but dont expect further development here.

snap20110308_114114_small.png
snap20110308_090526_small.png


This patch contains a kernel, which is based on kali's cm7 kernel. in fact, its absolutly the same, just the driver for the AIC3254 dsp chip is changed.

get build #5 here - md5: f7c7b01a47266b26b8a01f2fc853cfbe
http://www.filesonic.com/file/178617251/mad-#5-aic3254pd_signed.zip
phunkycow's mirrors: http://postkreative.eu/mad/mad-5-aic3254pd_signed.zip / http://uberfail.org/mad/mad-5-aic3254pd_signed.zip - thanks phunky!

old work around after boot not needed anymore. just flash and smile.


to get the current power status:
Code:
[sven@frink xbin]$ adb shell aic3254pd status                            
Power status of aic3254 chip: OFF

same in terminal emulator on phone:
Code:
localhost / # aic3254pd status
Power status of aic3254 chip: OFF

this is a typical "adb logcat | grep -i aic":
Code:
[  340.841369] aic3254_set_config: enable tx
[  340.841766] aic3254_config: size = 12
[  349.698486] aic3254_powerdown: power off AIC3254
[  349.698638] aic3254_config: size = 32
[  381.205322] aic3254_ioctl: Query for AIC3254_POWERSTATUS returned 0 (OFF)
[  498.071563] aic3254_ioctl: Query for AIC3254_POWERSTATUS returned 0 (OFF)
this is the desired output - since OFF means less battery drain. if you only see ON but never OFF (even though no apps using speaker/microphone), leave feedback.

note: unmodified kernel cannot keep track of power status and init status. flash on non official cm7 roms on your own risk :)

measurements with battery monitor widget showed, for cm7 the battery drain drops from 11-15mA to 1-5mA to the level, sense roms in standby reach.

regards
mad
 
Last edited:

coolacrille

Senior Member
Dec 20, 2010
527
91
Skövde
I don't have a mirror but I'll seed this until you update: torrent.

Thanks a lot, this made me try CM7 :)

EDIT: I see you are updating but, anyway - the torrent is #4.
 
Last edited:

mad-murdock

Retired Recognized Developer
Oct 11, 2010
2,390
1,679
Detmold
#5 might be the last - working on sending the stuff google voice search sends automatic on startup

need feedback: anyone notices, auto-power-down doesnt work anymore after it worked once?
do you need to start voice search again to get power down working?
 

alexmason14

Senior Member
Jan 10, 2011
147
7
I'm on cm7, latest nightly. flashed latest version battery fix however even after using voice search, terminal always shows the aic3254 chip as on?

Sent from my Desire HD using Tapatalk
 

shotgunzo

Senior Member
Nov 3, 2010
107
7
#5 might be the last - working on sending the stuff google voice search sends automatic on startup

need feedback: anyone notices, auto-power-down doesnt work anymore after it worked once?
do you need to start voice search again to get power down working?

Noticed. Activated back on some time later.
 

sonydesouza

Senior Member
Jan 31, 2009
1,454
163
Paris
Google Pixel 8
Hey thanks so much for the patch !

However, when i try to enter command in terminal emulator, i have access denied ???

Do you know why ???

But when i tap dmesg | grep AIC3254, i have this after voice search activation :

Result:
<6>[ 366.089080] aic3254_powerdown: power off AIC3254
<6>[ 426.296417] aic3254_powerdown: power off AIC3254
<6>[ 486.500854] aic3254_powerdown: power off AIC3254
<6>[ 546.708404] aic3254_powerdown: power off AIC3254
<6>[ 606.913177] aic3254_powerdown: power off AIC3254


Cheers ;);)
 
Last edited:

alexmason14

Senior Member
Jan 10, 2011
147
7
Type in su, enter. Then type in the aic3254 status code.

Sent from my Desire HD using Tapatalk
 

shotgunzo

Senior Member
Nov 3, 2010
107
7
I can replicate the autoswitching on of aic3254pd by playing music through headphones using the android music player..
 
Last edited:

Frustu

Senior Member
Dec 10, 2010
102
6
42
Udine
I don t understand how to apply this patch sorry .... Just flash via CWM 3.0.0.6 and restart ?
 

mad-murdock

Retired Recognized Developer
Oct 11, 2010
2,390
1,679
Detmold
Hey thanks so much for the patch !

However, when i try to enter command in terminal emulator, i have access denied ???

Do you know why ???

But when i tap dmesg | grep AIC3254, i have this after voice search activation :

Result:
<6>[ 366.089080] aic3254_powerdown: power off AIC3254
<6>[ 426.296417] aic3254_powerdown: power off AIC3254
<6>[ 486.500854] aic3254_powerdown: power off AIC3254
<6>[ 546.708404] aic3254_powerdown: power off AIC3254
<6>[ 606.913177] aic3254_powerdown: power off AIC3254


Cheers ;);)

this is what you want to see! dsp chip powers itself down when unused. when you hear a sound, you should see another power off short after.

better do the aic3254pd status command described above
 
  • Like
Reactions: io53

dmitrych

Member
Sep 22, 2007
20
0
I don't have google voice installed, so I activate power off with built-in voice dialer. Works perfect for me.

Sent from my Desire HD using XDA Apppt
 

Chezbel

Senior Member
Jan 16, 2011
1,980
1,668
Taipei
Great work, thanks! Here is some info from my testing, hope it's useful.

I installed mad-#4-aic3254pd_signed.zip from recovery, rebooted then waited
a while without doing anything with the phone (no power button, no touch).
Here is what I got:
/cygdrive/c/xxx: adb shell aic3254pd status
Power status of aic3254 chip: ON

/cygdrive/c/xxx: adb shell dmesg | grep aic3254_
<6>[ 5.092376] spi_aic3254_init
<6>[ 5.092590] spi_aic3254_probe
<6>[ 9.520355] aic3254_ioctl: parameters(64, 1024, 806041a0)
<6>[ 9.521087] aic3254_config: size = 23
<6>[ 9.524627] aic3254_config: size = 1
<6>[ 9.524963] aic3254_ioctl: update table(64,1024) successfully
<6>[ 9.526031] aic3254_ioctl: parameters(64, 1024, 806341a8)
<6>[ 9.526733] aic3254_ioctl: update table(64,1024) successfully
<6>[ 10.349945] aic3254_ioctl: parameters(24, 16384, 806641b4)
<6>[ 10.351898] aic3254_ioctl: update table(24,16384) successfully
<6>[ 10.370605] aic3254_ioctl: index 23 for 40047321
<6>[ 10.370697] aic3254_set_config: table(0x40047321) index(23)
<6>[ 10.370910] aic3254_set_config: miniDSP command len = 32
<6>[ 10.371002] aic3254_set_config: rx mode 29, tx mode 29
<6>[ 10.371124] aic3254_config: size = 32
<6>[ 10.372253] aic3254_set_config: configure minidsp done
<6>[ 10.372406] aic3254_ioctl: index 15 for 40047312
<6>[ 10.372619] aic3254_set_config: table(0x40047312) index(15)
<6>[ 10.372711] aic3254_set_config: enable tx
<6>[ 10.373138] aic3254_config: size = 23
<6>[ 10.373626] aic3254_config: size = 20
<6>[ 470.774963] aic3254_ioctl: Query for AIC3254_POWERSTATUS returned 1 (ON)

After this I used Google voice and then the power button to turn off the screen:

/cygdrive/c/xxxb: adb shell aic3254pd status
Power status of aic3254 chip: OFF

/cygdrive/c/xxx: adb shell dmesg | grep aic3254_
...
<6>[ 470.774963] aic3254_ioctl: Query for AIC3254_POWERSTATUS returned 1 (ON)
<6>[ 608.652496] aic3254_ioctl: index 1 for 40047321
<6>[ 608.652709] aic3254_set_config: table(0x40047321) index(1)
<6>[ 608.652801] aic3254_set_config: miniDSP command len = 32
<6>[ 608.653015] aic3254_set_config: rx mode 29, tx mode 15
<6>[ 608.653106] aic3254_config: size = 32
<6>[ 608.658111] aic3254_config: size = 23
<6>[ 608.659820] aic3254_config: size = 20
<6>[ 608.660278] aic3254_set_config: configure minidsp done
<6>[ 608.660614] aic3254_ioctl: index 29 for 40047312
<6>[ 608.660705] aic3254_set_config: table(0x40047312) index(29)
<6>[ 608.660919] aic3254_set_config: enable tx
<6>[ 608.661315] aic3254_config: size = 12
<6>[ 608.733917] aic3254_ioctl: index 23 for 40047321
<6>[ 608.734008] aic3254_set_config: table(0x40047321) index(23)
<6>[ 608.734222] aic3254_set_config: miniDSP command len = 32
<6>[ 608.734313] aic3254_set_config: rx mode 29, tx mode 29
<6>[ 608.734436] aic3254_config: size = 32
<6>[ 608.737457] aic3254_set_config: configure minidsp done
<6>[ 608.737670] aic3254_ioctl: index 15 for 40047312
<6>[ 608.737792] aic3254_set_config: table(0x40047312) index(15)
<6>[ 608.737976] aic3254_set_config: enable tx
<6>[ 608.738372] aic3254_config: size = 23
<6>[ 608.738922] aic3254_config: size = 20
<6>[ 614.000122] aic3254_ioctl: index 13 for 40047313
<6>[ 614.000396] aic3254_set_config: table(0x40047313) index(13)
<6>[ 614.000549] aic3254_set_config: enable rx
<6>[ 614.001068] aic3254_config: size = 15
<6>[ 614.001892] aic3254_config: size = 11
<6>[ 616.998382] aic3254_ioctl: index 1 for 40047321
<6>[ 616.998565] aic3254_set_config: table(0x40047321) index(1)
<6>[ 616.998687] aic3254_set_config: miniDSP command len = 32
<6>[ 616.998931] aic3254_set_config: rx mode 13, tx mode 15
<6>[ 616.999359] aic3254_config: size = 32
<6>[ 617.001770] aic3254_config: size = 15
<6>[ 617.006561] aic3254_config: size = 11
<6>[ 617.011535] aic3254_config: size = 23
<6>[ 617.013336] aic3254_config: size = 20
<6>[ 617.059783] aic3254_set_config: configure minidsp done
<6>[ 617.059906] aic3254_ioctl: index 29 for 40047312
<6>[ 617.059936] aic3254_set_config: table(0x40047312) index(29)
<6>[ 617.059936] aic3254_set_config: enable tx
<6>[ 617.059967] aic3254_config: size = 12
<6>[ 617.269744] aic3254_ioctl: index 29 for 40047313
<6>[ 617.269744] aic3254_set_config: table(0x40047313) index(29)
<6>[ 617.269744] aic3254_set_config: enable rx
<6>[ 617.269744] aic3254_config: size = 8
<6>[ 627.686737] aic3254_powerdown: power off AIC3254
<6>[ 627.686859] aic3254_config: size = 32
<3>[ 627.794860] aic3254_config: 3254 power down procedure ,flag 0x24=0x00(0x88)
<6>[ 1173.502197] aic3254_ioctl: Query for AIC3254_POWERSTATUS returned 0 (OFF)
 

PoseyBAH

Senior Member
Nov 1, 2010
116
3
Halifax
After google voice search and chipset off:
# logcat | grep -i aic
I/AudioHardwareMSM7X30( 1206): aic3254_configure: sound effect (Original)
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 0, 1)
I/AudioHardwareMSM7X30( 1206): aic3254_configure: sound effect (Original)
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 0, 1)
I/AudioHardwareMSM7X30( 1206): aic3254_configure: sound effect (Recording)
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 1, 1)
I/AudioHardwareMSM7X30( 1206): aic3254: change tx mode to 15
I/AudioHardwareMSM7X30( 1206): aic3254_configure: sound effect (Recording)
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 1, 1)
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 1, 0)
I/AudioHardwareMSM7X30( 1206): aic3254: change rx mode to 13
E/HTC Acoustic( 1206): cannot open codec aic3254 device -1
I/AudioHardwareMSM7X30( 1206): aic3254_configure: sound effect (Recording)
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 0, 0)
E/AudioHardwareMSM7X30( 1206): cannot open codec aic3254 device -1
I/AudioHardwareMSM7X30( 1206): aic3254_configure: sound effect (Original)
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 0, 0)
I/AudioHardwareMSM7X30( 1206): aic3254: change tx mode to 29
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 0, 1)
I/AudioHardwareMSM7X30( 1206): aic3254: change rx mode to 29
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 0, 0)
I/AudioHardwareMSM7X30( 1206): aic3254: change rx mode to 13
I/AudioHardwareMSM7X30( 1206): do_aic3254_control (1, 0, 1)
I/AudioHardwareMSM7X30( 1206): aic3254: change rx mode to 29

Sent from my Desire HD using Tapatalk
 

Chezbel

Senior Member
Jan 16, 2011
1,980
1,668
Taipei
No complaint here, just reporting so others know.

I flashed CM7 RC2, but it was still necessary to flash mad-#4-aic3254pd_signed.zip again after that and use Google voice to enable the power off of the aic3254.
 

shah_jee

Senior Member
Jan 20, 2011
107
3
Tora Bora
Can someone explain in easy dummy guide style how to turn off voice after patching this fix. Thanks

Sent from my Desire HD using XDA App
 

Chezbel

Senior Member
Jan 16, 2011
1,980
1,668
Taipei
Can someone explain in easy dummy guide style how to turn off voice after patching this fix. Thanks

I'm assuming that you used Google search and then clicked the microphone. When you are done speaking it should just turn off. If that doesn't help then can you provide more info about what you did and what problem you see.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 52
    snap20110308_114114_small.png
    snap20110308_090526_small.png


    Patches got merged to CM7

    Will be included from nightly 27 onwards. Thread is about to be closed. Use nightly thread for further discussion if any.


    Achievment earned: RIVER RUNS RED (write in red on first post of a thread with at least 50 pages)

    Build #9 contains Kali's latest kernel plus the 2 patches from hrkfdn about the aic3254 dsp chip. no other tweaks involvled, since i like kali's fast and simple work.

    get build #9 here - md5: cc9372655750994cddfd12460dcdcb8b
    http://postkreative.eu/mad/mad-batfix-B9-signed.zip
    http://uberfail.org/mad/mad-batfix-B9-signed.zip
    mirrors by phunkycow - thanks a bunch!

    just flash this .zip file from recovery. reflash it each time you installed a new nightly build. #6 and newer contains a cleanup-function to remove older deprecated files from system. reported to work with cm6

    no workaround needed anymore with #9

    Now that we seem to have reached the final version - thanks to you all and your feedback - without it, it would have been much harder to trace down all issues.

    FAQ
    • Q: Where has the CHANGELOG gone?
      A: Move to the top of 2nd post - just scroll down a bit.
    • Q: Do i need anthing else but the latest patch?
      A: No. Except for a cm7 RC or nightly rom installed.
    • Q: Why do i need to reflash after a new nightly?
      A: Because we cannot backup the boot image. So once you flash a nightly/RC, you also get its kernel.
    • Q: Whats this FM-Radio thing i read about?
      A: One discussed way to solve the battery drain in cm7 nigthlies and future RC's would be to use hrkfdn's patches and disable all fm-radio support (not only the apk file, but also the libs and framework). This patch is bypassing disabling FM-Radio and still doing its job. Result of quiet some work.
    • Q: Will this patch work with other roms?
      A: Sense based roms dont need it at all. Non sense roms could use the patch on their kernel, but its not sure if this kernel runs with other roms. You can either try it, or ask in your kernel thread to include the patches. But, this is not final/stable yet. Guranteed to work with CM7, reported to work with CM6.
    • Q: When will this be in CM7 nightlies?
      A: When all issues are solved. It seems thats the case with #8 - so expect nightly integration soon.

    Known Issues in #9
    • None yet.

    Monitor Status of DSP Chip
    • get gscript light free from market
    • start it, menu -> add script
    • use "dmesg aic" as title
    • leave "Needs SU?" checked
    • write "dmesg | grep -i aic | grep -v suspend | grep -v resume | tail -n 25" into the lower command box and save
    • back in adw: menu -> add -> shortcuts -> GScript Lite -> dmesg aic
    This results in one-click-to-check-homescreen-shortcut

    Sample dmesg output
    Code:
    <6>[  106.647766] aic3254_ioctl: index 13 for 40047313
    <6>[  106.647949] aic3254_set_config: table(0x40047313) index(13)
    <6>[  106.648071] aic3254_set_config: enable rx
    <6>[  106.648498] aic3254_config: size = 15
    <6>[  106.649475] aic3254_config: size = 11
    <6>[  122.602355] aic3254_ioctl: index 29 for 40047313
    <6>[  122.602508] aic3254_set_config: table(0x40047313) index(29)
    <6>[  122.602722] aic3254_config: size = 8
    <6>[  122.603973] aic3254_set_config: disable rx
    <6>[  122.604095] aic3254_powerdown: power off AIC3254
    <6>[  122.604217] aic3254_config: size = 32

    at first, the dsp is enabled (enable rx) when i started a mp3 - then the dsp chip is powered off again when i stopped the playback. this power off should occur each time, you stop using sound playback or microphone.

    requested feedback:
    are there situations, when power off does not work? when you for example have to invoke the old "voice dial" workaround to make poweroff appear again?

    Closing comments
    build #9 should be the final version. if no more issues arise in the next 48 hours, i will integrate it into cm7 nightlies.
    in case you wanna use #5 again, i made a copy of the old opening post below this post, including downloads and instructions.

    happy battery life
    mad
    7
    build #5 up - have fun!
    6
    changelog
    #9: remove AicBootFix.apk from app-drawer and list of applications. its secret now!
    #8: added final(?) AicBootFix.apk, removed old bootfix, removed suspend/resume messages, added hopes this is the final version without issues
    #7: reverted the latest patch of hrkfdn on behalf of himself. this kernel now only contains the first and second spi_aic3254.c patches.
    #6: switched to hrkfdn's patches - added aicbootfix - looking forward to keep fm enabled.
    #5: no need to use workaround anymore - modified power daemon and kernel driver take care of it. just flash .zip file once - will add itself to cm's auto backup facility.
    #4: stoped logcat spam. opened an own thread, since cm7-ace-nightly started beeing the wrong place now.
    #3: addind missing wifi module of #2
    #2: added kernel and status - decreased ioctl time from 60s to 20s
    #1: initial release

    archive of old bat fix / method - build #5 - do not use unless you got good reason

    This thread/patch aims to fix the battery drain all non-sense ace roms currently have. As soon as this is tested and working for everyone without issues, it will be merged into cm7 and probably also to other roms.

    update 2011/03/11: sorry for being away two days. was unforseen. whats the status? hrkfdn started developing a own patch to the aic driver. by now, it seems much better than my solution. it still got an issue with fm radio on boot - but once that is figured out, that patch will be superior to my solution and probably make its way to nightly. until then, have fun with #5 - but dont expect further development here.

    snap20110308_114114_small.png
    snap20110308_090526_small.png


    This patch contains a kernel, which is based on kali's cm7 kernel. in fact, its absolutly the same, just the driver for the AIC3254 dsp chip is changed.

    get build #5 here - md5: f7c7b01a47266b26b8a01f2fc853cfbe
    http://www.filesonic.com/file/178617251/mad-#5-aic3254pd_signed.zip
    phunkycow's mirrors: http://postkreative.eu/mad/mad-5-aic3254pd_signed.zip / http://uberfail.org/mad/mad-5-aic3254pd_signed.zip - thanks phunky!

    old work around after boot not needed anymore. just flash and smile.


    to get the current power status:
    Code:
    [sven@frink xbin]$ adb shell aic3254pd status                            
    Power status of aic3254 chip: OFF

    same in terminal emulator on phone:
    Code:
    localhost / # aic3254pd status
    Power status of aic3254 chip: OFF

    this is a typical "adb logcat | grep -i aic":
    Code:
    [  340.841369] aic3254_set_config: enable tx
    [  340.841766] aic3254_config: size = 12
    [  349.698486] aic3254_powerdown: power off AIC3254
    [  349.698638] aic3254_config: size = 32
    [  381.205322] aic3254_ioctl: Query for AIC3254_POWERSTATUS returned 0 (OFF)
    [  498.071563] aic3254_ioctl: Query for AIC3254_POWERSTATUS returned 0 (OFF)
    this is the desired output - since OFF means less battery drain. if you only see ON but never OFF (even though no apps using speaker/microphone), leave feedback.

    note: unmodified kernel cannot keep track of power status and init status. flash on non official cm7 roms on your own risk :)

    measurements with battery monitor widget showed, for cm7 the battery drain drops from 11-15mA to 1-5mA to the level, sense roms in standby reach.

    regards
    mad
    4
    dear testing community,

    just a quick note on progress. kali, hrkfdn and me did some tests and decided to bring #6 to you. it will include hrkfdn's patch along with a init script which fixes the boot issue.

    with your feedback on this patch, we will decide if we can get it working with fm enabled, or not.

    when i am back home tomorrow, i will create/upload the patch. #5 will not be delete in case the new #6 creates issues.

    regards and a nice saturday night
    mad
    3
    #5 might be the last - working on sending the stuff google voice search sends automatic on startup

    need feedback: anyone notices, auto-power-down doesnt work anymore after it worked once?
    do you need to start voice search again to get power down working?