yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Android Development] chdloc:
Very nice job with your comparisons. Thank you for that!

With regard to your comments/questions:

You are correct, busybox is not part of the installer because it can easily be installed via the Play Store.

As of now, I have restricted aMGC to only work with the "advanced" fix, i.e. the one with noise suppression enabled. The reasoning is that I wanted to minimze the probability of introducing unwanted side effects with other apps. I'm looking for the presence of the noise suppression effect (and only that effect!) in libaudioflinger to enable my mod.

you can tap on the RMS values in between the up and down arrows. The adjusted gain value will show up again for a short period of time. I did not want add more text to keep the UI "clean".
[Nexus 5 Android Development] kaikupascual:
Hello!!, where are the fix for AOSP 5.0/5.1 ROM's?? (Tesla, Chroma, AOSP, etc...) I have for CyanogenMod and stock, but not fo AOSP... thanks!
[Nexus 5 Android Development] chdloc:
To be absolutely precise, this mod is based on AOSP which happens to work on stock.

Keep in mind that there is no guarantee that the mod will work on any given AOSP-based ROM as critical files may have been modified by the ROM developer.
[Nexus 5 Android Development] kaikupascual:
Ah ok ok, thanks!!, I'll try the mod on Tesla and Chroma, I hope to be lucky:good: good work, still working on it, because google does not, thanks again:good:

Other question... In Android M preview work the fix for "glugluglub" sound???
[Nexus 5 Android Development] aeoveu:
Hey - just checking if you have an update for M preview 2 (because I do ;) )

I installed the second preview. Noise supression does not work in preview 2. In fact, the mod doesn't want to install in preview 2 - so we'll have to live with the wet camcorder sound.

I'm rooted (using the stock kernel with the root flag enabled, which makes the video play back work properly and stuff - you can find this zimage kernel in the M preview thread) and while root is functioning properly, this mod isn't. The phone doesn't want to boot (bootloop at the spinning revolving dots).

All I'd like to have is the stereo recording functioning. That, alone, is worth it!
[Nexus 5 Android Development] chdloc:
OK, I need a volunteer who runs M Preview (1 or 2) and who is comfortable pushing files manually. I have attached two versions of /system/lib/libaudioflinger.so. Does either one of them boot? If so, please specify which one and which version of M Preview you are running. Make sure you make a backup of your original libaudioflinger.so, so you can push it back onto your device using adb in recovery.
[Nexus 5 Android Development] aeoveu:
I don't mind volunteering - I'd just need some instructions first. :)
[Nexus 5 Android Development] chdloc:
First, make sure you have adb access (as root!) as soon as you see the spinning dots (Android boot sequence). This will be very useful when the experimental libaudioflinger libraries prevent your phone from booting. In that case you can simply copy the old one back. Keep in mind that the steps I'm giving here are based on Lollipop and that things may have changed with M:

copy both experimental libaudioflinger.so libraries to /sdcard/ (maybe each in a separate subdirectory with identifying names)

make a copy of the stock libaudioflinger library

adb shell
-> su
# mount -w -o remount /system
# cp /system/lib/libaudioflinger.so /system/lib/libaudioflinger.so.stock

copy the first experimental library in place (as root)

# cp /sdcard/first_experimental_libaudioflinger.so /system/lib/libaudioflinger.so
# chmod 644 /system/lib/libaudioflinger.so

reboot -> adb shell as soon as you see the spinning dots -> su -> mount -w -o remount /system -> logcat

observe the output of logcat, you will know if your phone refuses to boot once you see tons of error messages related to the audio server crashing; if that happens hit CTRL-C to exit out and repeat from step #3 with the second experimental library

if after the second reboot Android still does not boot, go back to step #3 and copy the stock library back in place

# cp /system/lib/libaudioflinger.so.stock /system/lib/libaudioflinger.so
# chmod 644 /system/lib/libaudioflinger.so
[Nexus 5 Android Development] djtnh:
any luck with M DP2 ?
[Nexus 5 Android Development] aeoveu:
Gah! Sorry, I had to revert back to stock 5.1.1 cause of some reason. I'll try again tomorrow.
[Nexus 5 Android Development] chdloc:
Experimental M-Preview 2 Support

Edit: Only the "simple" mod (without noise suppression and without aMGC) works

Here is another shot at trying to make my mod work with M-Preview (Release 2). Note that I have not tested this.

Please flash this zip with TWRP 2.8.5.3 as there may be issues with newer versions of TWRP. I have not had time to look into those issues yet.

