yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Android Development] chdloc:
(You did max out the alarm volume in settings, right?)

Am I right in assuming that you installed the version of the mod that enables stereo playback with its default values?

If so, then levels are expected to be lower, but not necessarily alarm volume vs. notifications volume.

There are a few things you can do:

increase the playback gains of the two loudspeakers either via the Aroma installer or directly by editing mixer_paths.xml; you may end up distorting the earpiece speaker

try different alarm sounds; some will be perceived as being louder than others

copy your favorite alarm sound to your PC and use a program like Audacity to apply some gain; it will sound louder, but more distorted

install the mono version of the mod, thereby going back to stock audio playback behavior

Stereo playback still works. Do you have any other audio mod installed? Please post your mixer_paths.xml file for analysis.
[Nexus 5 Android Development] chdloc:
From your (incomplete) mixer_paths.xml it is clear that my mod is not installed on your device or that you have installed some other audio mod on top of the camcorder mod.

Please re-install the mod from the Aroma installer.
[Nexus 5 Android Development] aeoveu:
That's odd - I thought it was complete. Oh well.

I've tried to install the mod (I'm using the aroma installer). I've reflashed my system twice, but in vain.

Which is weird, since I only noticed this a few days ago (but only managed to post it now).

Can anybody else check whether its working on their 5.1 bone stock (but rooted, and with a custom recovery)? I'm running out of ideas.

Edit: forgot to say I don't use any other audio mods - yours is the only one I have (since I don't download mods, nor do I go on a flashing rampage).

The only thing I can think of is this: when I was on 5.0.1, the mod worked. When I came to 5.1, I kinda recall it working...until a few days back, when I wanted to disable the mod and reflashed the system (I used the aroma installer to disable the mod, and flashed the system.img file separately). Since then, it hasn't worked.
[Nexus 5 Android Development] chdloc:
Make sure you have sufficient space on /system. With Android 5.1, the system partition is bursting at its seams.

Another option is the version of recovery you are running. You may need to go back to an older version of your custom recovery. If all fails, you can always install the mod by pushing the files manually. It is really not all that hard. Detailed instruction on how to do it can be found in the README file inside the archive attached to the OP.
[Nexus 5 Android Development] aeoveu:
My system partition has 9mb free right now, so that shouldn't be a problem. Recovery is another variable that changed - I'll try falling back to another recovery and post back.

Edit: while I go fetch another recovery, I saved the install log this time of the zip file, and this may appear to be of some interest to you, [MENTION=2760454]chdloc[/MENTION]:

---

AROMA Installer version 2.70RC2

(c) 2013 by amarullz xda-developers

ROM Name : chdloc's Audio Fix

ROM Version : LMY47D v1.1 for Android 5.1

ROM Author :

Device : Nexus 5

Start at : Mon Mar 30 07:17:16 2015

-> Initialising....

-> Please Wait....

Mounting system...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

Mounting data...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

-> Installing camcorder audio fix...

Extract: /system/etc/media_profiles.xml

Extract: /system/etc/mixer_paths.xml

Extract: /system/lib/hw/audio.primary.msm8974.so

Extract: /system/lib/libaudioflinger.so

Extract: /system/lib/soundfx/libaudiopreprocessing.so

Extract: /system/vendor/etc/audio_effects.conf

Extract: /system/lib/hw/audio.primary.msm8974.so

-> Activating 6 dB noise suppression...

Extract: /system/lib/libaudioflinger.so

Extract: /system/vendor/etc/audio_effects.conf

Extract: /system/lib/soundfx/libaudiopreprocessing.so

-> Setting selected configuration...

Extract: /tmp/audiofix_config/config.sh

about to run program [/tmp/audiofix_config/config.sh] with 10 args

/tmp/audiofix_config/config.sh[46]: expr: not found

-> Setting mic gain to ...

-> Activating stereo camcorder audio (micro-usb to the right)...

-> Setting camcorder audio bitrate to 96 kbps...

-> Activating stereo playback (micro-usb to the right)...

/tmp/audiofix_config/config.sh[63]: expr: not found

-> Setting ear-speaker gain to ...

/tmp/audiofix_config/config.sh[63]: expr: not found

-> Setting bottom-speaker gain to ...

Setting permissions...

Unmounting data...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

Unmounting system...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

Installation complete!

script result was [1]

Installer Sucessfull (Status 0)

