yashsingh1/xdaforums huggingface dataset:
[Google Pixel XL Themes, Apps, and Mods] chdloc:
My installer script should have installed that apk for you. Did you see an error message during the installation?

The fact that the overall volume is significantly lower in stereo is normal. Otherwise the main speaker would overpower the earpiece and no stereo effect would be audible.

This is a hardware limitation. Whether the resulting volume in stereo is too low for you is personal preference.

Again, this is a personal preference. When I use my phone at home, then I really enjoy the stereo sound and, for me, the level is perfectly adequate for media consumption. Of course there are plenty of scenarios where the level is not adequate. Then the notification could help cranking up the volume of the main loudspeaker. If you cannot find any usefulness of this mod, that's OK, but then you'll need to move on because there is nothing that can be done to increase the overall volume while retaining a stereo image and keep distortion low. Sorry.
[Google Pixel XL Themes, Apps, and Mods] defvayne:
No error message when script ended. And the was no installer also.
[Google Pixel XL Themes, Apps, and Mods] airmaxx23:
I apologize if it sounded like I was being negative, I was just letting him know that it was low for me as well. It's a great mod, I realize it can't be louder but I still wish it could.
[Google Pixel XL Themes, Apps, and Mods] testimony:
Has anyone tried it on the regular, smaller pixel variant? Does it work?
[Google Pixel XL Themes, Apps, and Mods] Shadow of Destiny:
Note that the Gain will also change on your headphones.

Gesendet von meinem Pixel XL mit Tapatalk

---------- Post added at 07:09 PM ---------- Previous post was at 07:09 PM ----------

Should work on smaller Pixel, too.

Gesendet von meinem Pixel XL mit Tapatalk
[Google Pixel XL Themes, Apps, and Mods] chdloc:
No, it won't. I'm changing the main loudspeaker gain by writing to a register inside the speaker amp, which sits outside the headphone path.
[Google Pixel XL Themes, Apps, and Mods] Shadow of Destiny:
On my Pixel the gain changed on the headphones after i have done your modifications.

As soon as I changed the mixer_paths back to original the gain was away.

Gesendet von meinem Pixel XL mit Tapatalk
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Interesting. Which option did you install? Are you referring to an adaptive change in gain or a static one?
[Google Pixel XL Themes, Apps, and Mods] Shadow of Destiny:
I have only doen the modifications as mentioned above. And just the 6DB gain.

After I reverted it all, gain in headphones was away.

Gesendet von meinem Pixel XL mit Tapatalk
[Google Pixel XL Themes, Apps, and Mods] chdloc:
The installer offers eight options. Which one did you select?

Are you referring to an adaptive change in gain (changing with the screen state) or a static one? A static change in gain may be possible as I disable the COMPANDER in the headphone path for my biQuads mod, but you would need to select an appropriate option in the installer for that to take effect.
[Google Pixel XL Themes, Apps, and Mods] Shadow of Destiny:
I havent used any installer...

I changed the files with root explorer.

Gesendet von meinem Pixel XL mit Tapatalk
[Google Pixel XL Themes, Apps, and Mods] chdloc:
OK, could you post the mixer_paths.xml file you used where you noticed a change in headphone volume? (Again, was the gain change static or dynamic? One channel or both channels?)

I checked my posts before I made the installer available and nowhere did I suggest to change anything related to gain in the "headphones" device.
[Google Pixel XL Themes, Apps, and Mods] Shadow of Destiny:
There you have it:

http://cloud.tapatalk.com/s/5864f411c3f72/mixer_paths.zip

Gesendet von meinem Pixel XL mit Tapatalk
[Google Pixel XL Themes, Apps, and Mods] chdloc:
While I still don't think what you are describing is possible with the mixer_paths.xml file you shared, I'm going to leave it at that as you have implemented my very first stab at this mod. It has been refined a few times since then. I can guarantee you that the current version does not (unintentionally) change the headphone volume.
[Google Pixel XL Themes, Apps, and Mods] Shadow of Destiny:
I can only tell you what I have discovered.

Gesendet von meinem Pixel XL mit Tapatalk
[Google Pixel XL Themes, Apps, and Mods] [Gorgasm]:
Hi [MENTION=2760454]chdloc[/MENTION] !