If the "advanced" version of this mod (with noise suppression) does not work, please try to install the "simple" version (without noise suppression).
[Nexus 5 Android Development] canna1988:
With Chroma and AOSIP the stock mod works.. Just tested ;)

Works perfectly also the mod for CM 12.1
[Nexus 5 Android Development] aeoveu:
I installed the advanced mod (with 6db of noise supression, stereo mics, no sidetone or double speaker effect, audio bitrate on 96kbps - stock figures, as per the screen) and the phone is hung on "Android is starting..." (the same screen where it says "optimizing apps" - but there's no optimization going on, and it just says "starting apps".

If I remove the noise suppression mod (after flashing the system.img file so that I start from scratch) (and ensure the other settings are the same), it works! It boots up and both mics work!

Unfortunately, it seems the M Preview has issues with bluetooth sound on the N5 (some say audio streaming works, but connecting to another device won't work as well), and even though I don't use it, I'll wait for an update before jumping ship. So - I'm reverting to 5.1.1 - but now, everyone knows that the simple mod (without noise supression) works now on M Preview 2.
[Nexus 5 Android Development] dr_iggy:
+1

Послато са Nexus 5 уз помоћ Тапатока
[Nexus 5 Android Development] chdloc:
Thanks for testing!

It appears that nothing has changed since the first edition of M Preview (MDP1) as the simple mod worked there, too.

I see two possibilities here:

1. Google still has not properly updated the AOSP sources. On MDP1, my phone would not boot even with an unmodified libaudioflinger.so build from AOSP.

2. Google's ROM is moving further away from AOSP, now making even libraries proprietary.

Either way, I'll continue to work on this once the sources for the final release drop.
[Nexus 5 Android Development] mkmck:
I've just installed the mod (dual channel mic, 0db denoising) and found that the USB-mic is recording slightly more silent than the one on a top of the phone. Is there any possibility to change mic gain separately?
[Nexus 5 Android Development] chdloc:
Yes, you can adjust the gain separately, but not via the Aroma installer. You need to edit the file /system/etc/mixer_paths.xml yourself. Open the file in an editor on your phone and search for the section "camcorder-stereo". In that section look for the entries "DEC6 Volume" -- which controls the level of the main microphone (close to the USB port) -- and "DEC4 Volume" -- which controls the level of the auxiliary microphone (close to the headphone port). Now adjust the numbers that are assigned to these entries up or down until the perceived loudness matches. Each "tick" changes the gain by 1 dB. The problem is that you need to reboot your phone for the changes to take effect.

To avoid having to boot your phone often to find the "sweet spot", I suggest you use the command-line app tinymix. As you have opted not to use suppression and aMGC you will need to manually pull tinymix out of the Aroma zip file, push to, e.g., /system/xbin, and make executable). Then use the following syntax to adjust the levels on-the-fly during a recording

tinymix "DECX Volume" Y

where X={4,6} and Y={0,1,...,124}. I'd suggest you record something dead-on center, so the audio image should be centered as well. Speak out aloud the changes as you make them and listen to the recording afterwards. Note the values for Y (for both DEC4 and DEC6) where the acoustic image is centered, hard code the values in your mixer_paths.xml file in the "camcorder-stereo" section, and reboot.
[Nexus 5 Android Development] onesolo:
Only today I tried this zip. After I flash via twrp, my phone begun boot loop ing/ I had to flash again and revert to stock.

The aroma installer says that the mod is from 5.1.1 . Can it be that cause for the boot loop??
[Nexus 5 Android Development] aeoveu:
When I tested it, I installed the simple mod (no noise suppression) and changed nothing else. It worked.

You sure you installed the simple mod?
[Nexus 5 Android Development] onesolo:
I flashed this file -->	Nexus5_m-preview2_MPZ79M_v0.1_audiofix_aroma.zip

Any suggestions?! I might try it again, but this time I'm going to make nandroid backup. Have to get some free space before that...
[Nexus 5 Android Development] chdloc:
If you are, indeed, running M-Preview 2, then you should be able to install the simple version of the mod that you linked to, i.e. the one without (or 0 dB) of noise suppression. The advanced mod, i.e. the one with either 6 dB or 12 dB of noise suppression will not work.
[Nexus 5 Android Development] Flyview:
Hey [MENTION=2760454]chdloc[/MENTION] would it be possible to add a handset only option for sidetone? I like the sidetone but I can't have it when talking on the phone in the car with the audio coming through the speakers as it starts to create a feedback loop and people can hear themselves talk.
[Nexus 5 Android Development] chdloc:
To be honest, I have not looked at the Aroma installer in any sort of detail as I've always installed and tested the mod manually. I will go through the installer and incorporate your suggestion when I update the mod for the final version of Android M.

Right now I'm busy trying to squeeze every last bit of audio quality out of the Qualcomm audio DACs/amps. I've detailed my first findings here. More to come on tweaking the amp and corresponding measurements.

Anyway, for now you can disable headphone/headset sidetone manually by replacing the entire "voice-headphones" device (from <path name="voice-headphones"> to its corresponding </path>) in mixer_paths.xml with its stock counterpart, i.e.,

<path name="voice-headphones">
<path name="headphones" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<ctl name="RX1 Digital Volume" value="84" />
<ctl name="RX2 Digital Volume" value="84" />
</path>
[Nexus 5 Android Development] luiscortex:
Hello, I think you solved my problem. I was looking for an audio interface or a microphone for cellphone because the AGC problem in videos. The distortion when we record a video is too much.

This modification will work in the 5.1..1. Lolipop version for Nexus 5 or only the 5.1 version?

I never used the aroma installer, so probably I will delay a little bit to understand fisrt this application and then install this moddification.

Tks a Lot again

---------- Post added at 06:42 PM ---------- Previous post was at 06:31 PM ----------

Oo god it really works, tks for sharing . Nowadays without a modification I am not abble to record neither an acoustic jazz concert.
[Nexus 5 Android Development] chdloc:
The version of the Aroma installer you quoted will work for both 5.1 and 5.1.1.
[Nexus 5 Android Development] FishDip:
This mod support LMY48I? Im facing "android is starting..." forever after intall this mod

--------------------------------------------------------------------

EDIT: Sry, i downloaded wrongly. Been using MOD "LRX22C_V2_1" just now.

Thanks alot for the file name too long where I've only realise after I view from PC.

Got it working now. Once again thanks for the MOD.
[Nexus 5 Android Development] Vipauer:
Anyone use this mod on version 5.1.1 (LMY48I)???

Thanks
[Nexus 5 Android Development] onesolo:
is there any file for M3 ??
[Nexus 5 Android Development] nmlssit:
I second that

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] chdloc:
Yes, this will work.

