FORUMS

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

2,167 posts
Thanks Meter: 4,388
 
By abhi08638, Senior Member on 28th June 2016, 04:23 AM
Post Reply Email Thread
** 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-->
        <!-- [email protected],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 -->
<!-- /*[email protected] , 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 -->
<!-- /*[email protected] , 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
Attached Files
File Type: zip OP3_Mono.zip - [Click for QR Code] (400.4 KB, 5828 views)
File Type: zip OP3_DisableCameraNS_v4.zip - [Click for QR Code] (402.5 KB, 2596 views)
File Type: zip Revert_mixer_paths.zip - [Click for QR Code] (391.7 KB, 2224 views)
File Type: zip OP3_Mono_DisableCameraNS.zip - [Click for QR Code] (402.6 KB, 1532 views)
The Following 44 Users Say Thank You to abhi08638 For This Useful Post: [ View ] Gift abhi08638 Ad-Free
28th June 2016, 04:34 AM |#2  
srvoleti's Avatar
Senior Member
Flag India
Thanks Meter: 159
 
More
@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.
The Following User Says Thank You to srvoleti For This Useful Post: [ View ] Gift srvoleti Ad-Free
28th June 2016, 05:52 AM |#3  
Senior Member
Flag Chandigarh
Thanks Meter: 133
 
More
@abhi08638 well nice to see you on op3 development
I will test ur mods on OOS and report u asap.
28th June 2016, 06:18 AM |#4  
kristofpetho's Avatar
Senior Member
Flag Zoetermeer
Thanks Meter: 8,943
 
More
@abhi08638 is there a way to turn DOWN overall volume? I work in an office and even the lowest volume is quite high... Thanks!
28th June 2016, 07:49 AM |#6  
DeeZZ_NuuZZ's Avatar
Senior Member
Flag Hanover
Thanks Meter: 4,573
 
Donate to Me
More
Quote:
Originally Posted by HatRiGt

Can u make Dolby atmos mod for op3

did you try the latest test zip from dolby atmos thread in android software development forum?
28th June 2016, 08:27 AM |#7  
Joyo-rocker's Avatar
Senior Member
Flag Delhi
Thanks Meter: 42
 
More
I can confirm that mono mod is working perfectly on my OP3 with Viper and extremebeats...!!
Thanks a lot for this mod..!!
28th June 2016, 09:10 AM |#8  
Senior Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Joyo-rocker

I can confirm that mono mod is working perfectly on my OP3 with Viper and extremebeats...!!
Thanks a lot for this mod..!!

which viper package did you use? i tried to install but i causes my OP3 won't boot up
28th June 2016, 09:11 AM |#9  
Senior Member
Flag United Kingdom
Thanks Meter: 138
 
More
The zips work fine on oxygen os. Thanks abhi!
The Following User Says Thank You to tofuboi01 For This Useful Post: [ View ] Gift tofuboi01 Ad-Free
28th June 2016, 11:14 AM |#10  
Senior Member
Thanks Meter: 55
 
More
Works great wit op3lite rom 3.1.3...awsome effort bro..thnks..😂
28th June 2016, 11:27 AM |#11  
Senior Member
Flag Dendermonde
Thanks Meter: 62
 
More
lowest speaker volume too loud
Quote:
Originally Posted by kristofpetho

@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,
Post Reply Subscribe to Thread

Tags
audio, mod, surround sound

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes