yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] clyder:
I also have the echo.

Yesterday I installed r12 kernel and today I got lot of complaints about an echo. After some testing I either have to put headphone level to 200 or to lower the incall volume to about the half to lose the echo.

For testing I tried instaliing another rom. Tried audio lib from your link, one that is tytung using in his r12 kernel install (he said it is some newer lib from Iamgpc). acdb file is the correct one (size 122 422).

Since some people are putting '0' level to 500+ without having an echo on the other side, could there perhaps be some kind of difference in hardware like it was with display panels and wakeup lag? Or perhaps with certain operators.

When I use headphone level to 200 there is no echo, but other side hears me much lower then they use to before the mic gain fix.

edit:

after trying kernel r11 and letama acdb people can hear me much louder and without a trace of an echo.

question: does android or our hardware has any kind of echo cancelation?
[HD2 Android NAND Development] memin1857:
Reduce your phones IN-CALL VOLUME (not mic gain) by using the side volume keys. That gets rid of the echo.

In-call volume at the center with 300 mic gain should work loud enough without echo.

The older kernel does not seem to have echo because the handset speaker is quieter. As the new code uses default.acdb, it causes handset speaker to become louder which causes echo with some hd2+operator combinations. Reducing the in-call volume level makes it get back to previous levels and no echo. Mic gain only "lowers" the echo along with your voice!

It is still unknown why some hd2 still have echo but I can confirm it is caused by the hd2 mic picking up sound from hd2 own handset speaker. This echo is cancelled my most operators but not all of them. I do not think Android has internal echo canceller but the actual phone hardware should have it plus the canceller in network operator equipment.
[HD2 Android NAND Development] clyder:
I am not sure if that is the case. Last night I switch back to r11 and r12 and on my phone experience was:

I had to reduce incall volume to half or lower to put the echo on acceptable level. And lowering mic gain to 200 definitely made a difference. But when I turn the speakerphone on echo on the other side is much lower. Should't there be more echo since the mic gain in speaker mode is higher and the playback is also lauder?

When I switch back to r11 and old acdb file with max incall volume I hear the other party like I do on r12 and default.acdb with incall volume on half but the echo is still little bit there.

Could it be that default.acdb has some wrong values that cause this?

It would be great to hear more user experience with this.
[HD2 Android NAND Development] memin1857:
When speaker mode has higher volume, it may cause the echo to be loud enough to be detected by the echo canceller hardware at operators equipment thus maybe lowered at the end.

I get no echo when in-call-volume is at the center regardsless of mic gain.

You can always revert back to r11 if it has better results. So far the echo problem has not been solved.
[HD2 Android NAND Development] ph03n!x:
In case anyone is not aware, the libaudio.so file from the Sep 15 Update (and the #4 in Sep 14 Update - both are different, Sep 15 is of course newer) is compatible with the mic gain fix, VoIP fix, and BT calls (not voice commands)....
[HD2 Android NAND Development] memin1857:
Let's see some feedback about this. I'll link it in the first post then. Thanks for the information.
[HD2 Android NAND Development] arne182:
I have tried to apply this patch into tytungs and rafpigna's kernels and I have gotten that the q6audio.c file is not the same to apply the diff. Could you upload the latest versions of:

q6audio.c

board-htcleo-audio.c

msm_qdsp6_audio_1550.h

audio_ctl.c

With these 4 files I will be able to compile the rafpigna kernel for those who are wanting it.

Regards,

Arne.
[HD2 Android NAND Development] memin1857:
I think Hieros already did that. Maybe you can find your files in hieros kernel thread.

Note: As of 1.75 Hieros kernel bootloops if htcleo.acdb is missing (It should have igonred it). And does not include the required libaudio.so and acdb files in the cwm update zip. If you could find the sources please keep those in mind.

Thank you very much for your efforts.
[HD2 Android NAND Development] Hnktc:
It seems i have solved:

1) install again tytung r12

2) edit 10mic_level with this values:

In 10mic_level

#!/system/bin/sh

echo '0 340' > /proc/mic_level

echo '1 240' > /proc/mic_level

After 2 days of tries, no more echo, speakerphone is at the right level..

try :)
[HD2 Android NAND Development] InfX:
​

LESS gain in speakerphone mode ? Am i missing something or do those numbers relate to some different multipliers/scale ?

:confused: :confused: :confused:
​
[HD2 Android NAND Development] Hnktc:
I have done many tries.. this combination of values gaves me best result..

