yashsingh1/xdaforums huggingface dataset:
[OnePlus 3 Themes, Apps, and Mods] SedyBenoitPeace:
I flashed the ARISE zip for op3.. Viper is installed correctly but I haven't any effect.. Do I need to flash the deep buffer remover? Thanks to all in advance

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[OnePlus 3 Themes, Apps, and Mods] dustintinsley:
What settings are you using for V4A on the OP3?

---------- Post added at 12:46 AM ---------- Previous post was at 12:44 AM ----------

What settings are you using for V4A on the OP3? Care to share your setup? Trying to fine tune mine but always like to look at what others are using...
[OnePlus 3 Themes, Apps, and Mods] albireox:
Yes, I use Blu Spark kernel, set it to permissive via Kernel Adiutor plugin. Installed then V4A, installed driver and restart. No luck, driver doesn't seem to be installed.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
This is all I got when running that command and out putting to a file

I'm not sure if this is helpful or not considering its only reporting two lines over and over

07-06 05:58:59.850 648 1536 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
07-06 05:58:59.857 648 1536 I audio_hw_primary: select_devices Selected apptype: 69937
07-06 05:58:59.859 648 1536 D audio_hw_primary: select_devices: done
07-06 05:59:06.268 648 1536 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
07-06 05:59:06.274 648 1536 I audio_hw_primary: select_devices Selected apptype: 69937
07-06 05:59:06.276 648 1536 D audio_hw_primary: select_devices: done
07-06 06:00:32.845 648 1536 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
07-06 06:00:32.850 648 1536 I audio_hw_primary: select_devices Selected apptype: 69937
07-06 06:00:32.852 648 1536 D audio_hw_primary: select_devices: done
07-06 06:00:38.856 648 1536 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
07-06 06:00:38.864 648 1536 I audio_hw_primary: select_devices Selected apptype: 69937
07-06 06:00:38.867 648 1536 D audio_hw_primary: select_devices: done
[OnePlus 3 Themes, Apps, and Mods] mhoppi:
Thank you chdloc,

I tried that and it seems to work. I will try some different settings now and then upload a zip for everyone here.

EDIT: Sorry wrong thread. There was another thread and we found a solution for bad quality. I will post the zip/fix here as well when I'm done
[OnePlus 3 Themes, Apps, and Mods] chdloc:
This tells me that you had not used any other device than the main speaker around the time you invoked logcat. Are you sure you started a camcorder recording before issuing the logcat command?
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
That's what I suspected, I did use the camcorder prior to running the grep in that case. I just did it again and it still outputs the same thing

Edit: finally got it after running the grep and camcorder at the same time

So I'm assuming 69 would be the id and camcorder-mic would be the value in the mixer_paths ( which I already knew). So assuming I have the camcorder id in my audio_platform_info, how would I get the camcorder mic to use it

07-06 07:52:57.497 648 28286 D audio_hw_primary: select_devices: out_snd_device(0: ) in_snd_device(69: camcorder-mic)
07-06 07:52:57.510 648 28286 D audio_hw_primary: select_devices: done
[OnePlus 3 Themes, Apps, and Mods] chdloc:
That is odd. Your audio HAL must be different. Maybe run logcat without arguments and inspect the output, or you can try to grep for camcorder instead?
[OnePlus 3 Themes, Apps, and Mods] sir-harlekin:
This is a newbie question: is there stereo sound a realistic goal or is this all being blocked by the deep buffer problem? Thanks.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Yeah I finally got it see my edited post
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Even if it were possible, the sound would be horribly unbalanced and pretty much useless
[OnePlus 3 Themes, Apps, and Mods] mhoppi:
I used your Information to edit the /System/etc/audio_platform_info.xml as suggested by chdloc.

Add the following line between <acdb_ids> and </acdb_ids>

<device name="SND_DEVICE_IN_SPEAKER_STEREO_DMIC" acdb_id="69"/>

My videos now Sound incredibly good. Try that and Report.

And don't forget to reboot after altering the file. ?

And by the way: it's stereo
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
I think it's better? I can't really test since I'm at work, I'll upload at flashable zip so more people can test it.

Btw are you on OOS or CM

Edit: Zip uploaded
[OnePlus 3 Themes, Apps, and Mods] mhoppi:
But recordings are quite silent. Where can we increase volume? I tried in mixer_paths_tasha.xml at speaker-stereo-dmic-ef to increase from 11 to 30 but I don't notice any difference
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
If you're using the stock mixer paths, then the path being used is handset-mic, which is where you have to adjust the gain
[OnePlus 3 Themes, Apps, and Mods] chdloc:
I wouldn't write it off this quickly. I have a (my own) stereo mod working on my Nexus 5 with gain adjustments and asymmetric filtering to equalize the frequency response of the two loudspeakers and the spatial effect is actually very impressive, albeit somewhat quiet due to the physical constraints.

