yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] tobiascrystal:
great news! What Kernel is it based off of?
[HD2 Android NAND Development] Mafioso:
Excellent news! your efforts finally paid off :D
[HD2 Android NAND Development] Gho57:
these developers are not human :eek:
[HD2 Android NAND Development] Mafioso:
What do you mean? Are they Androids?

:P
[HD2 Android NAND Development] memin1857:
Here is the initial details:

- mdebeljuh asked me what kernel I was using. It was tytung r10 (but of course the new code can be applied to any kernel)

- he sent me a test kernel that can set mic gain levels in realtime (even while inside a call) by modifying a simple file with the echo command

- I tested it I saw that after deleting htcleo.acdb file and falling back to default.acdb we can set the normal mode mic gain lower by echoing a new value to the file which is monitored by the kernel.

It works. And no side affects since htcleo.acdb is not used but default.acdb is used.

The thing is, mdebeljuh says "this is libaudio dependent and the handset mic gain can't be set during the initialization process but when the call is connected. The right solution would be to change the libaudio but I can't find the sources"

Since iamgpc did modify libaudio.so to fix robo voice I thought maybe he had the sources.

For now we are waiting for mdebeljuh to make the fix practical and go public.
[HD2 Android NAND Development] ph03n!x:
This is fantastic news! mdebeljuh and jdivic - this is the second success within a few days - hats off to you!

I am assuming this fix will be included in Tytung's v11 final (or a revision of that).

For the libaudio.so - can mdebeljuh, jdivic and you help with this issue too? For the sources - I think drizztje's sources should be available (not sure if he posted it in tyween's TyphooN thread) - I will try PMing him.
[HD2 Android NAND Development] drizztje:
Hi all, good to see there is progress. I was already watching this thread. My libaudio modifications are based on cm7 desire repo, my diff is already attached somewhere in that thread. Problem is people still have issues with it. I have been using d4rk miui for a while, it seems to have more stable audio but I don't know where to find the source code of that. Other than that, I alrady ditched htcleo.acdb some time ago and have been using default.acdb which gives louder volumes.
[HD2 Android NAND Development] ayyu3m:
WOW. Congrats to the developer and others involved. Truly a time for us all @ hd2 androidians
[HD2 Android NAND Development] ph03n!x:
Here is it :)

http://xdaforums.com/showthread.php?p=15657585#post15657585
[HD2 Android NAND Development] RJ45:
This is awesome news! I unfortunately no longer use my HD2 but because of this, I might use it as my daily phone again (I miss the strong dev community and this is proof right here, not to mention the amount of ROMs for this thing!)
[HD2 Android NAND Development] Pierrot Lunaire:
I was wondering if this will also fix the issue I asked about months ago:

http://xdaforums.com/showthread.php?t=1042051

The issue with the AGC that I was looking for a way to turn it off.
[HD2 Android NAND Development] odoss:
OMG AM I DREAMING OR WHAT??????

WOOOOOW YOU ARE AWESOME GUYS !!!!

I CAN'T WAIT ANYMORE GIVE IT TO Me !!!:eek::o
[HD2 Android NAND Development] patensas:
wow after afew days strugling without a proper internet connection today i was catching up on XDA to read this wonderfull news. Any ETA on public sources or working kernel?
[HD2 Android NAND Development] ORiZorrie:
Very nice work mdebeljuh and jdivic.

Looks like our community is +2 heroes :)

Big thanks!
[HD2 Android NAND Development] elgrego4:
How do we know they have actually sorted it? I dont mean to be negative but Charnleigh claimed all sorts and has never shown anything.
[HD2 Android NAND Development] ORiZorrie:
It would be quite idiotic to say 'its fixed' while it aint. Before memin makes a statement like that, he must at least have seen proof. I trust the OP and the devs when they say it's fixed.

Anyway, these things take time: dev, testing, tweaking, ... Even if it takes them a week to publish it, that doesn't matter, without them we probably would not have a fix at all. So turn that negativism into positivism there! =D
[HD2 Android NAND Development] 666Duvel666:
THIS!!! ^^

And I'll say more!! Without them we would never be able to play with android in our HD2! So... ETA's? They probably don't know. And probably they are doing tests while we're writing. So stay back and relax! ;) It will come out as soon as possible!
[HD2 Android NAND Development] mdebeljuh:
FIX -setting mic level/gain