excuse for my english :D
[HD2 Android NAND Development] memin1857:
Just as InFX said, you have set LESS gain in speakerphone mode, which is wrong. That means in speakerphone the other party will hear you quite harder.

echo 1 level should be higher than echo 0 level because:

0= handset (optimal range 300-400)

1= speakerphone (optimal range 450-600)

To get rid of voice echo, lower the in-call-volume (by the side volume keys)
[HD2 Android NAND Development] Hnktc:
Yu're right, but that was best combination of valus that i have tried..
[HD2 Android NAND Development] mikron15:
^^ +2, add me to the club. The two roms i use now have implemented the mic level fix and the echo is now heard at remote end. As pointed out by memin1857, I now have to set the in-call vol to 50% and the echo is reduced to minimum but still there. I am on Rogers & using Telstra HD2 (T9193).

Correct me if I'm wrong, doesn't our HD2 has dual mic to perform noise cancellation in speakerphone mode?
[HD2 Android NAND Development] clyder:
In my case I need to set mic_level to 300 and to keep incall volume one step below 50% to keep echo to non-recognizable level.
[HD2 Android NAND Development] mikron15:
I updated the libaudio.so from iamgpc #394 kernel and set my level to 325/450 & in-call vol to 100%. Since its 3am, I ended up testing it with my other phone by myself and couldn't create echo. True test will be later today when i will call another party.
[HD2 Android NAND Development] clyder:
thanx, i will try it
[HD2 Android NAND Development] memin1857:
Did you have echo at the remote side before you updated libaudio.so? I mean some configurations never had echo.
[HD2 Android NAND Development] clyder:
I tried this lib and the echo issues is exactly the same in my case. I had to keep incall volume to below 50% so the other party could not hear it.
[HD2 Android NAND Development] mikron15:
Yes, I had echo issues at remote end if in-call volume was at 100% but minimum at 50%. I did also delete from my device /system/etc/firmware/htcleo.acdb and left the default.acdb untouched.

I have crappy reception (0-1 bar) at work .. I will test in few hrs time when I will reach home.
[HD2 Android NAND Development] memin1857:
New Tytung R12.3 Kernel is released but has problems with mic gain, don't update yet.
[HD2 Android NAND Development] clyder:
hi,

i read somewhere here a post of a user claiming to solve the echo issues by using the default.acdb from stock CM7. Dont remember who was it and too lazy to search now :)

but I just extracted acdb file from this rom (125868 bytes one) replaced the one from my rom (122442b) and called a friend.

He claims that there is no echo even when I bump the incall volume to max.

After that I changed mic gain value from 300 to 400 and also no echo.

I need to test this further, but it would be great if more people try this.

this is a stock CM7 acdb file

http://dl.dropbox.com/u/836611/default.acdb
[HD2 Android NAND Development] ph03n!x:
Posting this here too, just in case!
[HD2 Android NAND Development] memin1857:
Echo fix test

If you have echo problem,

Please check this post, try the acdb file there and give feedback here please:

http://xdaforums.com/showpost.php?p=17997557&postcount=330
[HD2 Android NAND Development] clyder:
Also test as much as you can. My tests so far includes 3 calls. On first I had mic gain 0 value set to 300, friend on other side said that he heared me low, but no echo even though I set the incall to max where the sound I hear was very loud.

Second and third call mic gain was on 400, and also no echo no metter what I set incall volume to.

I havent tested speakerphone, headset nor the BT device, just the regular call, so I dont know if there could be any other issues.
[HD2 Android NAND Development] memin1857:
Here is an easier testing: Find another phone and call your hd2. Put your hd2 in another room and close the door, talk and see if you have echo or not.

Note: You will have echo with ANY phone if they are both in the same room! Make the above test with hd2 in another room with door closed.
[HD2 Android NAND Development] clyder:
Just tried speakerphone with 500 mic gain level and max incall. No trace of echo. I will try later with a higher value.
[HD2 Android NAND Development] memin1857:
500 is already loud, I do not think you need to try with a higher value. (It does not matter even if it does have echo with over 500 gain)

BTW,

The libaudio thread is messed up, too many versions, too many issues. Tytung r12.3 can't set default mic gain at all.

For now the best is iamgpc libaudio.so with cm7 default.acdb and tytung r12b1 kernel.
[HD2 Android NAND Development] clyder:
I am now on a tytung r12 kernel and gpc's libaudio from 2.8e. I haven't tried to use newer kernels of libaudio files since I dont use BT devices.
[HD2 Android NAND Development] tytung:
Maybe someone can test the following steps (Thanks to kcfong2) with my r12 or r12.4 kernels.

