yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Android Development] nmlssit:
Well, not me, but the whole Chroma N5 community. There is a problem of low audio speaker (and when improved is also distorted) and the dev can't properly fix because he doesn't have the phone anymore, so we are trying by various attempts. I suggested this mod because I thought it also modifies general audio, I was mistaken. I know it's not up to you but if you want you are very welcome :)

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] ontic:
i'm sorry for quoting this, i'm new user for n5.

on marsh now and i notice this when rec my video, source of sound was good very clear but when i playback sounds like people blabbering mouth.

i found this post, and i want to know how i installed it. can anyone give me step by step or config that fixed the problem?

thank you. please assist me.
[Nexus 5 Android Development] adnan.selimagic:
Download "Nexus5_6.0_MRA58K_v1.0_audiofix_aroma.zip"

Flash it using TWRP

Follow aroma installer

Reboot
[Nexus 5 Android Development] ontic:
no no, i mean the "option". can you give me best option on aroma to fixed it?

btw i installed days ago, but the result was not good enough.

the sound's quiet at playback, even with mx player i had to use max volume (15), sound source was loud and clear. dunno what's wrong with my nexus.
[Nexus 5 Android Development] adnan.selimagic:
You'll have to play with MIC GAIN and find what is best for you (lower MIC GAIN = quieter sound; 80-85 is best for concerts; around 95 for outdoor)
[Nexus 5 Android Development] bart.found:
Hi [MENTION=2760454]chdloc[/MENTION], does this mod affect the noise suppression level during calls? I have no problem with camcorder audio, but my voice sounds very low and metallic on the other end when the mic is slightly away from my mouth...
[Nexus 5 Android Development] chdloc:
No, this mod does not affect telephony audio.

(I do have a separate mod that turns off dual-microphone processing for telephony while still retaining single-microphone noise suppression and echo control. However, the mod involves a custom kernel among other things. Successful operation may also be carrier-dependent, which holds me back from sharing it with the community.)
[Nexus 5 Android Development] bart.found:
:( that's sad.. because this issue is really annoying me.. I'm on Minimal OS ROM and Hellscore kernel.. could your mod work in my configuration?
[Nexus 5 Android Development] chdloc:
[MENTION=5735314]bart.found[/MENTION] You would have to run my own kernel as I had to open up an ioctl interface to accept modified audio calibration data. The problem is that the calibration data I found to be working well (a generally non-trivial process) may not be universal. This mod would be a nightmare to support. If you or anybody else is still interested, PM me.
[Nexus 5 Android Development] nmlssit:
No changes between MRA58K and MDB08M?

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] chdloc:
Aren't the MDBxxx builds Nexus 5x/6p only?
[Nexus 5 Android Development] nmlssit:
Now that i remember yes, latests Chroma has been build with MDB08M

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] adnan.selimagic:
Android 6.0.1 is out.
[MENTION=2760454]chdloc[/MENTION] do you need to make some modifications or we can install the latest version ?
[Nexus 5 Android Development] chdloc:
The audio HAL has changed considerably. This will likely break the current version of the mod. I'll need some time to merge my mod with the new code base.
[Nexus 5 Android Development] Tarcis:
I forgot to check here first, so I installed simple fix on my rooted 6.01 nexus 5 and it seems to be working..

Also there is a new camera app update, can that also break the mod?

Can anyone confirm the sound problem on 6.01 AND new camera app?
[Nexus 5 Android Development] chdloc:
Camcorder audio fix for Android 6.0.1

Based on the positive feedback I've moved the installer to the Marshmallow post
[Nexus 5 Android Development] cdonald:
Seems to be working well for me. I'm using the camcorder fix with 6 dB noise suppression and everything else default so no aMGC, stereo, or sidetone. On Cataclysm 6.0.1.

Sent from my Nexus 5
[Nexus 5 Android Development] adnan.selimagic:
I can confirm that everything is working fine - 6dB NS with aMGC and Tasker, stereo playback - all good ;)
[Nexus 5 Android Development] nmlssit:
I thought aMGC was installed by the Aroma installer, what did I miss? I have to place the files inside that archive plus run the aroma Installer?

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] Tagtag123:
Works fine with -6dB supression on cataclysm 6.0.1