End at : Mon Mar 30 07:17:17 2015

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

Edit 2: downgrading TWRP worked. I was on 2.8.6.0, and downgrading to 2.8.5.3 let me flash the zip successfully (cause I now have the stereo speakers). The install log still threw a few errors though.

I guess hold off from the newest TWRP recovery if you want to use this mod. Thanks! :)
[Nexus 5 Android Development] chdloc:
Thank you for your debugging efforts!

It, indeed, seems that TWRP 2.8.6.0 does not play nice with the current Aroma installer. From the logs that you sent it appears that the latest version of TWRP does not offer busybox. For now I will just wait and see whether a point update to TWRP brings busybox back. If not, I'll update the Aroma installer to reflect that change.

For now, do not use TWRP 2.8.6.0 if you want to install the camcorder mod.
[Nexus 5 Android Development] onesolo:
2.8.6.0 is tottaly broken!!!

Avoid that at all costs!!! Had to go to previous version to be able to intall things...
[Nexus 5 Android Development] aeoveu:
Well - here's the log I saved from TWRP 2.8.5.3:

-----------

AROMA Installer version 2.70RC2

(c) 2013 by amarullz xda-developers

ROM Name : chdloc's Audio Fix

ROM Version : LMY47D v1.1 for Android 5.1

ROM Author : <support@amarullz.com>

Device : Nexus 5

Start at : Mon Mar 30 07:17:16 2015

-> Initialising....

-> Please Wait....

Mounting system...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

Mounting data...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

-> Installing camcorder audio fix...

Extract: /system/etc/media_profiles.xml

Extract: /system/etc/mixer_paths.xml

Extract: /system/lib/hw/audio.primary.msm8974.so

Extract: /system/lib/libaudioflinger.so

Extract: /system/lib/soundfx/libaudiopreprocessing.so

Extract: /system/vendor/etc/audio_effects.conf

Extract: /system/lib/hw/audio.primary.msm8974.so

-> Activating 6 dB noise suppression...

Extract: /system/lib/libaudioflinger.so

Extract: /system/vendor/etc/audio_effects.conf

Extract: /system/lib/soundfx/libaudiopreprocessing.so

-> Setting selected configuration...

Extract: /tmp/audiofix_config/config.sh

about to run program [/tmp/audiofix_config/config.sh] with 10 args

/tmp/audiofix_config/config.sh[46]: expr: not found

-> Setting mic gain to ...

-> Activating stereo camcorder audio (micro-usb to the right)...

-> Setting camcorder audio bitrate to 96 kbps...

-> Activating stereo playback (micro-usb to the right)...

/tmp/audiofix_config/config.sh[63]: expr: not found

-> Setting ear-speaker gain to ...

/tmp/audiofix_config/config.sh[63]: expr: not found

-> Setting bottom-speaker gain to ...

Setting permissions...

Unmounting data...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

Unmounting system...

about to run program [/sbin/busybox] with 3 args

run_program: execv failed: No such file or directory

run_program: child exited with status 1

Installation complete!

script result was [1]

Installer Sucessfull (Status 0)

End at : Mon Mar 30 07:17:17 2015

----------
[Nexus 5 Android Development] chdloc:
Are you sure that's the correct log? The log you just shared (allegedly from TWRP 2.8.5.3 which does have busybox) is identical -- including time stamp -- to the one you posted above (from TWRP 2.8.6.0, which does not have busybox).
[Nexus 5 Android Development] aeoveu:
Which is why I said its weird I was getting errors on that recovery too. :)

I'll try reflashing the mod again, and paste the log here.
[Nexus 5 Android Development] Hinkelstein_1976:
aMGC

Great Mod! It works so far on my Nexus 5 with System-Image 5.1.0 (LMY47I).

I use the aMGC-Feature and have one problem with it:

When I start the camcorder, the + and - buttons appears and I can see the gain-volume on the LED (green, orange, red). So far all seems to work properly.

When I press on the + or - button, the gain will correctly be adjusted, but the LED stays at green and don't changes anymore. So I can't see, if my volume level is good or my recording is distorted.

I'm the only one who has this problem?

Thanks in advance and keep going on the good work!

Sorry for my bad english.
[Nexus 5 Android Development] chdloc:
When you hit the up or down arrows, do you see the number that is shown in between the arrows change (on the average) with you hitting the up or down arrows? While you check for that run

logcat | grep microphone