1) Deleted default.acdb

2) Renamed htcleo.acdb to default.acdb

3) Deleted 10mic_level

http://xdaforums.com/showpost.php?p=18022010&postcount=7727

If the mic gain of the speakerphone mode works with TMOUSA and non-TMOUSA phones.

We will no longer need the 10mic_level file which causes different users to have different settings.
[HD2 Android NAND Development] clyder:
I just tried this and it looks like it works.

I installed your 12.4 kernel for cLK but replaced initrd.gz with the one from hyperdroid, replaced default.acdb with renamed htcleo.acdb (113910 bytes), deleted 10mic_level and after reboot I had several calls, regular and on speakerphone, everyone claimed they hear me fine and there is no echo even after bumping the incall volume to max.

Maybe they told me that only to get rid of me since I have been calling everyone lately asking them 'is there an echo on your side' :)
[HD2 Android NAND Development] tytung:
If most users can confirm that replacing default.acdb with renamed htcleo.acdb (113910 bytes) works with r12 kernel series, I will assume that htcleo.acdb doesn't cause the low speakerphone mic gain issue.

(This new discovery may overthrow the previous conclusion about htcleo.acdb)

The new suspect that causes low speakerphone mic gain issue is the kernel source code related to htcleo.acdb which is removed in r12 series.

Thus, /proc/mic_level in r12 series may be not necessary.

New R12.4 kernel packages v2 which remove 10mic_level and include default.acdb with renamed htcleo.acdb.

You can flash them for testing.

cLK_ppp_tytung_r12.4_update_v2.zip. (for cLK and Gingerbread 2.3.4+ only) (Included default.acdb with renamed htcleo.acdb, Gpc's libaudio.so v2.8e and Cedesmith's libhtc_ril_wrapper.so v8.0b4.)