You can use the mod for Android 5.1. However, only the "simple" fix without noise suppression is currently compatible with any of the M-Preview builds. I will start working on full Android Marshmallow support as soon as the final sources drop.
[Nexus 5 Android Development] onesolo:
Nahhh, tried to flash again the last mod in M3 Preview, with only the simple fix, but no can do... it get's stuck on the boot animation... :\
[Nexus 5 Android Development] Vogie:
If It's a software issue solver, why Google didn't fix it ?!
[Nexus 5 Android Development] chdloc:
Did you try to install the (simple) mod with TWRP version 2.8.5.3? If so, the audio HAL must have changed between M-Preview 2 and M-Preview 3.
[Nexus 5 Android Development] onesolo:
Yes, the simple mod... But on Twrp 2.8.7.1

And you better put a notice on OP to not flash this on the M3 cause when I flash back to revert stock libs (that are not the ones from M3) I totally lost sound speaker!! Luckily I made a nandroid before and I only had to restore system (or need to flash system again on recovery)
[Nexus 5 Android Development] Wout2426:
I flashed this on chroma Lmy48m, and man, what a difference ! Went to appelpop yesterday sound was horrible. Went again today and shoot a video and had good sound. Thx !
[Nexus 5 Android Development] chdloc:
What I was trying to say is: flash the simple mod using TWRP 2.8.5.3.

Newer recoveries do not seem to play nice with the current Aroma installer. I will address this issue in a future update.
[Nexus 5 Android Development] Deviling Master:
Hello, I found this topic because after making a video of a concert, I found the audio quality very bad

The intro of the the main topic is very promising

So here we are...

Here you can find a sample video I made to understand the poor audio quality I'm facing.

The main problem to be seems related to the bass frequency range.

Can you tell me if the audio-quality problem discussed on this thread is related to my own? So I can understand if the provided fixes can be useful to me

My phone has Stock Rom 4.4.4 (build KTU84P)

Thanks guys
[Nexus 5 Android Development] Wout2426:
Exactly the problem I had on my nexus 5. Flashing this mod solved it. But I am on 5.1.1

Hear the difference.

https://drive.google.com/file/d/1SSdbxIb5X4_Vmk_Ne-wzdz13HBd4aXe1wA/view?usp=docslist_api