in an adb shell. The numbers are constantly being refreshed (up to five times a second). Do the numbers flying by change (on the average) with you modifying the gain?

The most definite way of telling whether the gains are changing is to check the mixer in an adb root shell

tinymix | grep "ADC1\ Volume"

Does the number that is returned with each gain interaction change?
[Nexus 5 Android Development] Hinkelstein_1976:
Ahh, I think I've seen the problem. logcat | grep microphone updates as long as I don't press + or - button. Yes, I see the gain-value for short time between the buttons. When I press + or -, the logging stops.

If I try "tinymix | grep "ADC1\ Volume"" I get the error "/system/bin/sh: tinymix: can't execute: Permission denied" and I think thats the problem, right?

---------- Post added at 11:56 PM ---------- Previous post was at 11:49 PM ----------

I give x right for all. Now I get the error

1|shell@hammerhead:/ $ tinymix | grep "ADC1\ Volume"
tinymix | grep "ADC1\ Volume"
Failed to open mixer

???
[Nexus 5 Android Development] chdloc:
If logging stops, that would mean that either libaudioflinger died or that for whatever reason the system decided to bypass the effects processing engine. Are you observing this behavior consistently?

I have not come across either scenario. The only circumstance that would (barely) explain the issues you are seeing is if you had hotword detection on any screen enabled. Please check for that.

Actually, the problem is that you need to execute tinymix as root, otherwise you would not be able access the mixer interface.

Type "su" into your adb shell before executing tinymix.
[Nexus 5 Android Development] chdloc:
So you are not using the Google Launcher, aka the "Google" app? Both the launcher and Google Now come preinstalled.

If you are running the Google Launcher, there is a "Google Settings" app in the app drawer.

Start that app and navigate to "Search & Now" -> Voice -> "Ok Google" detection -> [disable "From any screen]

Thanks for the detailed logcat! This is helpful.

The part in red is what originally confused me. After interacting with the aMGC UI it seems that the microphone is switched off altogether, i.e. in_snd_device(0:none).

I believe I found the problem:

Please disable "Touch sounds" in Settings -> Sound & notification -> Other sounds

and try again. It seems that this setting has the same effect as hotword detection from any screen in that it disables microphone effects processing which aMGC and noise suppression depend on.
[Nexus 5 Android Development] Hinkelstein_1976:
I use the Nova Launcher. Ahh, Google voice detection was on, from every screen was switched off.

I disabled Touch sounds and now it works!

But is there any way to fix this by your side, that I can enable the click sound again?

Thank you for your investigations!
[Nexus 5 Android Development] chdloc:
I have not looked at this in great detail yet, but my gut feeling is that I would have to change the approach on when my code gets activated.

To get around the problem with hotword detection and touch sounds I probably have to have my code running constantly which may result in nasty interoperability issues.
[Nexus 5 Android Development] Hinkelstein_1976:
Ok, this is a bad idea I think.

Ok, I have deactivated the click sound. I can live with this ;) By the way: Is the click sound not the default? I don't know it anymore, because one thing that I always disables first is the vibration after each touch. I don't like it ;) Can you add this hint for the other people? Strange that I'm the only (first?) one who had this problem...
[Nexus 5 Android Development] winamp26:
Can I flash last build on 47i?!

Sent from my Nexus 5
[Nexus 5 Android Development] tuningsea:
Yes u can
[Nexus 5 Android Development] giosaxda:
I'd like to change microphone gain values in the mixer_paths.xml file.

Exactly which lines should I change the value for DEC6 variable?

are the lines "voice-rec-mic" and "camcorder-mic" or something else?

Thanks.
[Nexus 5 Android Development] chdloc:
It depends on which option(s) you selected during the installation. Look for the tag "voice-rec-mic-mod". You will find the DEC6 gain setting either within in this tag field or within a tag field called " camcorder-stereo".
[Nexus 5 Android Development] ShinSgo:
Hi guys,

I have returned to kitkat, I don't like lollipop, much battery drain.

For kitkat I installed the aroma version from the second post (Nexus5_4.4.4_AOSP_audiofix_v7_aroma.zip), but I saw that doesn't contains the stereo plugin.

There are other aroma version for kitkat with stereo plugin?

Thanks in advance!
[Nexus 5 Android Development] chdloc:
There is currently no Aroma version of the installer for KitKat available that offers support for stereo playback.

All you need to know to add stereo playback to your mixer_paths.xml file manually is written up here.