Here are test and debug kernel. Only difference is that debug kernel has a lot dmesg output. Unfortunately the solution is dependent on libaudio so test it and report back. I have also included my libaudio so you can try it if it is not working. If you can't make it work please install debug kernel and send us dmesg output with description of what where you trying to do.

For now this solution is not working with drizztje libaudio.

UPDATE: just to make something clear, libaudio is not made by me but it is from tytung build which I am using.
[HD2 Android NAND Development] ph03n!x:
@mdebeljuh and jdivic, thanks a lot for your work - on this issue as well as the screen lag. I had started another thread on a libaudio.so issue, and drizztje's libaudio was the better of the available options. Any chance your version of libaudio incorporates/ complements drizztje's changes?

I would also be grateful and will support you, if you can have a shot at the thread I have mentioned after clearing this project.
[HD2 Android NAND Development] DannyBiker:
I agree with ph03n!x : if this fix is libaudio.so related, it could be great if the other libaudio.so bug was looked into...:)
[HD2 Android NAND Development] clio94:
i am happy.i am very happy.thank you mdebeljuh with your kernel and libaudio i am able to give bt voice commands without audio crashing.i tried it until now more than ten times and it always works.thank you

Sent from my HD2
[HD2 Android NAND Development] mdebeljuh:
For now we didn't made any changes to the libaudio sources. We will take a look at libaudio sources and see if it is possible to make solution for mic level which will work for everyone.
[HD2 Android NAND Development] jan-willem3:
Why everyone wants to hack libaudio.so. Android is designed to have all the libs comptaible with all devices not device unique. Most audio issues are related to failing kernel code. By creatiing custom libs we need to make different libs for each roms. And when using closed source roms like sense issue wont be fixed at all.
[HD2 Android NAND Development] ph03n!x:
It all started with iamgpc, and then the wonk fix. The purpose of my thread on libaudio.so is for fixing the "no sound" issues, not as much for making non-standard libaudios. If a solution for the issue is found by using a standard libaudio library, we'll be very glad to test and use it!

And thanks a lot for your kernel works!!
[HD2 Android NAND Development] shorty1483:
question: why is tytung r11 shown as RAF 1.9 in settings and OC is not possible, neither in CM7 settings nor in SetCPU?

Beside from that, your test kernel works wonderful on Typhoon 3.6.0.

Settings:

echo '0 500' > /proc/mic_level

echo '1 600' > /proc/mic_level

Also we (me and my wife) experienced no voice echo with the 500 gain.

Very good job guys with the Kernel and memin for the how-to!!
[HD2 Android NAND Development] memin1857:
Good news, I am glad it works for you with no echo.

I think voice echo is dependent on the operator. Some operators have better echo cancelling circuits than the others.

Please note that the voice echo we are mentioning is the echo the remote party (non hd2 phone) hears. Also anybody don't confuse with the terminal echo command ;)
[HD2 Android NAND Development] slashas69:
So it has been fixed or under development? Cause topic says fixed, but in thread i see lots of changes, packages etc...
[HD2 Android NAND Development] shorty1483:
For sure the echo on the other side. All fine :D

So i just wait for mdebeljuh for any comment on the Overclock problem. When that would be working alos, I would be the happiest user on the whole world ;)
[HD2 Android NAND Development] memin1857:
You are right, it is not very clear but it is fixed AND under development :)

The problem was being unable to set normal and speakerphone mic levels seperately.

Now we can set them seperately.

There is a test kernel on post 97 and instructions on post 104.

When enough people test and comment an easier fix would be posted. For now it is kind of a manual fix that is not "one click"

If you install the test kernel and echo the proper values you will get good results until you reboot.

It can be considered to be still under development because it may not be working for all configurations, and it is not a one click or ready to use solution. But I'm sure in very short time, the new code would be incorporated in modern kernels and roms with preset values that should work well with many configurations.

I asked mdebeljuh to make a "one click" solution that uses fixed values and works just by flashing a single zip file. I think it would be available quite soon. If it doesn't work you can go back by just flashing the original kernel or restoring from cwm. And you can still tweak the settings if you are a power user.
[HD2 Android NAND Development] hh0829:
Hello,

Can anybody test the kernel for battery drainage after alarm clock activation, my battery run out tonight and the log on current widget shows that high drainage started when the alarm went off. It never happened to me before with tytung r11 or r10.
[HD2 Android NAND Development] eseregin:
This topic not about Tytung kernel.

Please ask in topic exactly about it, this one exist, topic Tytung kernels.

Ps

http://xdaforums.com/showpost.php?p=10429937&postcount=3
[HD2 Android NAND Development] shorty1483:
@mdebeljuh

Is it possible that the test kernel is Rafpigna 1.9 intead of tytung R11? looked on the file sizes of all three and it seems to me like that.
[HD2 Android NAND Development] neato4u:
Great news that this is finally fixed! But I don't understand.. which file to download and how do i use this? Replace the files or what..

Can someone perhaps do a simple step by step guide on how to do this?
[HD2 Android NAND Development] ph03n!x:
Instructions: http://xdaforums.com/showpost.php?p=17047358&postcount=104

Download: http://xdaforums.com/showpost.php?p=17031938&postcount=97
[HD2 Android NAND Development] mdebeljuh:
I have made "one click" solution so you can easier test mic level. These CWR updates will rename htcleo.acdb to htcleo.acdb_backup and make intit.d script (10mic_level) which will execute these commands at boot:

echo '0 500' > /proc/mic_level
echo '1 600' > /proc/mic_level

During call you can change these values to find which mic level is better. If you prefer different mic levels you can change the /etc/init.d/10mic_level file and enter your values.

Only difference between these two updates is that debug version has a lot dmesg entries which are only necessary if the solution is not working.

You can see current mic level if you execute:

cat /proc/mic_level

then you will see something like this:

Usage: echo 'device_id level' > /proc/mic_level
Level range: 0-1000; -1 use level from acdb
Current levels (device_id):
HANDSET (0): 500
SPKR_PHONE (1): 600
HEADSET (2): -1
TTY_HEADSET (3): -1
BT_SCO (4): -1

UPDATE:

More info: kernel is based on tytung R11 from 22 August 2011.

Uninstall procedure:

Run CWR script uninstall_ml.zip which will rename back htcleo.acdb and delete init.d script 10mic_level. After that just install any other kernel you like.

UPDATE 2:

New versions of kernels are uploaded. I had one bug, first mic device is HANDSET and not HEADSET. Also I have changed Kernel version name to avoid confusion about kernel version (rafpigna - tytung).
[HD2 Android NAND Development] shorty1483:
Everything works quite ok with that Kernel! Thanks!

Is it ok to have

/etc/init.d/10mic_level

and

/etc/init.d/10apps2sd

in init.d folder at same time? And is it now RAF 1.9 or tytung or modified mix? Just for info because I am still confused about Kernel info in system settings and non existant overclock possibility.
[HD2 Android NAND Development] Daekin:
yes it is...the number are only used to force script order, the filename is not important otherwise
[HD2 Android NAND Development] hh0829:
I don't want to be rude, but I know the appropriate place to post, I installed the test kernel from this thread, and for the first time since using android in over a year my battery emptied overninght, and the logs from currentwidget shows that high drainage started when my alarm went off, which I turned off.
[HD2 Android NAND Development] memin1857:
Check What's using battery from the settings menu. Maybe you could see the offending app/service. (If this happens again)
[HD2 Android NAND Development] eseregin:
Sorry about it in this case.

I will try today using this test kernel and test alarm as well
[HD2 Android NAND Development] odoss:
Thnak guys !

i'll will not try it now i'm waiting for a clean fix because is, ee that battery drai is very bad here after trstin the kernel so i'll wait...

also please make RAF 1.9 kernel version please, it's healthy for the battery....
[HD2 Android NAND Development] liulibin:
i am testing this,it is great,but i have a problem,the wlan doesnt work,the rom i am using is froyo desireHD builded by CMYLXGO
[HD2 Android NAND Development] mutil:
tytung's kernels dont go well with sense roms.
[HD2 Android NAND Development] mdebeljuh:
Kernel is tytung r11. I am using rafpigna .config file (with some modifications) and I didn't change local version name so when you open "About phone" you will see "rafpigna" in kernel version.
[HD2 Android NAND Development] shorty1483:
Thank you for answer. Do you know what to do to activate overclocking? When this works it is already a very usable solution.
[HD2 Android NAND Development] mdebeljuh:
Kernel must me compiled with overclock option. You can try this one and activate overclocking with a program like SetCPU.
[HD2 Android NAND Development] WarlockW:
Using Cmys rom = froyo build

RAFPIGNA KERNEL

2.0 OC

This is working for all froyo builds