Finally, I recently buy a Pixel XL and use it for 3 weeks, I even recorded some videos during a concert this week and it's very impressive out-of-box, I just installed your mod for stereo capture and let all stock values, here an example (be aware, it's death metal :p ) :

https://youtu.be/Vq5k0uNMQgQ?list=PL0AHcmKahep5OcrEOMria8fkPvAFSF7na

So, if I want to play with the volume controls for the two microphones (like with the Nexus 5), I have to change the values of DEC6 and DEC7 (88 by default for both) in camcorder-mic section, right ? Does each stick change the gain by 1 dB ? Thanks !
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Yes, thank goodness that my huge Nexus 5 hack does not appear to be needed anymore.

Just to confirm, the video you shared was not recorded wit the stereo recording mod in place, though, correct?

Yes to both questions.
[Google Pixel XL Themes, Apps, and Mods] [Gorgasm]:
Yeah, I've just installed the mod before going to the concert but I forgot to reboot so the changes to mixer_paths were not applied.

Thank you for your tips and advises ! :)
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
So I can push the files but can't get the second line to work in adb root shell ? Any ideas?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
What error messages are you seeing?
[Google Pixel XL Themes, Apps, and Mods] skulldreamz:
did you adb shell before extracting the gzip? I didn't do that the first time and took me a minute to realize that. Not sure if that's your error but anyway...
[Google Pixel XL Themes, Apps, and Mods] MasK:
[MENTION=2760454]chdloc[/MENTION] Thank you for this mod!

I've got a question though. All I need it the mono mod to stay on permanently. Don't require the other options.

So if I set it to mono and block it's notification, will the service still run?

Also, I don't understand the mode options stock/adaptive. If I want it to be loud all the time, I select stock?

Thank you!!
[Google Pixel XL Themes, Apps, and Mods] chdloc:
If all you want is the earpiece enabled with the main speaker always playing at high volumes, then simply uninstall the app/service after everything is said and done.
[Google Pixel XL Themes, Apps, and Mods] MasK:
Excellent! Froze it in TB until further use :)

Thanks
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
Help

I can enter the first command and adb push the file but when I put i try to do the second adb command it never goes through gives a cant gzzip error. Also in root shell I cant copy and paste the command word for word.

I am on pure nexus with elemental kernel 1.0.3 running. Sprint Pixel XL

Just wondering if someone can walk me through it?

adb shell

su

then I enter the second adb code listed above and it doesn't want to work.
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
Error

Been getting gzip: cant gzip open chdloc_hardware_audio_mods.gz when adb shellling the second line in this post. The first adb push command works but I cant get the second adb command to run in root shell allways get this error?

Any Ideas? I extracted the file to my adb platform tools where my adb is located and typed adb shell and then su and then command but always get an error. Any idea why?
[Google Pixel XL Themes, Apps, and Mods] Freak07:
The first ADB push you can do from your pc. Once that is done look in data/local/tmp with a root explorer. The file you just copied should be there.

Now download terminal emulator to your phone.

Open it

Type "su"

Grant superuser access

Now copy the second command [MENTION=2760454]chdloc[/MENTION] posted into the terminal on your phone

If no error occurs copy the install command to terminal on your phone and choose the option you desire.
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
same error when entering second line

cant gzopen chdloc_hardware_audio_mods_pixel.tar.gz??

Any reason I keep getting this error on pure nexus with elemental 1.0.3 installed? Is there another way?

Also how do I copy and past into terninal it never lets me copy and paste the second line only the first and then once i enter root shell it wont let me copy and paste so im stuck typing it everytime which takes for ever. Im close to giving up. Any other help would be greatly obliged?/
[Google Pixel XL Themes, Apps, and Mods] Freak07:
I copied the commands to a file I created in root explorer. From there I can copy and past them with no problem.

I use this terminal emulator:

https://play.google.com/store/apps/details?id=jackpal.androidterm