Is it actually true stereo or dual-mono?

At least on my Nexus 5 the maximum ADC gain is 20, so your value of 30 may have been ignored. Note that ADC Volume increases the analog gain. You can (should?) try to increase the digital gain by adding

<ctl name="DEC4 Volume" value="XX" />
<ctl name="DEC5 Volume" value="XX" />

to the speaker-stereo-dmic-ef device, where XX=84 by default (0 dB). Each "tick" up or down changes the gain by 1 dB. Also, you may need to apply the ADC/DEC gain changes to mixer_paths.xml instead of mixer_paths_tasha.xml. Maybe run

logcat | grep mixer_paths

immediately after your phone has completed a boot cycle.

Edit: It appears that OOS is, indeed, using mixer_paths_tasha.xml instead of mixer_paths.xml. Make sure you reboot your phone after you have made changes to the mixer. BTW, there is a way to change gains on-the-fly for testing (as changes don't stick)...

The same happened on the Nexus 5: better quality, but lower gain, which needed to be boosted in mixer_paths by, I think, at least 12 dB. I hope the new acdb_id (69) did not disable automatic gain control (AGC). You may need to keep looking for a different acdb_id if gain control is disabled. If AGC cannot be re-enabled while keeping noise suppression turned off, I'm afraid that a more complicated workaround needs to be considered. Or better yet, pressure OnePlus to turn off noise suppression on their end.

By the way

I would not mess with the handset-mic device to manipulate the camcorder gain. The gains should be adjusted in the camcorder-mic device in mixer_paths for CM ROMs and in the speaker-stereo-dmic-ef device in either mixer_paths.xml or mixer_paths_tasha.xml for OOS

forcefully changing the SND_DEVICE_IN_SPEAKER_STEREO_DMIC device may also wreck havoc on other apps that use this device. According to the OOS audio HAL, only the telephony use-case in speakerphone mode may use this device in addition to any app that requests the CAMCORDER device. It may be better to define a completely new device in both the audio HAL and mixer_paths to isolate the CAMCORDER use-case
[OnePlus 3 Themes, Apps, and Mods] mhoppi:
It's true stereo
[OnePlus 3 Themes, Apps, and Mods] chdloc:
Nice (I don't think CM does this by default)!

See my edit to the post right above yours to try to increase the gain.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Yeah that's what I meant volume wise, the earpiece on the OP3 isn't the loudest I've heard so making this mod is a pretty low priority atm

As for increasing the gain, we're currently testing the camcorder-mic path with <ctl name="DEC4 Volume" value="100" />

It seems to work for me on CM but I'm not sure about OOS though.

Hey, is there any sure fire way to know that AGC is disabled?
[OnePlus 3 Themes, Apps, and Mods] chdloc:
It probably won't as OOS is using a different (stereo-capable) audio device, see my edited post above.

Yes, play very loud music and see whether it distorts. A decent car stereo with a good low-frequency punch is perfect for that test.
[OnePlus 3 Themes, Apps, and Mods] gautamhans1:
thanks. works great :)
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
I'm no expert in audio but I think the AGC might still be active. Either way the recordings are much better than what they used to be.

I'm updating the cam zip to include the 6db gain, anything higher adds too much noise for my taste.

Thanks very much for all the help! I hope others can test and provide input if it needs tweaking or not
[OnePlus 3 Themes, Apps, and Mods] chdloc:
Always happy to help.

However, are you sure you turned off noise suppression for your CM ROM? According to your previous posts your camcorder is actually using the camcorder-mic device, which is associated with SND_DEVICE_IN_CAMCORDER and not SND_DEVICE_IN_SPEAKER_STEREO_DMIC, which is the only acdb_db value you changed in the attached audio_platform_info.xml file. As far as I can tell, the mod that you just posted changes the acdb_id for OOS ROMs while the gain is adjusted for CM ROMs. I think for CM you may need to add a line like

<device name="SND_DEVICE_IN_CAMCORDER" acdb_id="XX"/>

and change the gains for OOS in the "speaker-stereo-dmic-ef" device in mixer_paths_tasha.xml.

I'd be happy to help evaluate camcorder recordings for the presence of noise suppression.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
I tried both SND_DEVICE_IN_CAMCORDER and SND_DEVICE_IN_SPEAKER_STEREO_DMIC and they both sound the same to me. In addition to that I changed the camcorder-mic path to use speaker-stereo-dmic-ef instead of handset-mic while adding 6db gain on dec4 and dec5.

I'd like to run a formal test with three test cases with no additional gain being

1. Stock

2. SND_DEVICE_IN_SPEAKER_STEREO_DMIC using speaker-stereo-dmic-ef

3. SND_DEVICE_IN_CAMCORDER using speaker-stereo-dmic-ef

Do you have any specific recommendations on what I should play for these tests
[OnePlus 3 Themes, Apps, and Mods] chdloc:
I'm not sure that changing the mixer only to force the camcorder to use speaker-stereo-dmic-ef instead of handset-mic will make a big difference in sonic quality if the underlying calibration data remains unchanged. Does this change actually enable stereo camcorder recordings for you (CM)? If not, you may need to modify the media_profiles.xml file to allow for stereo recordings.

I'd suggest you make camcorder recordings with you sitting in the car with your car stereo blasting with both music and speech material.
[OnePlus 3 Themes, Apps, and Mods] AcmE85:
[MENTION=4732904]abhi08638[/MENTION]

OP3_DisableCameraNS_v2.zip

Tested on OxygenOS 3.2.0 and sounds good so far.

Have to listen to it on my desktop later.

Thanks to all who helped with this!
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Yeah the stereo recording does work, I tested it by muting one mic and setting the other mic to normal volume and recording. It worked that way and vice versa so I assume it's stereo

Good to hear

Edit: new zip should enable stereo and increase gain for both CM and OOS
[OnePlus 3 Themes, Apps, and Mods] Mafinion:
Also tested the 'op3_disablecamerans_v2.zip' on OOS 3.20 and it seems to work. My camera sound is okay I'd say but my voice messages on whatsapp and the mic while calling someone still sound not as good as on my old nexus 5. Are there options to fix voice messages, because if I record my voice via camera it sounds much better.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
I don't touch the values for voice or call, this is strictly for the camera hence the difference in quality. I can look at it but I'd need to know the device that's being used to record the audio

Restart you phone and run the following in terminal

logcat | grep selected_devices > /sdcard/devices.txt

Run the recording through WhatsApp and a phone call for about 30 seconds each and then post the contents of devices.txt
[OnePlus 3 Themes, Apps, and Mods] AcmE85:
[MENTION=4732904]abhi08638[/MENTION]

The recorded WhatsApp voice messges did not change with OP3_DisableCameraNS_v2.zip.

They sound the same as without this mod.

I think [MENTION=5545528]Mafinion[/MENTION] 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.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
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
[OnePlus 3 Themes, Apps, and Mods] Scrubsss:
Is there a way to disable camcorder NS on the OnePlus2?

This is so anyoing.
[OnePlus 3 Themes, Apps, and Mods] EP2008:
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.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Can you try this
[OnePlus 3 Themes, Apps, and Mods] EP2008:
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!
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Alright good, is the gain too high or low? If everything is just right ill make a v4
[OnePlus 3 Themes, Apps, and Mods] EP2008:
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. :)
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
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?
[OnePlus 3 Themes, Apps, and Mods] EP2008:
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.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
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
[OnePlus 3 Themes, Apps, and Mods] chdloc:
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

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