https://drive.google.com/file/d/1mLSbWkPYBXruD6DxFRU0ew764LxRilZnEg/view?usp=docslist_api
[Nexus 5 Android Development] onesolo:
sorry, but not going to flash an old twrp version for that... if Aroma doesn't play well on the last version of TWRP then, someone (I don't know who) has to fix that Aroma problem...
[Nexus 5 Android Development] sryverfx:
I don't believe it is a problem with the TWRP and Aroma, I used the Aroma installer with the latest TWRP version and it did work just fine on lollipop roms. I think the Aroma installer is installing the stock Lollpop libs by default or something like this even on M previews.
[Nexus 5 Android Development] cdonald:
FYI to all interested - the simple mod works just fine for me using MP3. FWIW, I'm also using the latest version of TWRP.

I'm using this deodexed version of MP3:

http://xdaforums.com/google-nexus-5/development/basicrom-t3198050

Didn't try it on any other MP3 rom, but I can attest to it working fine on the above rom.
[Nexus 5 Android Development] gaz41:
Which version should I use on my Nexus 5? I'm on 5.1.1 LMY48M.

Thanks
[Nexus 5 Android Development] Wout2426:
I'm on LYM48M, Chroma 5.1.1 and I used the v1.1 version and it did the trick
[Nexus 5 Android Development] Jacktheskipper:
Alright: I'm on LYM48M now and used the Aroma Installer 1.1, simple fix and kept everything standard. Works like a charm. Thanks so much, have been searching for a solution since I got my Nexus 5. Came from i900 with Voodoo Sound and that always was bothering me. Will test in loud enviroment as soon as possible.
[Nexus 5 Android Development] chdloc:
Glad it's working for you. You may want try to install and play with the "advanced" fix with 6 dB of noise suppression and aMGC (see OP) as you quite possibly need to lower the microphone gain in loud environments.

Without visual feedback, which aMGC provides, it is impossible to set a reasonable microphone gain and be confident that the recording is not irreparably ruined due to bad signal clipping. You could also go back to the Aroma installer from within your recovery and lower the microphone gain from there. By doing this you would be flying blind, though, and need to experiment which level of gain is appropriate for a given acoustic environment.

Please make a full backup prior to installing the advanced fix as I have not tested the mod on Android versions newer than LMY48B. I will pick up the development again when Android Marshmallow drops.
[Nexus 5 Android Development] Jacktheskipper:
Alright, thanks a lot! I will give it a try, but wouldn't it be enough to just flash system.img again anything goes wrong in the process?
[Nexus 5 Android Development] Gongadin:
Flashed it to stock Android LMY48M, and works like a charm. Sound quality from both the camcorder and Parrot (sound recorder) is mounds better than before. The only problem I'm having now since I flashed it, is wakelocks. It seems that while Bluetooth is on, it keeps the phone awake and won't go into deep sleep now. Once I shut Bluetooth off, the phone goes into deep sleep. I typically always leave Bluetooth on so it syncs with my FitBit and my car, and it never had deep sleep problems before. I tried running the installer again to go back to stock settings, and still had the wakelock issue. I did try and disable "hotword from any screen" but same thing. I'm currently doing a clean wipe and fresh install of LMY48M, and I'll try to flash this again to see if I get the same results.

Thanks for your work. My camcorder is awesome again!

Rooted, xPosed installed, Gravity Box only module, TWRP 2.8.7.1
[Nexus 5 Android Development] chdloc:
Yes, flashing system.img would get you back to stock.

Did you install the "simple" or the "advanced" fix? If you installed the advanced fix, are you also running aMGC?

Only aMGC (via Tasker or standalone app) has even a theoretical chance to keeping your phone awake (only) while Bluetooth is enabled. If you are not running aMGC and you were able to pinpoint your phone not being able to go to deep sleep due to this mod, I would assume some sort of interaction with xposed.
[Nexus 5 Android Development] Gongadin:
I installed the advanced fix (6dB drop) but did not install aMGC. I did set the mic to stereo incoming, but mono output. I did a bunch of searching and didn't find any other instance of wakelocks with this mod, so I figured it was a stretch, but figured I'd post to see if there was an "Ah HA, I know exactly what that is" moment. I'll dive into Gravity box and see if there are any Bluetooth specific settings that may have struck a nerve with my phone too. Maybe I'll reflash this with Bluetooth turned off this time(??) Why not, worth a shot...

Thanks for the reply
[Nexus 5 Android Development] Tagtag123:
Anything for xtrasmooth mp44al?

