[Nexus 5X Themes and Apps] Jose-MXL:
Dual Mono V2

Hi guys,

Today I want to share a little bit of what I have been working with [MENTION=2760454]chdloc[/MENTION], just a little bit, don't get spoiled ;).

Chdloc owns 90% of all the credit of everything you will see me posting here, literally I'm just testing and trying things for him, and for my and your benefit. Even the work from others which I won't mention, and that don't properly credit him, is based on his work directly or indirectly.

Ok, getting that out of the way, I tested his fix for Hotword detection patch and it worked right away. All I'm doing for now is adding the filters I designed for frequencies>8000hz, and to slightly attenuate frequencies<100hz. I have a few comments below in the changelog/comments for this mod.

I intent this to be continuation of the DualMono mod that I made in my very first attempt. TweetMod was definitely a very interesting project that I will continue to improve and try out new filters, tune the volume (since [MENTION=2760454]chdloc[/MENTION] can't test it himself), and see what else I can throw in there for improved quality. It is just another flavor that we can offer for people regarding channel configurations (Left + Left/Right). Another flavor would be surround sound (Left + Right) but with filters to reduce distortion.

Also, I intent do a CrossFeed mod to have around a 60% channel crossfeed and tune up the gains to level up the appropriate channel to where it should be. Also working on an aroma installer to compile AAALLL the mods. Please bare in mind that I test all the stuff I post first before uploading, the reason of why I haven't started my own thread is because I have no time to support it.

Anyways, going back to DualMono mod, here below is the stereo path as it looks in the mixer file. The hotword patches are already implemented on other locations of the mixer file. I will try to keep it cleaner and post the lines from now on, I should have done that since the beginning.

Speaker Path:

<path name="speaker">
<!-- Start Main Controls -->
<ctl name="SLIM RX1 MUX" value="AIF1_PB" />
<ctl name="SLIM_0_RX Channels" value="One" />
<ctl name="CLASS_H_DSM MUX" value="DSM_HPHL_RX1" />
<ctl name="DAC1 Switch" value="1" />
<ctl name="COMP0 Switch" value="1" />
<ctl name="RX1 Digital Volume" value="87" />
<ctl name="RX7 Digital Volume" value="85" />
<ctl name="SPK DRV Volume" value="8" />
<!-- End Main Controls -->
<!-- Start Filter -->
<ctl name="IIR1 INP1 MUX" value="RX1" />
<ctl name="IIR2 INP1 MUX" value="RX1" />
<ctl name="IIR1 Band1" id="0" value="266310692" />
<ctl name="IIR1 Band1" id="1" value="541120438" />
<ctl name="IIR1 Band1" id="2" value="266310692" />
<ctl name="IIR1 Band1" id="3" value="541136923" />
<ctl name="IIR1 Band1" id="4" value="264202413" />
<ctl name="IIR2 Band1" id="0" value="268435456" />
<ctl name="IIR2 Band1" id="1" value="0" />
<ctl name="IIR2 Band1" id="2" value="0" />
<ctl name="IIR2 Band1" id="3" value="0" />
<ctl name="IIR2 Band1" id="4" value="0" />
<ctl name="IIR1 Band2" id="0" value="41461322" />
<ctl name="IIR1 Band2" id="1" value="82922644" />
<ctl name="IIR1 Band2" id="2" value="41461322" />
<ctl name="IIR1 Band2" id="3" value="907896534" />
<ctl name="IIR1 Band2" id="4" value="63255122" />
<ctl name="IIR2 Band2" id="0" value="268435456" />
<ctl name="IIR2 Band2" id="1" value="0" />
<ctl name="IIR2 Band2" id="2" value="0" />
<ctl name="IIR2 Band2" id="3" value="0" />
<ctl name="IIR2 Band2" id="4" value="0" />
<ctl name="IIR1 Band3" id="0" value="268435456" />
<ctl name="IIR1 Band3" id="1" value="0" />
<ctl name="IIR1 Band3" id="2" value="0" />
<ctl name="IIR1 Band3" id="3" value="0" />
<ctl name="IIR1 Band3" id="4" value="0" />
<ctl name="IIR2 Band3" id="0" value="268435456" />
<ctl name="IIR2 Band3" id="1" value="0" />
<ctl name="IIR2 Band3" id="2" value="0" />
<ctl name="IIR2 Band3" id="3" value="0" />
<ctl name="IIR2 Band3" id="4" value="0" />
<ctl name="IIR1 Band4" id="0" value="268435456" />
<ctl name="IIR1 Band4" id="1" value="0" />
<ctl name="IIR1 Band4" id="2" value="0" />
<ctl name="IIR1 Band4" id="3" value="0" />
<ctl name="IIR1 Band4" id="4" value="0" />
<ctl name="IIR2 Band4" id="0" value="268435456" />
<ctl name="IIR2 Band4" id="1" value="0" />
<ctl name="IIR2 Band4" id="2" value="0" />
<ctl name="IIR2 Band4" id="3" value="0" />
<ctl name="IIR2 Band4" id="4" value="0" />
<ctl name="IIR1 Band5" id="0" value="268435456" />
<ctl name="IIR1 Band5" id="1" value="0" />
<ctl name="IIR1 Band5" id="2" value="0" />
<ctl name="IIR1 Band5" id="3" value="0" />
<ctl name="IIR1 Band5" id="4" value="0" />
<ctl name="IIR2 Band5" id="0" value="268435456" />
<ctl name="IIR2 Band5" id="1" value="0" />
<ctl name="IIR2 Band5" id="2" value="0" />
<ctl name="IIR2 Band5" id="3" value="0" />
<ctl name="IIR2 Band5" id="4" value="0" />
<ctl name="IIR1 Enable Band1" value="1" />
<ctl name="IIR1 Enable Band2" value="1" />
<ctl name="IIR1 Enable Band3" value="1" />
<ctl name="IIR1 Enable Band4" value="1" />
<ctl name="IIR1 Enable Band5" value="1" />
<ctl name="IIR2 Enable Band1" value="1" />
<ctl name="IIR2 Enable Band2" value="1" />
<ctl name="IIR2 Enable Band3" value="1" />
<ctl name="IIR2 Enable Band4" value="1" />
<ctl name="IIR2 Enable Band5" value="1" />
<!-- End Filter -->
<!-- Start Mix Paths -->
<ctl name="RX1 MIX1 INP1" value="IIR1" />
<ctl name="RX7 MIX1 INP1" value="IIR2" />
<!-- End Mix Paths -->
</path>

And here is the changelog/comments for DualMonoV2

Started from scratch. Really, I had a mess.

Did not split the channels in left/right and then tried to mix/mux them to make mono again, instead I plugged both earpiece and speaker to the same mono source that would have been used for speaker only.

Separated IIR filter options per transducer instead of per channel (naturally since I only have 1 source of audio). This gives the option to apply filters on the fly to a single transducer and leave the other one virtually untouched. Since I'm not applying filters to speaker, this means that whatever distortion is present in main speaker is what it would be on stock mixer file without mods.

Applied latest recommendation of filters to IIR1 (earpiece). On a separate note that I promised above, I have tested many many many filters and combinations and got to the conclusion that the distortion comes 100% from the higher frequencies. There is no change or effect on distortion when attenuating lower frequencies. I still applied a filter to lower frequencies to release the load/fatigue from the earpiece to try to produce sounds that it can't, having a less congested output maybe around the frequencies of human speech.

Applied hotword detection patches for IIR1. It surprises me that this wasn't reported earlier, without this patch, the earpiece shuts down when moving to the home screen or any other hotword detection scenarios. Chdloc has addressed this in his latest upload of the TweetMod.

Since we learned with TweetMod that the speaker can be cranked up safely and with minimal distortion about 4dBs (DualMonoV1 cranked it up to +6db...) I just added +1dB to main speaker. It is just a wink from my part to start rolling over the speaker potential.

Definitely 87 is a good spot for the digital volume of the earpiece to be. I was using 88 as my daily driver but it would hiss at me sometimes. 1dB is honestly nothing but I see less occurrences of this at 87.

I don't remember any other changes.... I am learning how to use the XDA forum code to organize text...