stock camcorder

FV-5 Cinema with the AGC switch turned off

FV-5 Cinema with the AGC switch turned on
[OnePlus 3 Themes, Apps, and Mods] EP2008:
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).
[OnePlus 3 Themes, Apps, and Mods] wollah_91:
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!
[OnePlus 3 Themes, Apps, and Mods] Joyo-rocker:
No problems bro ...

Glad to be of any help...!!
[OnePlus 3 Themes, Apps, and Mods] chdloc:
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.
[OnePlus 3 Themes, Apps, and Mods] EP2008:
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.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
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.
[OnePlus 3 Themes, Apps, and Mods] bassgenerator:
by ZIP works after updating to Oxygen 3.2.1? at my sound recording with the camera is fairly low

thanks
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
No the fix is not persistent over ROM flashes or updates. So everytime you install a ROM, dirty flash, or update,nyou have to reflash this
[OnePlus 3 Themes, Apps, and Mods] bassgenerator:
I guess I do not understand ... I can not loaded by any ZIP?
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Just reflash this zip in recovery
[OnePlus 3 Themes, Apps, and Mods] bashrulz:
Nice audio mod loving it :) Thanks abhi!

Just wondering if you could help us out with the camera mod as well.. below link for your reference :D

http://xdaforums.com/nexus-5x/themes-apps/mod-google-camera-t3279714

TIA!
[OnePlus 3 Themes, Apps, and Mods] bassgenerator:
which zip with the four I can install?

[MENTION=4472027]bassgenerator[/MENTION]
[OnePlus 3 Themes, Apps, and Mods] trd360:
Anybody get the NS mod working with OOS?
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
I don't really see any help being needed in that thread

DisableCameraNS v4

people have reported it working on OOS
[OnePlus 3 Themes, Apps, and Mods] bashrulz:
No, what i meant was can you port that app for Oneplus 3?