Long press, paste, enter and it gets executed correctly
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
Sorry rookie over here u extracted the zip file folder where all the mixer psth filrs are to the location where adb is located?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Can you tether your phone to a PC and use adb? It would be much easier that way. Also, I'm still not clear what error message you are getting. Please post exactly what you are seeing on the screen. Better yet, post screenshots of what you've tried.
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
Yeshiva I can tether from PC but still getting errors with the gz zip....cant open gz zip. here is where I extracted the folder. Once its in data local tmp what do I do with folder/ scripts??
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
delete
[Google Pixel XL Themes, Apps, and Mods] chdloc:
As you seem to have succeeded in extracting the archive, now you can go into a shell and do the following as root

cd /data/local/tmp

and then

sh install_chdloc_mods.sh
[Google Pixel XL Themes, Apps, and Mods] Freak07:
okay I will try it one last time. :) before you start delete everything in your data/local/tmp Folder.

1. you download the Archive from this post to your pc! do not extract it in any way.

connect your phone and do an adb push of the file.

adb push chdloc_hardware_audio_mods_pixel.tar.gz /data/local/tmp/

This command simply copies the file to data/local/tmp on your phone.

2. and now you have to open terminal on your phone.

type:

su

afterwards copy this command

cd /data/local/tmp && gzip -d chdloc_hardware_audio_mods_pixel.tar.gz && tar -xf chdloc_hardware_audio_mods_pixel.tar && cd chdloc_hardware_audio_mods_pixel && chmod 744 install_chdloc_mods.sh

to your terminal and press enter.

3. finally copy

./install_chdloc_mods.sh

to the terminal and press enter

---------- Post added at 03:31 PM ---------- Previous post was at 03:28 PM ----------

[MENTION=2760454]chdloc[/MENTION]

doesn´t he also have to do

chmod 744 install_chdloc_mods.sh

as it seems to be 644 on his screenshot?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Not necessarily. You can also execute a script, say script.sh, without it being explicitly executable by by passing its name to the shell, i.e.

sh script.sh
[Google Pixel XL Themes, Apps, and Mods] wavehk:
great mod, stereo working so great on youtube videos and netflix. But when i am playing some games only the top speaker is working, and some other games dont even have sounds, hope that provides some information for you
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Could you please share the names of some of the games where only the top speaker is working as well as examples when there is no sound at all?
[Google Pixel XL Themes, Apps, and Mods] wavehk:
i played starwars force arena where there is no sound at all

play.google.com/store/apps/details?id=com.netmarble.starwars

and then line gundam wars where only top speaker is working(not sure if you can download through play store, i can extract an apk if needed)

play.google.com/store/apps/details?id=com.linecorp.LGSDG
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I installed Star Wars Force Arena and I had sound, although only from the earpiece. I think I found the problem.

The issue seems to be related to a particular audio topology use-case. Android 7 introduced a new use-case called ultra-low latency (ULL) which seems to be active in VR mode and also in some apps that require very low audio latency. I modified all use-cases to make use of both loudspeakers, including the ULL use-case (the others are offload, low-latency and deep-buffer), which seems to be causing the issue you've seen. Until I come up with a better solution, a workaround is to turn off the earpiece when in ULL mode. To do that you will need to edit your /system/etc/mixer_paths.xml file. Replace the following section:

<path name="audio-ull-playback speaker">
<ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia8" value="1" />
<!-- chdloc (dualLS): below enables the BE to FE in the DAC for earpiece -->
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia8" value="1" />
</path>

with

<path name="audio-ull-playback speaker">
<ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia8" value="1" />
<!-- chdloc (dualLS): below enables the BE to FE in the DAC for earpiece -->
[COLOR="Red"]<!--[/COLOR] <ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia8" value="1" /> [COLOR="red"]-->[/COLOR]
</path>

followed by a reboot. Let me know if you are not comfortable manually modifying a system file and I'll create a new installer for you to test.
[Google Pixel XL Themes, Apps, and Mods] wavehk:
Thanks for the update ;)

