yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Android Development] 21plays:
Selected options

I did not try the headphones and I also did not lower the volume. I simply changed my options and the problem went away. The Only thing I changed was the Audio Bitrate, changed it to 224 from the max 288 and then to 160 from 224

I used:

Noise Suppression 6db, kept the 6db

Mic gain 103 - kept the 103

Audio Bitrate 288 - Then changed to 224(rarely was the distortion heard) So then I changed to 160 which gave me no problems, albeit it wasn't as loud as 224 :(

Ear speaker Gain Default 90

Bottom Speaker grill default 82

I had no such problems with Daniel's settings built into his xtrsmooth rom, I wonder if I could get the settings he used in his rom. Another thing is that Optipop rom(currently using) is Lollipop 5.0.2 LRX22G. I do not know if the things that matter for this mod were changed from 5.01 to 5.02
[Nexus 5 Android Development] chdloc:
There's placebo going on. The audio bitrate has only an effect on camcorder recordings. It has absolutely nothing to do with playback. (Disregard this comment if you were referring to camcorder audio above). In either case, audio bitrate has almost immeasurable effect on gains.

I'm wondering where the kernel you are using cranks up playback gains internally.

In that case you may need to lower the loudspeaker gains from 90/82 to something lower. You will need to experiment a little.
[Nexus 5 Android Development] 21plays:
Ok thanks. I will try to lower ear speaker gain and raise the bitrate. I am using UBER Kernel Sabermod(if that tells you anything) I'm sure I can head on to that forum and ask about the playback gains but I will simply experiment for now. Thank you for this awesome mod
[Nexus 5 Android Development] cdonald:
I tested this mod with the camcorder fix and stereo playback enabled (chdloc's default values) on optipop and uber SM 4.9.3 and had no issues with distortion or anything like that at all. I'm not sure what you're issue may turn out to be, but felt it may be worth noting that I had no issues with this set-up
[Nexus 5 Android Development] 21plays:
So you left the bitrate at max? (chdloc's default values). I did some more tests and found that the noise only comes from one app, Farfaria. Thank you for your input by the way. Puts me at ease)
[Nexus 5 Android Development] cdonald:
Yep, and it worked fine with all of the apps I tested, granted "Farfaria" wasn't one of them
[Nexus 5 Android Development] 7sen:
plz what is the best set up for aroma to get good Camcorder Audio Quality and Good and boost speaker sound and mic rec i am not sure about the gain value plz anyone !

i am on catalysm 24oct and code blue kernel ;)
[Nexus 5 Android Development] tuningsea:
@up for me

5.Install Audio Fix - stereo - advanced (6 dB): stereo, 6 dB noise suppression, bitrate 288 kbps (95mic Gain)

---------- Post added at 12:02 AM ---------- Previous post was at 12:00 AM ----------

Test http://youtu.be/anfLOkM-Epk

---------- Post added at 12:02 AM ---------- Previous post was at 12:02 AM ----------

Great bass and stereo work <3 im on nx5 rom
[Nexus 5 Android Development] moropazzo96:
work for me!

This is very good!
[Nexus 5 Android Development] humzaahmed155:
I don't know if this has been addressed already but Snapchat video recording seems to break sometimes or stops recording before the time limit. Any ideas?
[Nexus 5 Android Development] chdloc:
Here are my ideas:

Are you sure you don't have these issues without the mod in place as well?

Issue the following command from the Android shell, once when things go well and once when things go south, and post the respective output here

logcat -v time | grep NOTE

(you may need busybox for this command to work).

Are you running the mod with noise suppression?

If so, try flashing the "simple" mod without noise suppression and try to reproduce the problem.
[Nexus 5 Android Development] krneki10:
[MENTION=2760454]chdloc[/MENTION] are there any news on AGC? Or is the best solution still with the Tasker that you mentioned in #306 post?
[Nexus 5 Android Development] humzaahmed155:
It turned out to be bitrate. Stock settings fixed Snapchat.
[Nexus 5 Android Development] chdloc:
I will not release the AGC option as offered by webRTC as it causes more harm than good.

However, the aMGC option mentioned earlier is almost ready for release. I'm still trying to use a Tasker feature that allows to export Profiles/Tasks as standalone apps to make the whole process more user-friendly.

If you guys want I can release a version that requires Tasker in time for New Years Eve parties...;)

That's odd, but good to know.

What bitrate were you trying to use and with "stock settings" are you referring to the mod's default (288 kbps) or Android's default (64 kbps)?
[Nexus 5 Android Development] humzaahmed155:
I was trying to use 288kbps, but ended up having to go for 96kbps since the recordings were hitting the file size limit way too quick (about 3 seconds)
[Nexus 5 Android Development] krneki10:
That would be really awesome, there's no hurry though. Take your time, quality over speed ;)
[Nexus 5 Android Development] AvivEliyahu:
There is no fix for aosp based roms (version 5.0.2) ? i really love aosp but this audio fix is a deal breaker
[Nexus 5 Android Development] chdloc:
This fix *is* based on AOSP (5.0.1). I have not bothered to base the fix on 5.0.2 as it likely only has Nexus 7 specific updates.

There is a good chance that my fix works on any AOSP (Lollipop) based ROM as long as the developer has not modified the audioflinger service. The only (quick) way to find out is to flash the mod and test.

If you get a boot loop, then audioflinger has likely changed. If you run into no-audio scenarios you likely only need to manually adapt mixer_paths.xml
[Nexus 5 Android Development] AvivEliyahu:
Took a chance and flashed.. Working great. But speaker sound is too low even when I set speaker sound to 95. After reboot it's loud but after few seconds (around 15) it's back to low (or stock..) pic related
[Nexus 5 Android Development] chdloc:
Which mod did you install?

What you are describing should have nothing to do with my mod. Do you have any other audio mods installed?

Also, what is your kernel and ROM?

Please also post logcat and kernel messages around the time the level change happens as they may contain important clues.
[Nexus 5 Android Development] AvivEliyahu:
I suspect it's the kernel (first time using it - named sabermod or smth) because it has faux sound and I still can't disable it with all the effort I put in . Will check the volume using another kernel
[Nexus 5 Android Development] moropazzo96:
Work for me, good job! :good:
[Nexus 5 Android Development] AvivEliyahu:
Yep, it was kernel related all working great now! One last question - where can I increase the earpiece volume so I'll have a louder sound when in call?
[Nexus 5 Android Development] chdloc:
You need to edit (or add) the "RX1 Digital Volume" entry in one of two devices in mixer_paths.xml.

If you are on T-Mobile US (and possibly affiliated carriers), add the Volume entry with a value

of more than default value of 84; 87 in this example (+3dB ):

<path name="voice-handset-tmus">
<path name="handset" />
[COLOR="Red"]<ctl name="RX1 Digital Volume" value="87"/>[/COLOR]
</path>

On any other carrier, increase from the default value of 84; 87 in this example:

<path name="voice-handset">
<path name="handset" />
<ctl name="RX1 Digital Volume" value="[COLOR="Red"]87[/COLOR]" />
</path>

In order to find out which of the two devices to edit, type the following line into an

adb shell while making a phone call

logcat | grep audio_hw_primary

Look for the last line that says "select_devices: [...]"

Important notes:

I would not go past 90 as the distortion would be too high.

even more important: a higher playback gain could lead to low microphone levels sent to the far-end.

I would highly recommend against changing default levels in case you (or anybody else reading this) is wearing an hearing aid
[Nexus 5 Android Development] krneki10:
Guys what are your recommended settings for camcorder_audio_fix_plus_stereo_playback_LRX22C_v1.tar.gz?
[Nexus 5 Android Development] geison66:
I test in my n5, and the result is fantastic!

Thx for fix.

:laugh:

Thx for made this zip!

Works fine

;)
[Nexus 5 Android Development] dakore:
Just to double check, is aMGC compatible with Kitkat and/or Lollipop stock roms?
[Nexus 5 Android Development] chdloc:
Lollipop only.
[Nexus 5 Android Development] indigobv:
I couldn't make it work. Nothing appears when I start the camera, or when I start recording, even though there is a toast message saying: "CamcoderMGC has been granted superuser permissions for an interactive shell".

I did everything mentioned in prerequisites list. And on top of that, I tried removing the mod (latest "advanced" camcorder audio mod) and flashing it again, I checked if busybox works, I checked if Accessibility is on for the app (CamcorderMGC), I tried tapping manually the app in case it did not start correctly, rebooted a few times, nothing worked. I have Android 5.0.1 stock.

I am curious though if anyone else managed to make it work, or it's something that I have that does this.
[Nexus 5 Android Development] chdloc:
It was my fault. The shell scripts necessary to make the whole thing work are missing. Please revisit my post above.

I'll try to incorporate all necessary files into the apk in a future update.
[Nexus 5 Android Development] indigobv:
It works! I haven't found any bugs yet.

If you need anything tested, just let me know.

Thanks! ;)
[Nexus 5 Android Development] adnan.selimagic:
How did you make it work ?

I did all the steps in prerequisites list...installed apk, latest busybox, enabled service CamsoderMGC in Accessibility, copied tinymix to /system/bin, copied shell scripts to /data/local/tmp/camera

When I start Google Camera I get toast message but there are no any buttons on the screen :(
[Nexus 5 Android Development] chdloc:
Have you set all permissions for tinymix and shell scripts to 744? Also, the 'camera' directory needs to have the 744 permission
[Nexus 5 Android Development] adnan.selimagic:
Yes I have...all is 744

Edit: busybox is installed into system/xbin
[Nexus 5 Android Development] baySF:
Can I use this mod with the Nexus 5 Real Volume Booster mod without any negative outcomes?
[Nexus 5 Android Development] chdloc:
No idea what Real Volume Booster does, but flashing this mod will likely wipe out the effect of the other mod and vice versa.

You can have both work side-by-side if Real Volume Booster does not modify libaudioflinger, but only mixer_paths.xml.

I'd suggest you make a backup of your system partition, and set aside your current mixer_paths.xml. Then flash this mod and merge

the new mixer_paths.xml file with your backup.
[Nexus 5 Android Development] baySF:
How will I know if that mod replaces this one? And how would I merge them together? Copy and paste?
[Nexus 5 Android Development] tenf00t:
Hello, i'm the developper of the Nexus 5 Real Volume Booster.

My app only modifies the mixer_paths.xml file and It doesn't overwrite it. It just modifies 3 values.

If I were you, I would apply the camcorder audio fix and then run my App. My app won't modifiy the values from the camcorder audio fix unless both mods are modifying the same values.

Regards,

Marc
[Nexus 5 Android Development] chdloc:
That's the thing, what 3 values are subject to modification by your mod?
[Nexus 5 Android Development] tenf00t:
My app modifies the following values in the mixer_paths.xml file:

<path name="speaker">
"RX7 Digital Volume" value="88"

<path name="headphones">
"HPHL Volume" value="15"
"HPHR Volume" value="15"

All have to do with sound output volume. Since your mod seems to be more of an input mod, I doubt we touch the same values.
[Nexus 5 Android Development] chdloc:
Yes, there is a clash if somebody also wants the stereo playback mod that I have bundled with the camcorder mod.
[Nexus 5 Android Development] tenf00t:
Ok then, but I think it's still not that big a deal.

Since my mod runs in the form of an app any of the clashing values you have modified with your mod would show up in my interface and the user would then be free to modify it or not... I admit it's not ideal but it doesn't prevent the user from running both mods. They could of course manually merge the modifications they wish but that could become tedious.
[Nexus 5 Android Development] MrMarques01:
I'm having the same issues here. I followed the instructions, but all I get is a toast message when starting the camera.
[Nexus 5 Android Development] chdloc:
aMGC Troubleshooting

To those of you having trouble running aMGC either directly with the app or via Tasker I have attached an archive with

two test shell scripts for troubleshooting.

Please copy the two files to /data/local/tmp/camera, and give unrestricted access to root, i.e. 744 (rwxr--r--).

Then go into an adb root shell and copy&paste the following line while the Google Camera is recording a video

/data/local/tmp/camera/test_script.sh

Your output should look something like this (note that the LED should flash red for five seconds during the test)

testing tinymix
current ADC1 gain as reported by tinymix is 15
current DEC6 gain as reported by tinymix is 103
returning sound card status
state: RUNNING owner_pid : 27429 trigger_time: 1420433870.073428031 tstamp : 1420433913.661740515 delay : 0 avail : 0 avail_max : 960 ----- hw_ptr : 2091840 appl_ptr : 2091840
testing access to /sdcard directory
calling second script to read the created file
entered second script, /data/local/tmp/camera/test_script2.sh
reading file previously created by test_script1.sh (should return 0)
0
leaving second script, /data/local/tmp/camera/test_script2.sh
reading microphone level as reported by audioflinger
-48 dB
testing LED control; flashing the red LED for five seconds
tests completed

Other troubleshooting tips:

if you are using Tasker, make sure you are running the latest version, i.e. 4.6u1;

also try enabling "Allow External Access" in Tasker's Preferences->Misc

make sure that all scripts in /data/local/tmp/camera have permission 744 (rwxr--r--)

make sure that either Tasker or the app has Accessibility permissions

make sure the app is running or that the profiles in Tasker are enabled

make sure you have busybox installed

if you have the paid version of SuperSU, enable detailed logging for either

Tasker or the app for clues

the method (app or Tasker) currently only supports the Google Camera app
[Nexus 5 Android Development] marquimsp:
I got this running the test script:

C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell

shell@hammerhead:/ $ /data/local/tmp/camera/test_script.sh

/data/local/tmp/camera/test_script.sh

/system/bin/sh: /data/local/tmp/camera/test_script.sh: not found

127|shell@hammerhead:/ $

C:\Program Files (x86)\Android\android-sdk\platform-tools>

Which is weird, everything seems to be in the right folders with the right permissions. Busybox installed, apk installed, accessibility given, etc.

:confused:
[Nexus 5 Android Development] chdloc:
You need to run the script within a root shell, i.e. type

su

inside the adb shell before launching the script.
[Nexus 5 Android Development] chdloc:
I may have found the culprit that prevents aMGC from working on certain devices.

I'm suspecting that those of you who are not seeing an UI when starting a camcorder recording

are allowing Google Now to work from any screen. For confirmation, please turn

this feature off, reboot your phone, try again, and report back. Thanks!
[Nexus 5 Android Development] marquimsp:
I'm not using "from any screen", so that's not what's preventing it from working in my device.

My pc just died (or it's in a coma), I can't do the troubleshooting routine.
[Nexus 5 Android Development] MrMarques01:
Thanks for giving some troubleshooting advice. I'll run the test scripts when I get back home and report back
[Nexus 5 Android Development] chdloc:
Thanks for this. So what did you do to get the UI to show up? Does the UI show up consistently? I thought you had problems with aMGC.

The troubleshooter scripts are not supposed to "fix" things, just to point out potential problems.

One problem I'm seeing (that you already pointed out) is that Franco's kernel uses a different LED interface.

You are not seeing the LED act as a VU meter, right?

Oh boy, it's going to be a major pain trying to support a variety of kernels. I'll take a look at it to see what's involved.

Depending on how it goes I may decide to only fully support stock kernels.
[Nexus 5 Android Development] marquimsp:
Oh sorry I wasn't clear, it's not working (neither the leds or the UI). I'm using ElementalX.

I hope it'll work someday in my device, I was praising it "in advance", based on the photo . It's a great mod.

Thanks again, chdloc!
[Nexus 5 Android Development] [Gorgasm]:
Thank you for you mod which works very well :)

I will probably try your aMGC later, but for now, I have one (probably dumb) question : does this work with Viper4Android by [MENTION=5052420]AndrasLOHF[/MENTION] (or DSP Manager) without the risk to erase what you change in mixer_paths.xml ?
[Nexus 5 Android Development] chdloc:
This is not a dumb question at all.

Unfortunately, I don't know the answer as I'm not familiar with Viper.
[Nexus 5 Android Development] heccubusxda:
Sorry, disregard this post.
[Nexus 5 Android Development] chdloc:
aMGC update available

v0.2 of the assisted Manual Gain Control (aMGC) app and Tasker project are now available here. It hopefully fixes the non-appearing UI that some users were experiencing.
[Nexus 5 Android Development] [Gorgasm]:
Thanks for the reply :)