I like the DP3 for 5ghz hotspot and it feels faster.

But I miss this nod a lot, without it the camcorder is pretty much useless.
[Nexus 5 Android Development] gerd99:
I can attest to that. I have the fix also just flashed. I left all the default settings. When flashed default, the wind noise is still extreme. If a user other settings tried?

I would be happy to try out over others :)
[Nexus 5 Android Development] eddie_gordo:
Here we go again, guys... Android 6.0 is out, has anyone tried this mod yet? :)
[Nexus 5 Android Development] chdloc:
The current mod does not work on Marshmallow. You will have to wait for a new build which should be available in a few days.
[Nexus 5 Android Development] Tarcis:
M-Preview: The "simple" fix (without noise suppression) offered by this Aroma installer should work any of the M-Preview builds. The "advanced" mod, however, is incompatible with M-Preview builds.

Not even with this build chdloc?
[Nexus 5 Android Development] darjan86:
Has anyone checked if the audio recording quality is better in the 6.0?
[Nexus 5 Android Development] gerd99:
Thanks for the information :good: :)
[Nexus 5 Android Development] chdloc:
You can try, but make a backup first as the "revert to stock" option will wreck havoc for sure.

The audio HAL (which is needed for the simple mod) and audoflinger (which is additionally needed for the advanced mod) have undergone significant changes. I cannot easily tell whether the new HAL is backwards compatible.
[Nexus 5 Android Development] chdloc:
First baby step toward a mod working on Marshmallow

If you guys would like to get this project off the ground for Marshmallow, I'd like to ask an advanced user to test two libraries for me. As I'm running an additional mod on my phone which will also require me to modify the kernel, I have not updated my phone to Marshmallow yet.

I just finished a vanilla AOSP build of Marshmallow (android-6.0.0_r1). The problem we had with the M Previews was that a straight AOSP build of audioflinger would cause a boot loop.

I have attached two (compressed) libraries, the audio HAL (audio.primary.msm8974.so which goes into /system/lib/hw) and audioflinger (libaudioflinger.so which goes into /system/lib). Again, they are both unmodified libraries which resulted from an AOSP build. Please replace (after making a backup) the audio HAL first (with 644 permission) and reboot your phone. Does it boot OK? If it does, please replace audioflinger (again with 644 permission) and reboot. Does the phone still boot?

Thanks!
[Nexus 5 Android Development] Tagtag123:
The phone booted fine but the camcorder audio is still bubbly.

I did replace both files and chmod 0644.
[Nexus 5 Android Development] chdloc:
Thanks for testing! This is a good first step towards our goal.

BTW, the audio is still "bubbly" as the libraries you tested are -- or at least should be -- identical to the stock ones.

I'll now work on merging the mod with the new source code. As there are significant changes in Marshmallow I hope I will not be forced to re-architect the fix...
[Nexus 5 Android Development] onesolo:
By the way, the recording sound problem still exists on stock 6.0 right?
[Nexus 5 Android Development] eddie_gordo:
Just to drop here a "thank you" for your (and the guys who are helping) dedication on this. I felt that the "Thanks" buttons on your posts weren't enough. :)
[Nexus 5 Android Development] chdloc:
Camcorder mod for Marshmallow (Android 6.0.0 and 6.0.1)

This post is a placeholder for all camcorder mods that work on Marshmallow. Both the mod itself -- as a flashable zip based on the great work by [MENTION=3163883]spacetaxi[/MENTION] -- and aMGC are posted here. More details on aMGC (assisted manual gain control) are provided in the OP. Note that you will only need to install either the aMGC apk or the Tasker project from the attached archive if you selected aMGC support in the Aroma installer.

Changelog

:

v0.9: initial revision (October 7)

v1.0: added aMGC support (October 8)

v1.01: aMGC only -- fixed a problem that may prevent the aMGC UI to appear in some configurations (October 20, aMGC)

December 9: added support for Android 6.0.1, build MBB29K
[Nexus 5 Android Development] Moscha:
[MENTION=2760454]chdloc[/MENTION]

Fantastic work! Previously I tried only the simple fix, but the whole modification (stereo speakers etc. are really cool)! <- on the other side a shame that Google didn't fix the camcorder issue meanwhile...

One "small" question:

Could this be also implemented in CM 12.1?

I already seen the link in the first post to the files (simple fix), but the files seem to be differently in the meantime. And the other mods would also be really cool to have.

gesendet von meinem Androiden mit Tapatalk