I have no issue on modifying the xml, but i think i may just rollback to stock atm to output sound properly in games. Looking forward to see a solution to this!
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Before you revert, could you please do me a favor and test the workaround with the "problematic" games you have identified?
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
First how do you get the speaker icon to go away in the status bar when music is not playing. Second how do I get it to open automatically when music or a video is playing? There used to be options where you could decide when it would show up???
[Google Pixel XL Themes, Apps, and Mods] chdloc:
The speaker icon represents a permanent notification that will allow you to change the loudspeakers' behavior (stock vs. mod) at will. Pull it down and you will see the available options. A permanent notification is the easiest and most efficient option to handle this without introducing battery drain. The only way to get rid of the speaker icon is to uninstall/freeze the "Pixel Speaker Control App", but then you will not be able to interact with the mod and its behavior defaults to a loud main speaker along with a supplementing, much quieter, earpiece.
[Google Pixel XL Themes, Apps, and Mods] wavehk:
I have just commented the line you have marked, now the sound of the game has gone back to the bottom speaker. But note that the star wars force arena game only had sound once the game started (the light saber effect), then remains no sound for the rest of the game.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Star Wars Arena plays sound just fine for me. Maybe there is something else happening on your phone? Does audio play via headphones? You could try looking for cues in the kernel messages

dmesg|grep AUD

Have you come across other games that do not output any sound with the dual speaker mod in place? Has anybody else seen this?

I found a solution to your original report of only the earpiece playing in certain scenarios. I'll post an update in a bit.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Update uploaded to OP.

There are now two installers available:

Option 1 : retains ultra-low latency (ULL) audio playback, but only supports the main loudspeaker to be active in cases where ULL is being asked for

Option 2: allows both loudspeakers to be active even when ULL is being asked for by an app. However, under the hood ULL is converted to low-latency playback only.

I was unable to get both loudspeakers to play simultaneously in ULL mode on a stock system/kernel. ULL seems to invoke very different data handling code inside the kernel (from IRQ-based to non-IRQ-based). It appears that two backends (SLIMBUS_0_RX and QUAT_MI2S_RX) cannot be simultaneously active in non-IRQ mode. It is possible that this "problem" can be fixed with a custom kernel, but I really don't want to go that route. That's why I opted to re-route the ULL plumbing to make use of the low-latency path instead. According to the AOSP source code (platform.c), ULL promises 7 ms of latency while low-latency promises 13 ms. Whether that delta makes a difference in day-to-day use, particularly in VR mode, I don't know (yet).

One other update includes an increase of the AAC-encoded audio bitrate in the stereo camcorder recording mod from 96 kbps to 288 kbps.
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
adb commands with new options

deleted
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
deleted
[Google Pixel XL Themes, Apps, and Mods] treIII:
Can this be installed manually with a root explorer app or does the command have to be ran? Thanks
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Absolutely. Take a look at the shell script in the archive for instructions on which files to copy for the mod you want to try.
[Google Pixel XL Themes, Apps, and Mods] treIII:
So if in install manually do I have to run the shell script? I got confused from your response. Though I'm sure it's excellent
[Google Pixel XL Themes, Apps, and Mods] chdloc:
You do not have to run the script if you know how to install the mod manually. I suggested you take a look at the installer script to assist you in selecting the appropriate files to copy. May I ask why you don't want to use the installer?
[Google Pixel XL Themes, Apps, and Mods] treIII:
I don't understand where to put the files manually. I downloaded the no ull tgz. I extracted it. I do not see where it says to put the files to copy. Thanks
[Google Pixel XL Themes, Apps, and Mods] skulldreamz:
In data/local/tmp I believe. Then install it using the shell script in the directions.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
The script copies the files in place for you. The OP lists all the steps you need to take to install the mod(s).

I still don't understand why you are not simply using the installer. Are you having trouble executing the shell script with an adb shell or with a terminal app?
[Google Pixel XL Themes, Apps, and Mods] treIII:
Honestly, being lazy and can't copy the script to put in terminal
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Unless you are already familiar with modding system files and reading shell scripts, it would be much quicker and easier to use the installer.

Best way of installing the mod is by tethering your phone to a PC and run an adb shell, which offers easy copy-and-paste capabilities. Alternatively, you can copy the string of commands from the OP by loading it in the browser on your phone. Then use the app "Material Terminal" to paste it into a root shell.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I finally got around to measuring an effect that I have noticed from the very beginning with the dual-speaker mod:

Especially when listening to speech signals, a "hollow" quality of the audio becomes apparent. This hollow-ness, which can add sense of space especially for music material, is typically generated by asymmetric audio delay. Sure enough, I measured the delay between the earpiece and main loudspeaker to be 9.2 ms (440 samples at 48 kHz sampling rate). I simply played a single "click" simultaneously delivered to both loudspeakers and captured the sound with an external microphone pointed to the center of the phone, see attached compressed wav file.

Note that this behavior can be expected when two different codecs (earpiece driven by the Qualcomm WCD9335 and main speaker driven by the NXP TFA9891) with distinct DSP-related buffering are being used.

As I'm not sure there is anything that can be done other than introducing a delay line into the earpiece path (this is the "quicker" channel) in software, this post is mainly meant as a reference for myself and mostly an FYI for others.
[Google Pixel XL Themes, Apps, and Mods] evolzar510:
I tried installing it by typing the commands in Material Terminal app on my phone and every time, it says "can't gzopen chdloc_hardware_audio_mods_pixel__no_ull.tar.gz... ......" The only method that's worked so far is replacing my stock mixer_paths file with the modified one that enables stereo speaker but because it messes up the earpiece during phone calls, I can't use that.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I cannot reproduce the error you are seeing when trying to use the installer. Can you post a screenshot?

What is being "messed up" with the earpiece during phone calls? Please post the mixer file that produces the problem.
[Google Pixel XL Themes, Apps, and Mods] evolzar510:
For the earpiece being messed up, I was referring to the older method where everytime you answer a call, the earpiece wouldn't have any sound until you press the "Speaker" to turn on the loud speaker then pressing it again to go back to earpiece. I'll post pics of the error I'm getting.

Also, someone on the Pixel forum (non-XL) told me they got this mod to work on the 5 inch pixel. Any idea if it'll really work on the smaller device?

Edit: I'm getting this message now when I type in the command. on my phone using Material Terminal:

http://imgur.com/gzIeDTg

This is what I see when I try to type the commands through adb shell on my computer:

http://i.imgur.com/yRmkUxd.png
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Yes, the mod should work on the regular Pixel as well.

The problem is that you have to execute the commands in a root shell.
[Google Pixel XL Themes, Apps, and Mods] evolzar510:
Oh, I thought I was doing that already, guess I didn't lol. Could you tell me how to do that either on my phone or on windows 10? Thanks
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Just execute

on the command line (and potentially grant the required permissions) before you copy the string of commands into either shell.
[Google Pixel XL Themes, Apps, and Mods] evolzar510:
I actually managed to do it by following Freak07's instructions. It works great now thanks! I just wish Google would've implemented this from the start because without a dedicated loud speaker at the top, it's just so tinny even with your mod. Still, awesome work, chdloc.

Edit: I actually manually unzipped the .tar.gz file and pasting the contents into data/local/tmp folder using root explorer. For some reason, I couldn't extract it using that second line of command you posted in the OP. It was the only way for me to get it to work
[Google Pixel XL Themes, Apps, and Mods] bbender716:
Strangely, I can get to the instal script step, but upon executing (yes, from a root shell), I get "can't execute: Permission denied" even though it's from #...
[Google Pixel XL Themes, Apps, and Mods] chdloc:
That error means that the shell script is not executable. Run

chmod 744 install_chdloc_mods.sh

first.

I see that copying that long string of commands is error-prone. I'll try to simplify that in a future update.
[Google Pixel XL Themes, Apps, and Mods] Juzman:
Sweet mod, used the installer for chdloc_hardware_audio_mods_pixel__no_ull and chose everything.

Now just need to read up on the biQuads thing and setup a filter for stock Pixel earphones. :) Or just remove it and not worry about it.
[Google Pixel XL Themes, Apps, and Mods] yaruk13:
My congratulations, great job sir :good:

Tell me, please - I can try the stereo mod on this topic for my xiaomi mi5s (miui8 android 6.0.1 Qualcomm Snapdragon 821 MSM8996)? Is there any hope that this will work? may need some additional manipulation, any advice? thank you for your good work
[Google Pixel XL Themes, Apps, and Mods] chdloc:
This mod works only on the Pixel and Pixel XL.

I can guarantee you that you will need to make adjustments to get this mod to work on your phone.