[MOD][FIX][July/09/2016] OnePlus 3 Audio Mods

Search This thread

abhi08638

Senior Member
Jul 11, 2012
2,165
4,388
@abhi08638
The recorded WhatsApp voice messges did not change with OP3_DisableCameraNS_v2.zip.
They sound the same as without this mod.

I think @Mafinion is just comparing it to his Nexus 5 and asking you if you could improve the quality somehow in this regard.
I don't have any issues with it though. Can't remember if the Nexus 5 has been any better.
Yes I'm aware, I'm asking to see if the recordings use a different recording path than the camcorder to see if I can improve it
 

EP2008

Senior Member
Jan 2, 2008
2,946
580
Toronto, Ontario, Canada
Just applied v3 and it works incredibly well. I hope that oneplus makes this a toggle switch, since there are situations where having NS can be of benefit (vlogging, for example).

EDIT:
FYI: Here are my samples v3 of this fix - before and after.

BEFORE (you can hear the noise suppression kick in right at the beginning):

http://www36.zippyshare.com/v/EJa3Q3Zz/file.html

AFTER v3 of the fix: http://www36.zippyshare.com/v/3d3rMTa0/file.html

You can hear that it does work, although I find the volume to be quite low.
 
Last edited:
  • Like
Reactions: trd360 and chdloc

abhi08638

Senior Member
Jul 11, 2012
2,165
4,388
Just applied v3 and it works incredibly well. I hope that oneplus makes this a toggle switch, since there are situations where having NS can be of benefit (vlogging, for example).

EDIT:
FYI: Here are my samples v3 of this fix - before and after.

BEFORE (you can hear the noise suppression kick in right at the beginning):

http://www36.zippyshare.com/v/EJa3Q3Zz/file.html

AFTER v3 of the fix: http://www36.zippyshare.com/v/3d3rMTa0/file.html

You can hear that it does work, although I find the volume to be quite low.

Can you try this
 

Attachments

  • OP3_DisableCameraNS_OOS.zip
    402.5 KB · Views: 46

abhi08638

Senior Member
Jul 11, 2012
2,165
4,388
Do you want me to flash this right over the current patch or revert the last patch and then do it?

EDIT : I flashed over the previous version and it's so much better!

Awesome fix!
Alright good, is the gain too high or low? If everything is just right ill make a v4
 

EP2008

Senior Member
Jan 2, 2008
2,946
580
Toronto, Ontario, Canada
Alright good, is the gain too high or low? If everything is just right ill make a v4

It sounds just right. But I've discovered something else.

If iIuse cinema fv5 there's an option to disable automatic gain control. I don't notice that the volume changes with this option on or off, but checking that box seems to re-enable the noise suppression, which is GREAT because now i have the option to turn it on or off at will while using this patch.

I'll try to post samples if you need. Or test it out yourself. :)
 
  • Like
Reactions: AcmE85

abhi08638

Senior Member
Jul 11, 2012
2,165
4,388
It sounds just right. But I've discovered something else.

If iIuse cinema fv5 there's an option to disable automatic gain control. I don't notice that the volume changes with this option on or off, but checking that box seems to re-enable the noise suppression, which is GREAT because now i have the option to turn it on or off at will while using this patch.

I'll try to post samples if you need. Or test it out yourself. :)
1. Does toggling that option really disable the noise suppression?

2. I need to make an updated revert zip, but if you're not using the patch and you toggle that, does it still disable the NS, and if it does how does the sound compare to with the patch applied?
 

EP2008

Senior Member
Jan 2, 2008
2,946
580
Toronto, Ontario, Canada
1. Does toggling that option really disable the noise suppression?

2. I need to make an updated revert zip, but if you're not using the patch and you toggle that, does it still disable the NS, and if it does how does the sound compare to with the patch applied?

It definitely seems to b able to turn it on/off but only with the patch in place. I do recall testing that option when i first noticed the NS.