Nexus 5 d821

Cata 6.0.1 8th Dec.

EX 6.07
[Nexus 5 Android Development] trabadura:
Hello, can someone said what are the best settings in the aroma? I use Cataclism 6.0.1 from 8 Dec with EX 6.0.7
[Nexus 5 Android Development] hanschke:
can I use it on my nexus 6p too`?
[Nexus 5 Android Development] chdloc:
Very good point. Thanks for bringing it up. You can ignore the shell scripts (file endings: .sh) if you had selected aMGC in the Aroma installer. I that case you only need to either install the aMGC apk or import the Tasker project from the aMGC archive.

There are no "best" settings. It is all based on personal preference and the acoustic environment you typically record in.

I suggest you use the default ones to start and play around with the parameters after you get a feeling for the mod's efficacy.

No, this mod is for the Nexus 5 only.
[Nexus 5 Android Development] menaaboud:
Sorry wrong post
[Nexus 5 Android Development] unster:
Hi guys,

can someone tell me please, which file from first post should I install on Paranoid Android in order to get it fixed?

Do I flash it as usual in recovery?
[Nexus 5 Android Development] blinqipa:
Look at the aroma installer (should be in the 2md post )
[Nexus 5 Android Development] chdloc:
[Advanced] Floating microphone gain adjustment with Tasker

OK, this little add-on is not for the faint-of-heart, but I've essentially

come up with a way of displaying two microphone gain settings (ADC1 and DEC6)

that float on top of an active camcorder recording using Tasker scenes.

Note that I'm really a Tasker novice and I'm sure that my setup can be made

more elegant and/or efficient. Please feel free to suggest improvements.

My rationale for implementing this is as follows: my modified library causes

the recording to be around 15 dB quieter than if a recording were made using

the stock library. The gain can be statically adjusted in the file mixer_paths.xml

as described above. However, at least to me, it is not clear what the optimum gain

setting should be so I thought it may be useful to give the (advanced) user

the option to adjust the microphone gain during a recording.

Here is a list of files in the attached archive and what to do with them:

files/bin/tinymix

=> copy to "/data/local/tmp/" and make executable

files/scripts/adjust_adc1.sh

=> copy to "/data/local/tmp/camera/" and make executable

files/scripts/adjust_dec6.sh

=> copy to "/data/local/tmp/camera/" and make executable

files/scripts/check_alsa_status.sh

=> copy to "/data/local/tmp/camera/" and make executable

files/tasker/profiles/Camera.prf.xml

=> import into Tasker

files/tasker/profiles/Not_Camera.prf.xml

=> import into Tasker

files/tasker/scenes/Microphone_Gain__Adc1_.scn.xml

=> import into Tasker

files/tasker/scenes/Microphone_Gain__Dec6_.scn.xml

=> import into Tasker

files/tasker/tasks/camcorder_not_running.tsk.xml

=> import into Tasker

files/tasker/tasks/camcorder_running.tsk.xml

=> import into Tasker

files/tasker/tasks/Not_Silent_Mode.tsk.xml

=> import into Tasker

files/tasker/tasks/Silent_Mode.tsk.xml

=> import into Tasker

Once successfully installed, two small floating gain settings windows -- ADC1 and DEC6 -- are shown in the

lower right- and left-hand corner, respectively, whenever a recording is started. See attached screenshot.

They (should) disappear otherwise. Note that whenever a recording is started, the stock camera applies the

default values from mixer_paths.xml. Hence, permanent changes to the gain can only be made by

modifying the values in mixer_paths.xml directly.

Note that with the attached Tasker profiles, the phone goes into "silent mode" whenever the camera is started.

The idea is to avoid picking up any notifications (sound or vibration) coming through during the

recording. This behavior can easily be changed within Tasker.

Note also that there are currently 2500 gain combinations (20 ADC1 * 125 DEC6). After some

experimentation, I envision this huge number of options to come down to a handful of profiles,

for instance "mute microphone", "quiet scene", "moderately noisy scene", and "noisy scene".
[Nexus 5 Android Development] blinqipa:
Guys thanks anyone who took part in this great mod . But what is "stereo sounds recording"? Can anyone give me an explanation?
[Nexus 5 Android Development] chdloc:
Take a look at this article for a basic introduction of stereophonic sound recording:

http://en.wikipedia.org/wiki/Stereophonic#Recording_methods
[Nexus 5 Android Development] marquimsp:
Fantastic fix, thank you so much.

I'm uploading three videos, one is the original N5 mangled audio (horrible), two is fixed with original 88dB setting and three is 95dB.

Audio is MUCH better (I recorded Skrillex playing LOUD in my speakers), 95dB is still quieter than the original N5 sound, but quality is incomparable, bass is clear and undistorted.

I'll post a link as soon as it's ready.
[Nexus 5 Android Development] ali262883:
Waiting [emoji3]
[Nexus 5 Android Development] marquimsp:
There you go!

https://www.youtube.com/watch?v=wHBHOv8zQsM (original)

https://www.youtube.com/watch?v=zH6Miu-15kg (88dB)

https://www.youtube.com/watch?v=UF19EBTDJa4 (95dB)
[Nexus 5 Android Development] ali262883:
Sorry can't differentiate
[Nexus 5 Android Development] marquimsp:
Oh man, the difference is HUGE, try listening with earphones.

:cool:
[Nexus 5 Android Development] ali262883:
Okay I'll download them [emoji106]

---------- Post added at 10:40 PM ---------- Previous post was at 10:19 PM ----------

Yep got it.. Less distortion and clear voice..
[Nexus 5 Android Development] aeoveu:
Now if only there was a way to prevent this bug from happening (already raised earlier in the thread):

- plug in headphones

- play music

- receive a call

- pull headphones out, and

boom! speakerphone turns on automatically.

Try checking if there's a way to circumvent the checking or something.

And poor Skrillex - I'm sure he never thought his "music" would be used as testing samples :p
[Nexus 5 Android Development] marquimsp:
I wasn't thinking about music but in terms of frequencies... lots of low and high end.

If I'd used Mozart I would never know if the bass distorted.

Maybe I should use pink noise?

Well, I'm satisfied with the results, my main concerns are recording live audio in concerts and making sure the underwater sound is gone. Both are solved!
[Nexus 5 Android Development] blinqipa:
Underwater?
[Nexus 5 Android Development] marquimsp:
yeah, you know that weird artifact that sounds like badly converted audio?

I don't know what ppl are calling it, it sounds like it's underwater to me lol...
[Nexus 5 Android Development] blinqipa:
Yeah yeah xD .I know that Underwater sound LOL.
[Nexus 5 Android Development] marquimsp:
I don't know if you're joking or not, but here's another user mentioning it:
[Nexus 5 Android Development] blinqipa:
Yeah I actually know that ,happened to me too .I think you misunderstood me xD
[Nexus 5 Android Development] marquimsp:
Cool, bro!
[Nexus 5 Android Development] hanschke:
chdloc will you support it in the future or it is not needed?
[Nexus 5 Android Development] chdloc:
At this point it is very unlikely that either Google or LG will ever fix the issue.

I will keep updating my mod as long as the Nexus 5 is my main phone, which is likely until the next Nexus phone(s) hit.
[Nexus 5 Android Development] nmlssit:
Got it, I installed the apk but there's no UI opening during video recording, is that normal?

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] chdloc:
Please try re-flashing the mod using the installer from here. I quietly updated one aMGC script in there to account for different implementations of a particular shell command.
[Nexus 5 Android Development] nmlssit:
Still the same :/

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] chdloc:
Two things I can think of (see OP):

Do you have busybox installed?

Did you grant the aMGC app Accessibility permissions (Settings->Accessibility)?
[Nexus 5 Android Development] nmlssit:
Ops ?

Now it works, thank you :)

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Android Development] trabadura:
I install mod v1.0 with default for android 6.0.1 but call records still bubbly? Can anybody help?
[Nexus 5 Android Development] chdloc:
This mod has no effect on telephony, unless you are referring to the camcorder when you say "call". In that case, use the simple mod which turns off noise suppression altogether.

Also, keep in mind that I have tested this mod only with the Google Camera app and Cinema FV-5, but it should work with any audio recording app that requests the CAMCORDER audio device.
[Nexus 5 Android Development] hanschke:
@ chdloc

so we have to collect for your great work and you can buy the 6p :)
[Nexus 5 Android Development] Flyview:
I'm sort of in the same boat. I'm curious, do you not like the 5X or 6P?
[Nexus 5 Android Development] chdloc:
Neither the 5x nor the 6p have me sufficiently convinced to abandon a perfectly capable phone that is still receiving updates from Google.
[Nexus 5 Android Development] onesolo:
SD820 is the way to go!!!
[Nexus 5 Android Development] chdloc:
{Shameless plug:} For those of you who are on the hunt for the best possible audio quality (via the headphone jack), check out the update to my hardware filter thread. You can now design your headphone compensation filters right on your device rather than having to go through the inconvenience of PC <-> phone iterations.

I also recommend you guys check out [MENTION=281070]bjrmd[/MENTION] 's thread. His phenomenal app allows for "distortion-sensitive" gain control and offers a smart monitor for save listening levels.
[Nexus 5 Android Development] AtField:
hi guys,

I was just wondering if aMGC worked with the new google camera app (3.1.021), cause i can't get it to work. I'm on 6.0.1.

thanks!

Edit: nevermind, i was 100% sure i had busybox installed, instead i didn't :)
[Nexus 5 Android Development] chdloc:
Prompted by your post I checked aMGC on my phone (I haven't recorded a video in a while). I'm using the Tasker version and for whatever reason Android decided to revoke Tasker's Accessibility privileges. So if you are having problems with aMGC, make sure either Tasker or the aMGC app has been granted Accessibility privileges.
[Nexus 5 Android Development] DonAndress:
Guys, I just used that fix in CM12.1 and it works nicely.

One thing though - along with the better sound in recordings there is also higher volume of system sounds (notifications, media, ringer etc).

Could you please tell me which line in the mixer_paths file is responsible for playback of these sounds?

I'd like to lower that a bit...
[Nexus 5 Android Development] chdloc:
mixer_paths controls overall sound level. If you turn a volume knob in the mixer it will affect all sounds going through the requested playback device (headphone, speaker, etc).

The only way to have more finely grained control over specific sounds (notifications, vs. media vs ringer, and so on), you need to do so via your ROM (Settings -> Sound & notification, or whatever CM calls it) or maybe a separate app. Any sound will ultimately go through the same playback device in the mixer.
[Nexus 5 Android Development] DonAndress:
And I believe that would be good.

I can live with all sounds a bit more quiet.

Plus - it turned out that during a call, caller han hear me too loud.

Which line in mixer_paths is responsible for mic during phone calls?

TapaTalked from i9506
[Nexus 5 Android Development] chdloc:
There are multiple telephony use-cases, each having independent gain controls.

Make a phone call while running the following command in an adb shell (or with a logcat app)

logcat | grep select_devices

and post the result. Based on the result I can tell you which line to modify.

The same goes for all other use-cases (telephony, media playback w/ or w/o headphones, etc).
[Nexus 5 Android Development] DonAndress:
Ok, here is what I have so far. You can find here 2 phone calls, multiple notifications and screen lock/unlock sounds:

u0_a110@ks01lte:/ $ su
root@ks01lte:/ # logcat | grep select_devices
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(9: voice-handset) in_snd_device(23: handset-mic)
D/audio_hw_primary( 292): select_devices: out_snd_device(9: voice-handset) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(1: handset) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(1: handset) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(9: voice-handset) in_snd_device(23: handset-mic)
D/audio_hw_primary( 292): select_devices: out_snd_device(9: voice-handset) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(1: handset) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)
D/audio_hw_primary( 292): select_devices: out_snd_device(2: speaker) in_snd_device(0: none)

TapaTalked from i9506
[Nexus 5 Android Development] chdloc:
The whole thing is actually quite simple:

the selected recording devices are the ones listed in parenthesis following the in_snd_device tag, which correspond exactly to the devices listed in mixer_paths.xml. The same is true for the playback side.

So for example, your phone uses the "handset-mic" recording device to route phone calls (handset only, handsfree will be a different device). Looking at the stock mixer_paths.xml you have the following entry:

<path name="handset-mic">
<path name="adc1" />
<ctl name="ADC1 Volume" value="16" />
<ctl name="DEC6 Volume" value="86" />
</path>

There are two volume controls at your disposal: an analog one (ADC1 Volume) and a digital one (DEC6 Volume). Each analog "tick" changes the gain by 1.5 dB while each digital "tick" changes the gain by 1 dB. For ADC, the permissible values range from 0 to 20. For DEC, the permissible values range from 0 to 124 (84 corresponds to 0 dB, so the above number adds 2 dB of digital gain)

On the telephony playback side, the "voice-handset" (earpiece) device is used, so

<path name="voice-handset">
<path name="handset" />
<ctl name="RX1 Digital Volume" value="84" />
</path>

where "RX1 Digital Volume" (value=0,...,124; each "tick" corresponds to 1 dB with 84 being 0 dB) controls your gain.

On the media playback side I see the "speaker" (main loudspeaker) device used, so

<path name="speaker">
<ctl name="SLIM RX1 MUX" value="AIF1_PB" />
<ctl name="SLIM_0_RX Channels" value="One" />
<ctl name="RX7 MIX1 INP1" value="RX1" />
<ctl name="RX7 Digital Volume" value="88" />
<ctl name="SPK DRV Volume" value="6" />
</path>

Here, the volume controls are labeled "RX7 Digital Volume" (value=0,...,124; 1 dB per "tick") and "SPK DRV Volume" (value=0,...,8, I never measured how many dB a "tick" corresponds to here).

Note that changes to mixer_paths.xml will only kick in after you have rebooted your phone.
[Nexus 5 Android Development] Seronez:
I installed the fix for CM12.1 too and sound qualty is much better, but now if I call someone he hears an echo of himself and much white noise any way to fix that?

I know it's because the noise cancelling is off but there has to be a way just to deactivate the mic on top or sth like this so there is no echo anymore
[Nexus 5 Android Development] chdloc:
Which fix did you install? Only this one is meant to be used with CM-based ROMs. My fix in itself has no effect on telephony audio.
[Nexus 5 Android Development] Seronez:
Sorry it has nothing to do with your fix seems to be a problem with CM Rom itself or maybe i need to clean my mics

Gesendet von meinem GT-I9506 mit Tapatalk
[Nexus 5 Android Development] chdloc:
Well, the problem may very well have been introduced by my mod if you installed the wrong one.

However, it sounds like you or some other app may have modified your build. prop file. Check whether the entry to persist.audio.dualmic.config is anything but "endfire". That could result in the same exact behavior you are describing.
[Nexus 5 Android Development] DonAndress:
If this is enough to check just the XML files then I compared the one we put in the system with the one you just gave us here and they are exactly the same.

If XMLs are the same and the differences may be in the SO files then I can't compare it as they are already compiled...
[Nexus 5 Android Development] DonAndress:
So in real life, when I let's say increase ADC volume I add noise and hiss and when I increase DEC I just amplify whatever came from analog chip, which should not cause further distortion, right?

What is the difference between RX7 Digital Volume and SPK DRV Volume?

What in real life would I be changing?

---------- Post added at 12:06 PM ---------- Previous post was at 11:56 AM ----------

There is no such line in root/system/build.prop file.

Is it ok?
[Nexus 5 Android Development] DonAndress:
Ok so I did everything you said, replaced XML and SO files in the system, tweaked volume a bit and added above line in the build.prop.

Results:

- nice quality of sound in videos in quiet area; there is a little hiss but still acceptable

- notifications volume level adjusted to my needs

- good sound quality during phone calls using normal earpiece

-

big echo

during phone calls on loudspeaker (previous version of the files given by [MENTION=2814968]Seronez[/MENTION] gave echo as well)

Any thoughts what could we change in settings to get rid of that issue?

--edit--

By echo I meant that the caller can hear himself when I'm on loudspeaker.
[Nexus 5 Android Development] chdloc:
Does the other party hear echo only while you are on speakerphone? Is there any echo when you talk on the handset?

What gains did you change and by how much? Do you, by any chance, use both loudspeakers on your phone for stereo playback?