I Have never gotten tytung_r11 kernels to work with my phone :(

How / Is there a way to make this fix work with his kernel ?
[HD2 Android NAND Development] tytung:
tytung_r12_beta1

Since mdebeljuh used rafpigna kernel's .config file to compile r11 test kernel and some people got problems, I decide to compile a test kernel using my .config file.

Kernel r12 beta1 has all features of kernel r11 plus "Mic Gain" fix.

P.S. Thanks to mdebeljuh and jdivic's "Mic Gain" fix and memin1857's summary in the 1st post.

Downloads: (for NexusHD2-Gingerbread in default)

kernel_tytung_r12_beta1_update.zip (for MAGLDR)

cLK_ppp_tytung_r12_beta1_update.zip (for cLK)

If you're using other ROMs, it's better to use initrd.gz from your ROMs for best compatibility.

For MAGLDR users, please delete initrd.gz from kernel_tytung_r12_beta1_update.zip before flashing it.

For cLK users, please download and uncompress cLK_kernel_installer.zip to a temp folder, e.g. cLK_kernel_installer, and put zImage, your ROM's initrd.gz, and system folder to cLK_kernel_installer folder.

Then run cLK_kernel_installer.bat to install new kernel and the related stuff.

adb remount
adb shell rm /system/lib/modules/*
adb push system /system/
adb shell chown 0:2000 /system/bin/wpa_supplicant
adb shell chmod 755 /system/bin/wpa_supplicant
adb shell chown 0:2000 /system/etc/init.d/*
adb shell chmod 750 /system/etc/init.d/*
adb shell sync
adb reboot bootloader

fastboot -c "" -b 0x11800000 flash:raw boot zImage initrd.gz
echo Press any key to reboot.
echo Press any key to reboot.
pause
fastboot reboot

Update:

My r12b1 kernel ignores htcleo.acdb and only uses default.acdb no matter htcleo.acdb exists in /system/etc/firmware folder or not.

And I use 10mic_level '0 200' and '1 600' in my releases.

8/31 Update:

Re-uploaded r12b1 kernel and change 10mic_level to '0 350' and '1 600'.
[HD2 Android NAND Development] shorty1483:
This one's also working brilliant. No echo with settings, voices are nice and clear, Speakerphone also nice. Additionally, native Tethering, Wifi and OC are working like in original Kernel, OC also in native CM7 settings, so you don't need SetCPU and stuff.

You 2 devs must come outta hell :D Would like to see a whole ROM of you ;) I see it in front of my eyes. Never thought about it?
[HD2 Android NAND Development] eseregin:
Tytung, thanks for new kernel!

I installed first test kernel (to install init.rc file and rename acd) after tytung r12.

works greate on Tytung rom. Testing :-)
[HD2 Android NAND Development] tytung:
You can flash r12b1 kernel directly if using my ROM.

Don't need to do any extra steps.
[HD2 Android NAND Development] ayyu3m:
Does this fix improve the audio "music" playback while in speaker mode and NOT in headsets.

I jus had this doubt and thought anyone of you cud clear this for me.
[HD2 Android NAND Development] eseregin:
Dont know, all the same to me to be honest.... think not, this mic level can regulate..

And.... it is work! :-)

Default 200 might be a little, but putting 400 greatly increase sound level on other side!

Good job guys, congrasulate!
[HD2 Android NAND Development] memin1857:
This fix improves the audio "music" playback while in speaker mode IF you have been using LeTama's htcleo.acdb file to get rid of "talking" background noise. Because LeTama's acdb file lowers audio output while fixing mic gain.

With the mdebeljuh's new fix we are able to use the original default.acdb which has normal audio "music" playback.

There is NO clear evidence that the test kernel is causing battery problems. I have tested many times and I am not having battery drain problems, with or without alarm going off. We need more comments. If there is a problem, than many people would comment it. One users problem might be related to many other things.

If you ONLY updated the kernel than wlan wouldn't work because you need the modules that match the kernel. If you flashed mdebeljuh's zip file, it updates modules automatically. Just updating the kernel (zImage) won't work.
[HD2 Android NAND Development] memin1857:
Voice echo

BTW the remote parties I am calling are suffering from voice echo whenever my gain is more than 300.

This also happened without the fix, since the default.acdb also had high gain, it did cause echo too, so

I don't think

echo is related to the new code.

It seems the echo only happens with some network operators. I am using Turkcell from Turkey, Istanbul.

Please comment if the people you are calling hear echo when gain is more than 300. (or not)

Note: Mdebeljuh's one click fix has 500 gain default. I am using 200 myself. 200 is loud enough to my testing. (when default.acdb is used and htcleo.acdb does not exist or is renamed)

EDIT: The echo might be happening only with my phone. Please comment if you have it.
[HD2 Android NAND Development] eseregin:
Mmmm.. no, 200 default...

In init.rc file 10mic_level 0 -200, 1-600, so ...

And in my case dauther could not almost hear me on 200. Tgink it is very depend :-)
[HD2 Android NAND Development] memin1857:
If htcleo.acdb DOES exist in /system/etc/firmware than the range differs a lot.

You don't happen to have htcleo.acdb in the above folder, right?

Note: mdebeljuh's one click fix renames the htcleo.acdb so it is not used. (which makes android use default.acdb)

EDIT: Tytung's version ignores whether htcleo.acdb exists or not, it doesn't use it.
[HD2 Android NAND Development] tytung:
My r12b1 kernel ignores htcleo.acdb and only uses default.acdb no matter htcleo.acdb exists in /system/etc/firmware folder or not.

And I use 10mic_level '0 200' and '1 600' in my releases.

Just clarify it so that people using my kernel won't confuse with htcleo.acdb.
[HD2 Android NAND Development] memin1857:
Ok. To summarize.:

Mdebeljuh's one click fix has 500 default, tytung's has 200 default. (That means mdebeljuh's version is louder by default but it is user adjustable)

Mdebeljuh's one click fix renames htcleo.acdb, tytung's ignores it altogether. (Same outcome)

I myself use 200 btw. There might be people who didn't use the one click fix or tytungs fix and if they didn't follow the instructions they may end up with an actively used htcleo.acdb and very low gain.

So I want people to comment whether 200 is too quiet for them or not, or more than 300 causes echo at the remote party or not.

There is no problem with going above 200 AS LONG AS the people you are calling don't complain about echo. (They hear their own voice repeated on their side) my configuration has echo and I am yet to find where it is originating. I will test with more hd2s, maybe the service center did not pack up my phone well after replacing the lcd, maybe my mic is picking up speaker vibration and echo only happens to my phone. This is why we need more testing and comments.
[HD2 Android NAND Development] tytung:
Add one more thing.

Because Mdebeljuh uses his own .config file when compiling the kernel, so his modules (.ko) are different from my r11 final or r12 beta1.

Maybe some kernel features are different too.
[HD2 Android NAND Development] shorty1483:
Again, for the stats :D

Provider: o2 Germany

Mic Gain: 500

Echo: No
[HD2 Android NAND Development] eseregin:
Mic gain 400 no echo too.

But will try 300 though tomorrow, will see feedback from people
[HD2 Android NAND Development] memin1857:
OK.

More than 600 definitely causes background noise so 500-600 is good for speakerphone mode.

For the normal mode 200-400 is OK I guess.

For me, more than 300 causes echo BUT I am beginning the believe it only happens with my phone dues to hardware problems. We are testing with more hd2s and I will post the results.
[HD2 Android NAND Development] ph03n!x:
TYTung, @mdebeljuh had posted the fix together with a libaudio.so file - I downloaded your cLK kernel, and it does not have a libaudio.so - should I use the one from mdebeljuh's post? I am currently using drizztje's v2...

EDIT: Just realized that the libaudio.so posted by mdebeljuh is the same as the one in your ROM.

Those who are using a ROM other than TYTung's or are using a version of different libaudio.so (iamgpc/ drizztje, etc), use the libaudio.so from this post.
[HD2 Android NAND Development] eseregin:
Think you should, it was told that for now this patch does not compatible with drizzyje libaudio. So for now better use gpc (iamgpc) libaudio as i understand
[HD2 Android NAND Development] mwakious:
Added your fix to my rom....good work,ty:D
[HD2 Android NAND Development] ph03n!x:
Bug Report - TYTung's R12b1...

I use CSipSimple for VoIP. With the R12b1 kernel, modules and stock libaudio.so from NexusHD2 v3.0, CSipSimple freezes itself as well as the default dialer when calling Sip2Sip.

With R11 Final and drizztje v2, all is well - I can use Sip2Sip as well as my work place's Sip server with CSipSimple without an issue.
[HD2 Android NAND Development] sprongebob:
Fm radio not working with kernel 12

Can you fixed?
[HD2 Android NAND Development] elsecreto09:
after flash whenever i make a call it goes directly to speakerphone.