I have dropped KitKat support from further development as I'm not running it anymore myself and I'm reluctant to throw completely untested stuff over the fence. Let me ask, however, would there be more folks interested in an updated Aroma installer for KitKat?
[Nexus 5 Android Development] dakore:
I doubt there will be enough people since big majority is on LP.

Today I'm also here to download KK version :)
[Nexus 5 Android Development] kaikupascual:
The fix for CyanogenMod 12 (Android 5.0) work on CyanogenMod 12.1 (Android 5.1) I try and work correctly:good:
[Nexus 5 Android Development] ShinSgo:
yeah... I know, is normal, most people have LP, but for me.. after trying and trying LP stock, LP 5.1, cyano 12... etc, Honestly, I prefer kitkat, but no problem, I can integrate it manually.

Thanks!
[Nexus 5 Android Development] Flyview:
Hey [MENTION=2760454]chdloc[/MENTION] , slightly off-topic since this thread is all about audio, but what do you think about increasing the image/video bitrate for the camera on the Nexus 5? Have you done this for yourself?
[Nexus 5 Android Development] chdloc:
I have never looked into the tradeoffs of changing the video bitrate (quality vs file size). By default, videos taken with the rear camera @ 1080p clock in at 17 Mbit/s, but can be increased all the way up to the maximum specified Blu Ray bitrate, i.e. 40 Mbit/s, with an easy edit of /system/etc/media_profiles.xml

This may be a worthwhile study. Any volunteers?
[Nexus 5 Android Development] LegobrandonCP:
My apologies for an ignorant post and question. My N5 on stock 5.1 Lollipop has the same audio issue, so I flashed this zip and it fixed it. I used the simple version since I had no clue what I was doing.

So what are the best/most optimal settings when installing the zip? I just used the default ones in the Aroma installer. I also selected the options with speakers facing to the right, since I holy my phone in that orientation.
[Nexus 5 Android Development] chdloc:
I'm not sure there are any "best" settings. It all depends on how you use your camcorder and how you weigh distortion as a result of noise suppression vs. white noise in your recordings.

One fundamental question you need to answer is whether you occasionally record in very noisy environments (concerts, clubs, cars, etc).

If you do, you may want to install the advanced mod with moderate noise suppression as this would be a prerequisite to run aMGC. aMGC allows you to adjust the microphone gain on-the-fly as needed. All other settings depend on your own personal preferences. I personally run the advanced mod with 6 dB of noise suppression (12 dB of noise suppression introduces too much distortion for my taste) as well as stereo recording and stereo playback using the default values. (I'm also running the telephony sidetone mod, which has nothing to do with the camcorder.)
[Nexus 5 Android Development] Flyview:
I'll try it out. Would this be something that would have to be re-done after installing the audio mod with the Aroma installer? I suspect that also changes media_profiles.xml.
[Nexus 5 Android Development] chdloc:
Yes, you would have to manually edit media_profiles.xml after the installation of the mod as it will be modified in most configurations. Keep us posted on the results you are seeing with a higher video bitrate. If it makes sense I will give you guys the option of adjusting the video bitrate via the Aroma installer in a future update.
[Nexus 5 Android Development] embql:
I really really really can't find the shellscripts tar.gz archive anywhere - other than that, I'm pretty much 100% set up for aMGC -- where did i take a wrong turn? :)

---------- Post added at 09:17 PM ---------- Previous post was at 08:35 PM ----------

Everythings working now - Thanks for this awesome mod. Trying it out at a DJ gig tomorrow - I can eventually post my experiments for you to hear, if interested? Stereo recording at max bitrate with aMGC should be good!

Running NX5, Rooted 5.1 Stock ROM, ElementalX Kernel.
[Nexus 5 Android Development] aeoveu:
*raises hand in class and screams* YES, PLEASE!!! [emoji5]
[Nexus 5 Android Development] chdloc:
Yes, please do share.

Keep in mind that the red LED is your enemy...;)
[Nexus 5 Android Development] archish:
[MENTION=2760454]chdloc[/MENTION]

I am trying to understand tinymix and appreciate any help from you. When I am using skype i find the mic to be bit distorted like when the speaker volume is set too high and it sounds distorted, I am not sure how to change the volume or gain of the mic used for skype? Is there anyway to know which channel is being used for skype calls and how I should change the tinymix?