For information, I flashed the last update of LolliViper and it works well with the stereo playback, the values for RX1 and RX7 Digital Volume in mixer_paths.xml are the same before and after flashing (and I changed them before). I don't know if it have some consequencies on the camcorder fix but I don't think so.
[Nexus 5 Android Development] winamp26:
hi

install aMGC app and files attachment works fine.

but i when recoed by camera led color is green what that means?

is means not noisy sound?

sorry for bad english:)
[Nexus 5 Android Development] chdloc:
The values don't change because the LolliViper developer actually uses my mixer_paths.xml file. I have looked at the latest published LolliViper archive (the one with the name "stereo" in it) and there will be a conflict if you are trying to use the camcorder mod with noise suppression as LolliViper overwrites audio_effects.conf and libaudiopreprocessing.so

Do you see the color change from green to yellow, orange, and red when you talk while recording?

If not, I can see three possible problems:

you may not be running the "advanced" camcorder mod (with noise suppression). You need to run the advanced version (I recommend 6dB of noise suppression) for microphone levels to be reported to logcat

you may have hotword detection enabled on any screen. There is currently a problem with aMGC and/or libaudioflinger which prevents the microphone levels to be reported to logcat (only) in this context

You can check whether microphone levels are reported to logcat by tethering your phone to your PC, starting an adb shell and running

logcat | grep level_dB_int

while the camcorder is recording. If you don't see anything being reported, then the LED will stay green. (It may be a good idea for me to change the LED color to, say, white or blue (or turn LED off) when this is happening to clearly indicate a problem with level reporting)

When everything is working, a green LED means that the levels being detected are somewhat low, with the color changing to yellow to orange to red as the levels being detected increase, much like a common audio VU meter.
[Nexus 5 Android Development] winamp26:
Its work.

When i record video Led color change green to yellow to orange to red and I change gain -12 to 12 works fine .

Its good[emoji106]
[Nexus 5 Android Development] Jacktheskipper:
Can't wait to try this later when I come home. Audio recording quality when recording bands playing has always annoyed me since I changed from the SGS 9000i to the Nexus 5.

Will it be enought to flash the system.img from the factory image to restore the original state of the system if I wanna go back to the original files later on?
[Nexus 5 Android Development] bigevil89:
No sound from bottom speaker

Hello all, I had an issue with the latest build (build2) of the mod. When I installed it with the stereo sound option enabled, I lost all sound from the bottom speaker. Sound would only come out of the earpiece speaker. I tried disabling the feature and trying all different setting configurations in the Aroma installer to no avail. I ended up flashing an older build of the mod that did not feature the stereo sound feature and the sound returned. Interestingly I flashed the latest Lollipop test Version of Viper4Android that features Stereo Sound support and It works just fine, Sound comes out of both earpiece and bottom speaker. Any ideas what could be causing this with Build2? I'm Happy with my solution of using the older build + Viper with Stereo sound, But still curious as to what is casuing that issue.

I'm currently running my N5 with Cataclysm Jan 4 + Elemental X ( I did a clean flash of both Stock and Cataclysm and both had the same issue)

Regardless Thank you for this mod. Its been a fantastic fix for the terrible camcorder audio.
[Nexus 5 Android Development] chdloc:
Yes, and uninstall aMGC (if installed) to remove any trace from this mod.

If you like, install the latest release and post your mixer_paths.xml (the one that causes the main speaker to not work) file for analysis. I'm suspecting a botched "speaker" device. It should look something like this

<path name="speaker">
<ctl name="SLIM RX1 MUX" value="AIF1_PB" />
<ctl name="SLIM RX2 MUX" value="AIF1_PB" />
<ctl name="SLIM_0_RX Channels" value="Two" />
<ctl name="RX1 MIX1 INP1" value="RX1" />
<ctl name="RX7 MIX1 INP2" value="RX2" />
<ctl name="RX1 Digital Volume" value="89" />
<ctl name="RX7 Digital Volume" value="81" />
<ctl name="SPK DRV Volume" value="6" />
<ctl name="CLASS_H_DSM MUX" value="DSM_HPHL_RX1" />
<ctl name="DAC1 Switch" value="1" />
</path>
[Nexus 5 Android Development] bigevil89:
No need anymore for this. I was having some other issues with my phone, So i decided to wipe clean every partition on my phone, Flash the factory image, re-install Cataclysm and then install the latest mod. Works just fine and dandy. Just needed and extra clean wipe. Thank you regardless and keep up the awesome work!
[Nexus 5 Android Development] [Gorgasm]:
Oh it's too bad, I didn't see that. And I take it that it is the same with DSP Manager... Ok I think I have to make a choice ^^

Thank you for your reply !
[Nexus 5 Android Development] SummerBoyz:
Will this work for nexus 6?
[Nexus 5 Android Development] chdloc:
This is actually a surprisingly valid question.

Does the Nexus 6 suffer from the same camcorder audio quality problem?

The simple mod (without noise suppression) may work, but only if the Nexus 6 uses the

same audio HAL as the Nexus 5, i.e. audio.primary.msm8974.so, and after the mixer_paths.xml

has been adapted.

The modified libraries needed for the advanced mod (with noise suppression), i.e. libaudioflinger.so

and libaudiopreprocessing.so, should be identical between the two devices due to them being derived

from the same code base. However, the other two configuration files, i.e. media_profiles.xml and

audio_effects.conf, will need to be adapted as well.
[Nexus 5 Android Development] SummerBoyz:
From what i know, nexus 6 also use only one mic to record the sound, but the sound quality is not as bad as nexus 5, i can't seems to find anyone make a mod for nexus 6 stereo video record. So will the stereo mod work?