kernel_tytung_r12.4_update_v2.zip. (for MAGLDR and Gingerbread 2.3.4+ only) (Included default.acdb with renamed htcleo.acdb and Gpc's libaudio.so v2.8e.)

Remember to delete /system/etc/init.d/10mic_level after flashing this update. (I should include this command next time.)

Update:

R12.4 kernel packages v3

Automatically delete /system/etc/init.d/10mic_level when flashing it.

cLK_ppp_tytung_r12.4_update_v3.zip. (for cLK and Gingerbread 2.3.4+ only) (Included default.acdb with renamed htcleo.acdb, Gpc's libaudio.so v2.8e and Cedesmith's libhtc_ril_wrapper.so v8.0b4.)

kernel_tytung_r12.4_update_v3.zip. (for MAGLDR and Gingerbread 2.3.4+ only) (Included default.acdb with renamed htcleo.acdb and Gpc's libaudio.so v2.8e.)
[HD2 Android NAND Development] memin1857:
Htcleo.acdb was created by Letama from winmo values. It doesn't have low gain problem in normal mode. Default.acdb's 400 gain is like htcleo.acdb's 1000 (max) gain. The problem was with speakerphone mode mic gain not being louder. (since it was already at max/same as normal mode) and also overall quieter audio playback.

If the speakerphone mode can be set higher than normal mode and audio playback volume is not low, it is ok but you must test these. I will test asap.

FYI

SO YOU MUST TEST SPEAKERPHONE GAIN AND RINGTONE VOLUME ETC TOO. The normal mode mic gain HAS ALWAYS BEEN OK with htcleo.acdb
[HD2 Android NAND Development] tytung:
repeated post.
[HD2 Android NAND Development] tytung:
I know.

Kcfong2 have done the complete testing in this post. (Stock default.acdb causes voicemail issue but htcleo.acdb doesn't.)

Need more users to try and confirm.
[HD2 Android NAND Development] trex3300:
If you really want to help, just do a test. Thank you.

I am on T-mobile US with tytung v3.0 and I have never experience any mic gain or no sound bug issues.
[HD2 Android NAND Development] ph03n!x:
I had a nap in the evening, and looks like a lot changed :D

Just confirm, with v12.4v3 we are using letama's htcleo.acdb renamed as default.acdb, we do not use 10_mic_level and remove /proc/mic_level too? With this configuration, how do we set gain levels? Or does it use the gain levels already set by letama's default.acdb?

Sorry for the questions, just want to understand what has happened :)
[HD2 Android NAND Development] trex3300:
If R12.4 v3 works as expected, people struggling to set gain levels will be history, give it a try.
[HD2 Android NAND Development] clyder:
My tests:

-This time I tested by calling my other phone and muted the mic on the other phone. All tests with tytung r12.4

-With letama's acdb (113910)and no 10mic_level file in init.d folder I get the same mic gain with normal and with speakerphone mode. I at one point in testing kept the HD2 away from me and switched speakerphone on and off and on the other line sound was the same level. But in both cases volume heard on the other line is good. In the times before mic gain fix and with using letamas acdb speakerphone was totaly unusable because people couldn't hear me at all. Now it is more than functional.

-with CM7 acdb (125868b) and mic gain levels of 0 400, 1 600 I get difference with using normal and speakerphone. Normal is like with the previous test and speakerphone is a bit higher.

So in both cases I can use both normal and speakerphone mode and people on the other line have no issues with echo, low or high sound level etc.
[HD2 Android NAND Development] memin1857:
I confirm, 12.4 is working fine when 10mic_level is present and set.

Speakerphone mode gets higher mic gain.

It works well, I will update first post.

In short, 12.4 works but needs 10mic_level to be present (or speakerphone will have same gain)
[HD2 Android NAND Development] tytung:
Not exactly correct, /proc/mic_level is created by the kernel. We can only delete /system/etc/init.d/10_mic_level.

With r12 series (r12, r12.x), replacing default.acdb with letama's htcleo.acdb is enough and doesn't have mic gain issue.

Remote party can hear us clearly in both handset and speakerphone modes.
[HD2 Android NAND Development] tytung:
Thanks.

Since the new combination (replace default.acdb with letama's htcleo.acdb (113910) and no 10mic_level file in init.d folder) works in normal and speakerphone modes, I think using letama's acdb seems better because we don't need to include 10mic_level file.

If anyone needs to adjust the mic gain level of the speakerphone mode (or the handset mode), just add 10mic_level file themselves because /proc/mic_level still works with letama's acdb.
[HD2 Android NAND Development] memin1857:
I think we do need 10mic_level file because otherwise speakerphone mode becomes the same as normal mode?
[HD2 Android NAND Development] trex3300:
10mic_level file is

not

required

It has been adequately confirmed and Like tytung said, 10mic_level file is completely unnecessary and optional, you can put it in your phone if it makes you feel better. Stop acting like you speak for everyone, whoever want can add it on their own.

Thanks to tytung, kcfong2 and other testers.
[HD2 Android NAND Development] mfish123:
If we were to add 10mic_level, on 12.4 V3, and only want to adjust the speakerphone level could we only add:

echo '1 600' > /proc/mic_level

Or would we need all types of mic gains accounted for in the file for it work properly and do something like:

echo '0 -1' > /proc/mic_level

echo '1 600' > /proc/mic_level

echo '2 -1' > /proc/mic_level

echo '3 -1' > /proc/mic_level

echo '4 -1' > /proc/mic_level

From what I'm reading it looks like -1 is the default so I figure but putting -1 for all types of gains other than speakerphone the other types of gains would remain unaffected. I just flashed 12.4 V3 and am not getting any echo with handset, BT, and speakerphone. Volume is not too loud and not too soft however I'd like to maybe tweak the speaker phone gain a little higher.
[HD2 Android NAND Development] tytung:
Only echo '1 600' > /proc/mic_level

Since you're using fake default.acdb (actually is htcleo.acdb), you may need to increase 600 to a high number.

Stock default.acdb has higher mic gain than htcleo.acdb in default.
[HD2 Android NAND Development] tytung:
Clyder has confirmed that the remote party can hear us clearly even in speakerphone mode when using r12.4 v3.
[HD2 Android NAND Development] mfish123:
Roger that. Thanks for the tip on what number to use - I'll be a little more aggressive on playing with higher values
[HD2 Android NAND Development] Luke15153:
Of cause thanks to memin1857 too.

Without you guys pushing the development for the hd2, I would use a native Android phone.

Keep on working and good night,

Luke
[HD2 Android NAND Development] clyder:
Your post is little rude and disrespectfull. Without mermin pushing this issue and maintaining this thread we wouldnt get to this point with mic gain issue.

Let me clarify my results again.

When using letama's acdb and no mic level file mic gain in speakerphone and normal mode is the same, there is no higher gain in speakerphone but for me it is not a problem because in both mods other party hears me loud enough and clearly.

To point out again that it is easy now to act smart aftet someone provided you with a solution. And mermin wasnt forcing anyone to do anything. Just was speaking his opinion.
[HD2 Android NAND Development] trex3300:
You just made my point, you always talk like you are the only one that knows it all, why dont you make your own kernel? Whatever you are smoking in Istanbul.

Rather than trying the fix that was suggested by Kcfong2 and compiled by tytung, you were busy posting spams on so many threads. Many people who tried the r12.4-v3 claimed that it works, not just because tytung said so. People who might want to tweak the settings can also do so if they want. What is your problem? If you have problem with tytung, take it up with him.

I dont have problem with you asking questions, but when good people like Kcfong2 and tytung expend their time and energy to offer likely solution like they did, the least you can do is get off your high horse and give it a try so that you will be in a position to ask intelligent questions.

Now can we all get along ..;)
[HD2 Android NAND Development] clyder:
I have just reported your post. Users like you who never try to do anything to help anyone and only start sharing their 'wisdom' after hard work of other people is ruining this community.

What mermin did with this thread is magnitude away from what you will ever be willing or able to do.

Also mermin said absolutely nothing against anyone, especially tytung. He is just trying to put all facts here.
[HD2 Android NAND Development] trex3300:
Do what you may, and yes mermin deserves credit for championing this case of people with mic gain problem. I give credit where it is due.

BTW, in r12.x, mic gain fix caused problem for those of us that never experienced mic gain issue to start with until Kcfong2 came along with a universal solution.
[HD2 Android NAND Development] ph03n!x:
Dude, irrespective of who is right or wrong, please do not have an offending tone - we are a community of HD2 users who want to make Android better - and your tone is not helping the cause. If you do not like something, look away - as long as it is not a personal attack or something breaking forum rules, there is no reason for this attitude.
[HD2 Android NAND Development] memin1857:
Since the problem (mic gain and echo) is solved and trex3000 is not getting what we are writing while also violating the rules of the forum for flaming, I see no further necessity for explaining.

Thanks to everyone involved, the speakerphone is working as it should and levels are reasonable.
[HD2 Android NAND Development] Cheech1976:
Indeed they are, and me and my brother for one are very thankful for this :)

Me, because it´s my phone, and him, because it´s his ears ;-)

çok teşekkürler!!!
[HD2 Android NAND Development] Zupp34:
Seems like the latest kernel/fix is only for MAGLDR or am I missing something. Would love to try it out for CLK.

And I appreciate your hard work memin. I remember when you first started this thread and all the abuse you had to withstand from people. Now we have another guy who missed out on that chance and wants to deny your efforts paid off.
[HD2 Android NAND Development] themadproducer:
Brilliant summary memin. Rock solid info.

Quick question...you say the HD2 Mic Control creates 10mic_level file if it doesn't already exist. That's a great feature. But, before r12v4, when I was constantly tweaking the levels... if I wanted to successfully change 10mic values...I had to open up the init.d directory with Root Explorer and enable mount r/w rather than r/o. Between reboots, it always goes back to r/o making more steps for me to use the HD2 Mic control app. Is this normal behaviour in your experience? My other HD2 seems to remember the r/w setting. Is there a script not working at boot or something?
[HD2 Android NAND Development] DreddJudge:
When using tytung r12.4 the other person can hardly hear me. If I use the HD2 mic control app will it again create that 10mic_level file again and I can make the mic abit louder for the other person?

Sorry if this question is stupid or answered but I just wanted to know because the other person can hear me fine on r11 just that the volume doesnt save etc
[HD2 Android NAND Development] the_scotsman:
Guys, can we all just stop arguing and get along...life's too short to be *****ing about such minute problems...
[HD2 Android NAND Development] tytung:
Usually system permission is set in initrd.gz.

But you can change it via the script in the init.d folder.

mount -o remount rw /system
[HD2 Android NAND Development] codiak:
Hi

First of all I want to thank memin1857, tytung, Drizztje and all the others how were involved in fixing this issue!

I flashed the latest betaversion (12.4) of tytungs kernel.

The mic gain problem is gone. (Never head echo issue and "no sound" issue, but thanks for fixing it)

Kernel is nice as all of tytungs work. Fast, stable, low power consumtion.

To my happiness, the mic control app still works :)

But one thing I noticed is that the (Bluetooth)Headset audio quality is now worse than before.

That is really bugging me, as I use it very much every day...

Is it because of the "new" default.acdb file?

The audio quality was way better with r12.1 and it had another version of it.

As I never had the echo issue, can I simply replace that file with the old one and get my audio quality back? :rolleyes:

Ideas are welcome.