I haven't tested that app before and after the patch as i just reinstalled it after factory resetting last night.
 

abhi08638

Senior Member
Jul 11, 2012
2,165
4,388
It definitely seems to b able to turn it on/off but only with the patch in place. I do recall testing that option when i first noticed the NS.

I haven't tested that app before and after the patch as i just reinstalled it after factory resetting last night.
It's a good thing to note in the OP.
V4 uploaded, new revert uploaded.

Things to do:
1. Add DIY for camcorder volume
2. Merge mono sound with cam fix
3. Increase video and audio bitrate for 1080p recordings
4. Stereo mod
 
Last edited:

chdloc

Senior Member
Jul 19, 2010
1,140
1,724
It definitely seems to b able to turn it on/off but only with the patch in place. I do recall testing that option when i first noticed the NS.

I haven't tested that app before and after the patch as i just reinstalled it after factory resetting last night.

I have FV5 Cinema installed, too. At least on my Nexus 5, when I flip the toggle, a different device, i.e. not the CAMCORDER is being called. If that other device has noise suppression enabled by default then, indeed, you should be able to toggle noise suppression with the patch in place.
To find out what device is being called run the following command in an adb shell
Code:
logcat | grep select_devices
while recording a video with both options, i.e. the switch turned off and on.

BTW, great recording in your bathroom. I can hear exactly what's going on. Running water is detected as "white" noise by the noise suppressor and, hence, attacked. The result is the very typical "musical tones" artifact of most mediocre noise suppression algorithms.

To fully understand what the ramifications of this patch are, please run another set of tests: Sit in your car, play a song with a lot of bass content, crank up the car stereo volume and make a set of camcorder recordings, all of them with and without the fix in place
  1. stock camcorder
  2. FV-5 Cinema with the AGC switch turned off
  3. FV-5 Cinema with the AGC switch turned on
 
Last edited:
  • Like
Reactions: abhi08638

EP2008

Senior Member
Jan 2, 2008
2,946
580
Toronto, Ontario, Canada
I have FV5 Cinema installed, too. At least on my Nexus 5, when I flip the toggle, a different device, i.e. not the CAMCORDER is being called. If that other device has noise suppression enabled by default then, indeed, you should be able to toggle noise suppression with the patch in place.
To find out what device is being called run the following command in an adb shell
Code:
logcat | grep select_devices
while recording a video with both options, i.e. the switch turned off and on.

BTW, great recording in your bathroom. I can hear exactly what's going on. Running water is detected as "white" noise by the noise suppressor and, hence, attacked. The result is the very typical "musical tones" artifact of most mediocre noise suppression algorithms.

To fully understand what the ramifications of this patch are, please run another set of tests: Sit in your car, play a song with a lot of bass content, crank up the car stereo volume and make a set of camcorder recordings, all of them with and without the fix in place
  1. stock camcorder
  2. FV-5 Cinema with the AGC switch turned off
  3. FV-5 Cinema with the AGC switch turned on

I will see what time I have to do all this, but I think that for the time being this patch is doing it's job just fine ;) With Cinema FV5, being able to toggle NS at will is just icing on the cake (although I suspect that this is just temporary until OnePlus fixes the video NS once and for all).
 

wollah_91

Senior Member
Dec 9, 2014
87
23
Just flash the zip from xtrememusic audio mod.
Google it or search on XDA.
The viper package comes along it...!
http://xdaforums.com/android/software/mod-beatsaudio-e-xloud-installer-t3029951
There's the link..!

Thank you for that link, you made my day! I had this problem with Spotify. almost every equalizer works with songs deliverd by it, but when songs were added from my PC (local files) the equalizer didn't work.
Now i have installed the XTREMEMusic™ AudioFx! and it works with all audio!
Thanks again!
 

Joyo-rocker

Senior Member
May 25, 2014
161
42
Delhi
Thank you for that link, you made my day! I had this problem with Spotify. almost every equalizer works with songs deliverd by it, but when songs were added from my PC (local files) the equalizer didn't work.
Now i have installed the XTREMEMusicâ?¢ AudioFx! and it works with all audio!
Thanks again!
No problems bro ...
Glad to be of any help...!!
 

EP2008

Senior Member
Jan 2, 2008
2,946
580
Toronto, Ontario, Canada
Well, we don't know that just yet. The mod could cause audio recorded in very loud environments (think concerts) to be horribly distorted if it disables the Qualcomm-internal AGC.
True, but that's not a situation that I find myself in often. I am outdoors a lot, so just being able to record ambient sounds is great.

Sent from my ONEPLUS A3000 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    ** Added Mono + Disable Camera NS

    What is this?
    This post is a collection of all the audio related mods I have created from the OnePlus 3. The mods so far are: Mono surround sound, Camcorder Mic Gain, Cam Mic Gain plus Mono Surround sound, and various Camera recording tests. The cam disable NS is the latest for fixing the noise suppression on video recordings. If you have a request, then make it here and I'll try to make it if I can.

    Various Mod Explanations

    What is it?***Mono Surround***

    This mod will activate you front earpiece speaker in conjunction with the bottom main speaker any time Speaker mode is used for example playing music, watching movies, shows, you tube and so on, creating an almost surround sound type of effect. This will not effect notifications because that is a different setting that I don't really care about.

    Mono Surround Sound
    This version plays all audio through one channel. This basically means that you now have 2 mono speakers. Fair Warning, I find the sound very underwhelming. WARNING: MESSING WITH YOUR EQ WILL ALSO EFFECT THE EARPIECE. IT COULD POTENTIALLY BLOW IT OUT IF YOU INCREASE THE VOLUME OR BASS TOO MUCH

    Camcorder Mic Gain
    This version increases the microphone gain for the audio recorded through the camcorder only. I did this as a workaround for the way too aggressive noise cancellation that happens. This won't fix the problem but hopefully make it more bearable. If I find a better way to fix this, I will update this mod.

    Camcorder Mic Fix Test 1
    This version uses a different stereo microphone path to record audio for the camcorder. This is a test and I don't know if it's better than stock or not. Please test and use the poll so I can see if its working or not

    Camcorder Disable NS v4
    V1: This version attempts to disable the noise suppression for the camcorder in the audio_platform_info.xml.
    V2: It also increases the mic gain by 12db for the camcorder only on CM
    V3: switches to stereo recording for CM
    V4: Increases gain for OOS by 12 db


    Prerequisites and installation instructions
    • MUST be rooted
    • MUST be on CM (OOS is untested)
    • MUST have TWRP installed
    • Flash one of the zips below
    • reboot

    This mod modifies the mixer_path_tasha.xml in the /system/etc folder. I have only tested this on CM13. I don't guarantee it will work for your rom, because this is based off Blisspop rom. Although the worst that'll happen is you'll lose sound and mic. If you do lose sound, flash the revert zip to restore your original file. In a worst case scenario where you messed up the permissions and are in a bootloop, dirty flash your rom.

    DIY
    Background:
    OnePlus is using deep buffering for their audio processing to conserve battery life. If you want to disable deep buffering, go to your build.prop and edit this line to false
    Note: Changing this will change the sound mapping in the mixer_paths_tasha
    Code:
    audio.deep_buffer.media=true

    audio_platform_info.xml
    Speaker is referenced as "quat_i2s" with the interface "SLIMBUS_0_RX"

    mixer_paths_tasha.xml
    Audio playback for music
    Code:
    <path name="deep-buffer-playback quat_i2s">
             <ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia1" value="1" />
    </path>

    Audio playback for notifications
    Code:
    <path name="low-latency-playback quat_i2s">
            <ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia5" value="1" />
    </path>

    Note: If deep buffering is enabled, all sound will go through the low latency playback path.

    Mono Surround Sound
    Code:
    <path name="deep-buffer-playback quat_i2s">
            <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia1" value="1" />
            <ctl name="SLIM RX0 MUX" value="AIF_MIX1_PB" />
            <ctl name="SLIM_0_RX Channels" value="One" />
            <ctl name="RX INT0_1 MIX1 INP0" value="RX0" />
            <ctl name="RX INT0 DEM MUX" value="CLSH_DSM_OUT" />
            <ctl name="EAR PA Gain" value="G_8_DB" />
            <ctl name="RX0 Digital Volume" value="95" />
            <ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia1" value="1" />
    </path>
    To change the volume of the earpiece for audio playback, change RX0 Digital Volume to a value from 1 to 128. Anything above 95 might be dangerous

    To disable the speaker and only use the earpiece for audio playback, delete the line <ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia1" value="1" />

    Earpiece Volume
    Code:
    <path name="handset">
            <ctl name="SLIM RX0 MUX" value="AIF_MIX1_PB" />
            <ctl name="SLIM_0_RX Channels" value="One" />
            <ctl name="RX INT0_1 MIX1 INP0" value="RX0" />
            <ctl name="RX INT0 DEM MUX" value="CLSH_DSM_OUT" />
            <ctl name="EAR PA Gain" value="G_6_DB" />
        </path>

    To modify the earpiece volume for anything that uses the earpiece for output add the line inside the path and modify the volume to your liking from 1 to 128
    Code:
    <ctl name="RX0 Digital Volume" value="95" />
    to this path

    Earpiece Mic
    Code:
    <path name="handset-mic">
            <path name="adc4" />
    </path>
    Add the following line inside the path and change the value to your liking from 1 to 124 where 84 is the default. Each increase by 1 corresponds to 1db of gain.
    Code:
    <ctl name="DEC4 Volume" value="84" />


    Headphones Volume
    This might be the headphones path that is being used but I haven't tested it.
    Code:
    <path name="headphones">
            <ctl name="SLIM RX5 MUX" value="AIF4_PB" />
            <ctl name="SLIM RX6 MUX" value="AIF4_PB" />
            <ctl name="SLIM_6_RX Channels" value="Two" />
            <!-- #ifdef VENDOR_EDIT-->
            <!-- guoguangyi@MultiMedia,2016/4/7,use 24bits to get rid of 16bits innate noise  -->
            <ctl name="SLIM_0_RX Format" value="S24_LE" />
            <!-- #endif VENDOR_EDIT-->
            <ctl name="RX INT1_2 MUX" value="RX5" />
            <ctl name="RX INT2_2 MUX" value="RX6" />
            <ctl name="RX INT1 DEM MUX" value="CLSH_DSM_OUT" />
            <ctl name="RX INT2 DEM MUX" value="CLSH_DSM_OUT" />
    <!-- #ifdef VENDOR_EDIT -->
    <!-- /*zhiguang.su@MultiMedia.AudioDrv , 2016/02/19, add for hw require*/  -->
            <ctl name="HPHL Volume" value="19" />
            <ctl name="HPHR Volume" value="19" />
    <!-- #endif -->
    </path>
    Feel free to play around with the volume values


    Adjusting Camera Mic Volume
    This is only if you have flashed the disable NS Camera Fix

    Code:
        <path name="speaker-stereo-dmic-ef">
            <path name="speaker-dmic-endfire" />
    <!-- #ifdef VENDOR_EDIT -->
    <!-- /*zhiguang.su@MultiMedia.AudioDrv , 2016/04/19, mic power high level mode and add adc volume*/  -->
            <ctl name="ADC4 Volume" value="11" />
            <ctl name="ADC5 Volume" value="11" />
            <ctl name="AMIC_3_4 PWR MODE" value="HIGH_PERF" />
            <ctl name="AMIC_5_6 PWR MODE" value="HIGH_PERF" />
            <ctl name="DEC4 Volume" value="96" />
            <ctl name="DEC5 Volume" value="96" />
    <!-- #endif -->
        </path>

    DEC4 and DEC5 correspond to different channels. If you want to increase the gain equally, adjust DEC4 and DEC5 volume to whatever you like. 84 is the default value which means 0db gain. Each increment by 1 indicates a 1db gain for the corresponding channel. DEC volume ranges from 1 to 124.

    Credits
    All credits go to @chdloc for disabling the noise suppression and @mhoppi for testing

    Flashable Zips are below
    6
    1. Added mono plus Camera NS
    2. Added DIY for Mic volume
    3. Didn't really see any difference in quality when increasing the bitrate so I didnt add a zip for it. If anyone is interested let me know.
    6
    @abhi08638 I request your help to find out the handset mic values and handset speaker values (not earpiece), as I couldn't find them similar to many others mixer_paths.XML files which I have been modifying for several of my Android devices like OPO, OPT, Mi3 etc. Basically I want to increase the speaker and mic volumes of the phone. Can you just point me in the right direction? Already checked the mixer_path_tasha.xml but couldn't find anything! TIA.

    This mixer paths is very odd, I don't know how to change the speaker volume since there is only an enable/disable option for speaker sounds. Ex: there's a different value for speaker notifications than audio playback because onePlus is using deep buffering to increase battery life. I'll look more into it and update the OP detailing the values and what they correspond to later today.

    As for the handset, the handset is defined as the earpiece and there is conflict with the handset and speaker paths since they both use slimbus 0 for the path. The mic values are always tx values since they stand for transmit. The handset uses adc4 and if you want to control the mic gain you would have to do something like adc4 volume=20 inside the path of the handset mic or the mix part itself. I usually only make new paths and replace the old ones with the new paths just so I have a reference point.

    @abhi08638 is there a way to turn DOWN overall volume? I work in an office and even the lowest volume is quite high... Thanks!

    I would appreciate more choices in lower speaker volumes as well. The lowest speaker volume is too loud for 90% of the environments/situations I operate in. thanks for considering it,

    Sorry guys but I don't know how yet, I'll keep trying though. The only thing I would be able to do at this point is to route all audio to the earpiece since its Max volume is lower and configurable.

    On a side note I tried getting stereo sound to work but this is extremely difficult since it is not a normal mixer file. I'll keep trying it have no guarantees
    5
    It definitely seems to b able to turn it on/off but only with the patch in place. I do recall testing that option when i first noticed the NS.

    I haven't tested that app before and after the patch as i just reinstalled it after factory resetting last night.
    It's a good thing to note in the OP.
    V4 uploaded, new revert uploaded.

    Things to do:
    1. Add DIY for camcorder volume
    2. Merge mono sound with cam fix
    3. Increase video and audio bitrate for 1080p recordings
    4. Stereo mod
    4
    Camcorder Mic Gain
    This version increases the microphone gain for the audio recorded through the camcorder only. I did this as a workaround for the way too aggressive noise cancellation that happens. This won't fix the problem but hopefully make it more bearable. If I find a better way to fix this, I will update this mod.

    I have not been able to locate a sample of the camcorder audio produced by the Oneplus 3, but it sounds like it suffers from the same problem as the Nexus 5, for which I've come up with an effective workaround. I'm guessing the same can be done for the Oneplus 3.

    As a first step, I suggest you try this.

    Edit: Depending on what software you are running you may need to play around with another device, i.e. SND_DEVICE_IN_SPEAKER_STEREO_DMIC (produces a stereo recording), instead of SND_DEVICE_IN_CAMCORDER_MIC (produces a mono recording) and assign different numbers to acdb_id. Note that I found the acdb_id for the Nexus 5 by looking at the audio HAL sources (hardware/qcom/audio/hal/msm8974/platform.c, see here for the Oneplus 3) and trial-and-error.