some of the features doesn't work in Oneplus 3, hence requesting you to mod :)
[OnePlus 3 Themes, Apps, and Mods] MrPhilo:
Any significant battery drain with the Mono Mod? Or extra battery drain
[OnePlus 3 Themes, Apps, and Mods] ahrion:
You can replicate in earpeace speaker and raise the volume to create stereo sound, rather than keeping it on the same channel. I did this on Nexus5/6 a while back.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
I'll look at it but no promises. Camera features rely strictly on the camera HAL not on the app

I haven't noticed any...

Can you explain further, I don't quite understand. If you add the speaker values to the earpiece then it will play sound through the speaker for earpiece related tasks. Along with that, I still have no idea how to sperate out the speaker value from one line.
[OnePlus 3 Themes, Apps, and Mods] zeeBomb:
Did anyone try out the mono surround sound? How "underwhelming" is it?
[OnePlus 3 Themes, Apps, and Mods] alexferdean:
Wow, thanks for this mod. The noise suppression is my only issue with the OnePlus 3. I hope I can use this on OOS 3.2.1 also.
[OnePlus 3 Themes, Apps, and Mods] JumboMan:
anyone know how to increase incall volume on stock oos
[OnePlus 3 Themes, Apps, and Mods] hasenbein1966:
Disable Camera NS v4 works very well (wonderful clear sound) on OxygenOS 3.2.0 here.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Should be fine

Until I figure out a way to decrease the sound from the speaker, the earpiece will always get drowned out. However, it's still noticeable when playing music

If you mean increase the volume of the earpiece then see earpiece volume section in DIY

If you mean increase the gain on the mic for the earpiece then see earpiece mic section in DIY

Good to hear (pun intended):p
[OnePlus 3 Themes, Apps, and Mods] chdloc:
Did you try playing around with the RX3 and RX4 gains? You can actually do that while sound is playing by using tinymix which is attached to the second post of this thread (the lollipop version should work). Play audio and execute in a root shell

tinymix "RX3 Digital Volume" X && tinymix "RX4 Digital Volume" X

where X={0,1,2,...,124}. X appears to be 84 by default.
[OnePlus 3 Themes, Apps, and Mods] habylab:
Hi, thanks for creating this!

I can't seem to flash this on 3.2.1 OOS, however. It comes up saying error 7 and that it can't find the file it is trying to backup?
[OnePlus 3 Themes, Apps, and Mods] AcmE85:
It worked on 3.2.0 but I had the same issue on 3.2.1 with v4.

I ended up manually copying the files from the zip to

system/etc overwriting the existing files.

Make sure to set the correct permissions afterwards (rw-r--r-- 0644)

then reboot.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
I already have tinymix in my /system/bin/ directory, will that suffice or should I replace it with the one from your posts. Also I think the speaker is RX0 and RX7

Is OOS still using mixer_paths_tasha.xml on 3.2.1? What mixer_paths are in the /system/etc/ directory now
[OnePlus 3 Themes, Apps, and Mods] AcmE85:
Yes, 3.2.1 uses the same files as in 3.2.0. Nothing changed in this regard.

After I got the error in TWRP I checked the system folder and the files were there.

Manually copying over the specific files worked though and recorded sound is clear with v4.

Sorry I forgot to inform you about this flashing issue.

I really don't know what might cause this.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Yeah that's really strange, can you tell me what the exact error message is? I can't seem to reproduce this no matter how many times I flash. Also does it fail every time or only sometimes
[OnePlus 3 Themes, Apps, and Mods] AcmE85:
The error shows that I was flashing v2, but prior to that I got the same error with v4.

I wanted to flash the fix right after I flashed the OxygenOS 3.2.1 full zip.

A recovery reboot might have fixed that but instead I booted straight to system and applied the files myself.
[OnePlus 3 Themes, Apps, and Mods] chdloc:
The tinymix version you have should be fine. Upon inspecting the stock mixer_paths_tasha.xml it appears that "RX0 Digital Volume" should be controlling the main speaker level while "RX1 Digital Volume" should be controlling the handset loudspeaker level. Actually, if OOS calls the "speaker" device when playing media, audio should be played in stereo by default with the main speaker playing the left channel while the earpiece plays the right channel.

It may be instructive to review the capabilities of the mixer. The best way to do so is to install AlsaMixer from the Play Store and install ALSA from within the app's settings. After that execute the following command in a root shell:

alsa_amixer contents > /sdcard/mixer_contents.txt

Please post the resulting mixer_contents.txt.
[OnePlus 3 Themes, Apps, and Mods] abhi08638:
Changing the volume using tinymix didn't have any effect.

In this file I posted I think it starts being useful at this line

numid=1551,iface=MIXER,name='QUAT_MI2S BitWidth'

I didn't have time to go through the entire thing but I also saw references to

RXx Mix Digital Volume

https://www.dropbox.com/s/y4n0xxq9eqtr6xd/mixer_contents.txt?dl=0