Thanks!
[Nexus 5 Android Development] chdloc:
To find out which device is being used by Skype run the following adb command right after you have completed a Skype session:

logcat | grep select_devices

The last "in_snd_device" entry will tell you which microphone device was being used. That string corresponds to a string in mixer_paths.xml.

There is typically a "DEC Volume" settings associated with it (either DEC4 or DEC6) which you can tweak with tinymix. However, gain modifications made with tinymix are only valid for the currently active audio session. You either need an automation app like Tasker to modify the gain with each Skype call (non-trivial but possible)

tinymix "DECX Volume" Y

where X is either 4 or 6 and Y is between 0 and 124, or modify mixer_paths.xml directly/permanently.
[Nexus 5 Android Development] al89nut:
Stupid to ask I know, but having downloaded it, then what?
[Nexus 5 Android Development] chdloc:
Have you installed it? If not you need to copy the zip file to your phone, e.g. /sdcard/, and flash it via a custom recovery such as TWRP. The installer will give you a few options which should be explained in the OP.
[Nexus 5 Android Development] chdloc:
Qualcomm audio codec IIR hardware filtering demystified!

The topic of IIR hardware filtering via the Qualcomm audio codec has matured enough to warrant its own thread
[Nexus 5 Android Development] marquimsp:
chdloc, you know what will happen next, right?

Will you please post a mod to compensate the frequency response of my SE535 and my SE215?

LOL just kidding, but I can predict requests like this for all IEMs in the market sooner than later.

cheers!
[Nexus 5 Android Development] chdloc:
(Hmm, I should charge $25 per filter design then, huh? ;) )

I'm currently writing an Octave (free Matlab alternative) script with which folks can design their own filters.

I plan on releasing it to the wild after I've had some time to play around with it once I get my IE80 back (currently being serviced).
[Nexus 5 Android Development] embql:
duh

Sorry guys - The party was a big one ( pics can come when i can post outside urls.. ) , but I couldn't get it to work - only to find out the next day, that i had to 'activate' the aMGC by starting the apk, it didn't start itself..

Next time I'll try it out! I promise ;) Setting tasker task asap to start aMGC whenever phone or camera starts - that's the best/easiest thing to do, right? :)

regards
[Nexus 5 Android Development] chdloc:
Since you have Tasker installed I'd recommend you import the Tasker project as described in the OP, and in more detail in the README file that's tucked away in the archive attached to the OP. If you go the Tasker route -- easier to debug if problems occur and you will have a chance to notice if Android decides to kill Tasker for memory management -- uninstall the app first. If you prefer to keep the app, then you generally only have to run it once (nothing will happen as the app is really a service). Afterwards, it should autostart every time your phone boots.
[Nexus 5 Android Development] dakore:
I haven't found any post related to Zello PTT aplication in this thread. Yesterday I've instaled it and had to use... unfortunatelly, I kept getting "can't use microphone" message inside the app. Actually, only first message could be recorded and sent. Every other message was silent... after several silent messages the Zello app started to pop error message mentioned above. After rebooting it is the same.

My setup is

Slimkat 9.0 stable + Nexus5_4.4.4_AOSP_audiofix_v7_aroma

I've checked 6dB option and dual speaker config. I don't use aMGC and tinymix.

Later I've tried Zello with lollipop and Nexus5_5.1_LMY47D_v1.1_audiofix_aroma with same setup as above. Zello was working fine.

Then I reverted stock Kitkat audio libs through aroma installer and Zello finally worked out on Slimkat.

Does Kitkat mod/libs have such kind of "limitation"? Is there any workaround to keep dual speaker configuration and not loosing microphone functionality?

EDIT: Solved! I've flashed simple KK mod (first option in aroma, not 6 or 12dB mod), and kept dual speaker configuration. As soon as I flash 6db mod - microphone in Zello app becomes dead.
[Nexus 5 Android Development] chdloc:
The changes that I made for KitKat and Lollipop are virtually identical. My guess is that Zello does not behave the same way on KitKat as it does on Lollipop in terms of requesting/using the noise suppression audio effect. To find out, you could run

logcat | grep NOTE

while working with Zello in both scenarios and post the results.

Assuming that you would like to keep both the audio mod and Zello installed you can do two things:

switch to Lollipop, which is the only version actively supported as I'm not running KitKat anymore

install the simple mod (without noise suppression) on KitKat
[Nexus 5 Android Development] chdloc:
FYI