yashsingh1/xdaforums huggingface dataset:
[Google Pixel XL Themes, Apps, and Mods] abemore:
I made a magisk module for your dual speaker mod on Nexus 5 and/or Nexus 5X, and it worked on Oreo.

Edit: here's the N5 magisk module https://xdaforums.com/google-nexus-5/themes-apps/mod-surround-sound-t2964809/post74931720
[Google Pixel XL Themes, Apps, and Mods] kingbri:
Can you try building one for this mod?

---------- Post added at 01:42 PM ---------- Previous post was at 01:41 PM ----------

I'm a huge audiophile and your mod has helped a lot with improving sound including v4a and atmos. This mod is still widely noticed.
[Google Pixel XL Themes, Apps, and Mods] cms062407:
What are the chances this works on the Android P beta?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I'd say the chances are pretty good as the mixer typically sees very little change following the first couple of updates after a device has come out. Post /vendor/etc/mixer_paths.xml of Android P DP and I'll take a look.
[Google Pixel XL Themes, Apps, and Mods] kingbri:
My magisk module will work better than the adb method, its in the rom forum
[Google Pixel XL Themes, Apps, and Mods] bige93:
it's not like I'm stupid, but I can not install this mod on my OG Pixel running 8.1 April. Trying to follow instructions and Google so hard, but no luck. Can someone please provide me with some real screenshot of cmd/terminal so I can learn what am I doing wrong.

Thank you.

Finally installed it. It works, thank you chdloc for your work.

As mentioned before, earpiece is too quiet. At first I couldn't hear it working, and after blocking loudspeaker with my finger I manager to hear earpiece. I know there is currently no way to make it louder.

Coming from Nexus 5X, where stereo is done by modifying mixer path xml, I wounder why there is no similar solution on Pixel?

Thanks for explaining.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Well, you can make the earpiece speaker louder but only at the expense of higher distortion.

If you don't care about distortions, then you can easily increase the earpiece's perceived volume by adding/modifying the following line inside the "speaker" tag:

<ctl name="RX0 Mix Digital Volume" value="X" />

where X=[0,1,...,84,124]. X=84 corresponds to 0 dB. Each tick above that will increase the gain by 1 dB. Note that each time you change the value you will need to reboot your phone for the changes to take effect.
[Google Pixel XL Themes, Apps, and Mods] bige93:
Could you please indicate where exactly should it be corrected? And do I need to install your note first and then correct this?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
After installing the dual speaker mod, open /vendor/etc/mixer_paths.xml in an editor, search for the following

<path name="speaker">
<ctl name="QUAT_MI2S_RX Channels" value="Two" />
<ctl name="spk Profile" value="music" />
<!-- chdloc: the below is a copy of the handset device -->
<ctl name="SLIM_0_RX Channels" value="Two" />
<ctl name="SLIM RX0 MUX" value="AIF_MIX1_PB" />
<ctl name="RX INT0_2 MUX" value="RX0" />
<ctl name="RX INT0 DEM MUX" value="CLSH_DSM_OUT" />
<ctl name="RX0 Mix Digital Volume" value="84" />
<ctl name="EAR PA Gain" value="G_6_DB" />
</path>

and increase the value currently set for "RX0 Mix Digital Volume" to something higher, say, 90.
[Google Pixel XL Themes, Apps, and Mods] sajjads24:
hi

can i install it on i9100 with lineage 14.1 ?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
No, this is a Pixel (XL) only mod.
[Google Pixel XL Themes, Apps, and Mods] xmoox:
I had a question regarding the stereo camcorder capture. I tried to manually add these files into vendor/etc changed there permissions to 644. I manually moved mixer_paths__dualREC.xml renamed too mixer_paths.xml and media_profiles_V1_0__stereo.xml renamed to media_profiles_V1_0.xml. Rebooted the device and its still recording in mono. I tried open camera as well. I'm on 8.1 resurrection remix. I believe it's aosp base so that could be the problem. Any help would be appreciated. I read your scrip and it seems that it just renames the exiting files then copys the two files and renames them correctly.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
It is possible that the camcorder apps don't use the "camcorder-mic" device in your case. Make a camcorder recording and get me the output of the following shell command (or appropriate logcat app):

logcat | grep audio_hw

shortly after you've done the recording.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Yes, your logcat suggests that the recordings are, indeed, stereo. Did you plug in a pair of headphones to double-check while playing back the video?
[Google Pixel XL Themes, Apps, and Mods] xmoox:
Yeah I tried headphones it was hard to tell. It however is definitely working. I just opened the video in mx player and it gives a ton of info and it says stereo.

Sorry about that. I appreciate the help.

Thank you for the mod!
[Google Pixel XL Themes, Apps, and Mods] Cyber Cactus:
Hello, I'm sorry if I sound stupid but after installing this mod the ear piece still makes no sound, whether I'm on stereo or mono. I am rooted through Magisk, does that interfere with this or prevent this from working? I don't believe Magisk is restricting the root permissions or anything when the app is active, but I don't know enough to figure out the cause of this not working.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
It's been a while since I played with this, but I believe that the latest iterations of Oreo don't allow you to make permanent changes to the system or vendor partitions directly. You can edit the files, but they revert right back after a reboot. You would have to go the Magisk route. I do not have a Magisk installer for this mod, but it was mentioned here that someone else did make one.
[Google Pixel XL Themes, Apps, and Mods] vic97:
Hi,

This mod does not work on android 9, august 5 2018 security patch
[Google Pixel XL Themes, Apps, and Mods] kingbri:
The mixer paths must have been changed
[Google Pixel XL Themes, Apps, and Mods] kinfolk248:
dang, i will REALLY looking forward to having stereo speakers lol ;-[
[Google Pixel XL Themes, Apps, and Mods] kinfolk248:
is app development dead on this??

I get stuttering/choppy playback for the first couple seconds...
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Yes, pretty much. There has been virtually no interest in this mod recently.

I'm quite busy with life and work and I returned my Pixel to full factory stock software a couple of months ago.

Having said that, I'd be happy to bring someone up to speed on DAC modding so this (or similar) mod(s) could live on...

This is likely not related to the mod itself. Are you running a custom kernel? If so, then I'd say that is your issue.
[Google Pixel XL Themes, Apps, and Mods] kinfolk248:
oh ok well thanks for the hard work and for the reply

yea i got it figured out, it was a borked rom...
[Google Pixel XL Themes, Apps, and Mods] Daniel_356:
No me deja abrir el archivo
[Google Pixel XL Themes, Apps, and Mods] bumayang:
hi, i tried installing it on android q but it wont work

you chose to install the dual loudspeaker mod

mount: '/system' not in /proc/mounts

cp: /system/etc/mixer_paths.xml.stock: Read-only file system

chmod: /system/etc/mixer_paths.xml.stock: No such file or directory

cp: /system/etc/mixer_paths.xml: Read-only file system

chmod: /system/etc/mixer_paths.xml: No such file or directory

cp: /system/etc/audio_platform_info.xml.stock: Read-only file system

chmod: /system/etc/audio_platform_info.xml.stock: No such file or directory

cp: /system/etc/audio_platform_info.xml: Read-only file system

chmod: /system/etc/audio_platform_info.xml: No such file or directory

mount: '/system' not in /proc/mounts

Installing speaker control app/service

Success

Installation complete

if u have the time, could u probably make even just the dual speaker mod working for q? i would really appreciate it

ps: i also tried kingbri's mod but that required me to downgrade to p and i certainly wouldn't want that
[Google Pixel XL Themes, Apps, and Mods] stifmaster81:
+1

Enviado desde mi Pixel XL mediante Tapatalk
[Google Pixel XL Themes, Apps, and Mods] dbugdan:
Is there a way to disable this? I listen to music in the background and I don't want it to blast off when my screen turns off. I always have my phone on vibrate so notifications and alarms are not an issue for me.

Also, when I have it set to "Mono" and "Mode: adaptive" in the app, it behaves as if it's just "Mode:Stock" - that is, the sound only comes from the bottom speaker (in un-reduced volume). Is this the intended behavior? Or is it supposed to come from both speakers in mono? This isn't an issue because I can simply change the sound to mono in the accessibility settings built into Android but I was curious nonetheless.

Maybe it's because I flashed it via Magisk on Android 10...

Thanks for developing this mod though. Really appreciate it.
[Google Pixel XL Themes, Apps, and Mods] dbugdan:
And by the way, does anyone know which line(s) I need to edit in mixer_paths.xml to boost the earpiece volume? Sometimes it's hard to hear the other person when I'm in a call.
[Google Pixel XL Themes, Apps, and Mods] yung40oz84:
Ya I can hear the ear piece on both, more faint in monk, but stereo is too low to listen to my music, lol. This is a great mod though, mono sounds great. What is the ideal choice? Stereo or Mono?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Only you can answer this question, and I think you did.
[Google Pixel XL Themes, Apps, and Mods] yung40oz84:
Ok I got a question,i used the mod for awhile, then went back to normal. Originally there was no files in my/su/etc anyway so I deleted the one from this mods archive. Put everything back to normal now every time I reboot my device when I press my home button the systemUI crashes. Weird I know. But, when I got to systemUI tuner and hit reset, then save it works again but I have to do it every reboot, any ideas???
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Did you also delete the bind mount in /su/su.d? If you did, then there is no way this mod has anything to do with the issues you are seeing
[Google Pixel XL Themes, Apps, and Mods] yung40oz84:
Yes, I did, it started immediately after removal and reboot, nothing when installed or before installed.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Did you mess with the system partition at all when trying to set up the mod? If you did then you may have changed something by accident.
[Google Pixel XL Themes, Apps, and Mods] yung40oz84:
No, no system bud
[Google Pixel XL Themes, Apps, and Mods] chdloc:
OK, unless I receive similar reports from others I would consider the problems you've seen a coincidence.
[Google Pixel XL Themes, Apps, and Mods] sir-harlekin:
Is there any chance to port this over to OP3?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I put in a fair amount of work to get this to work on a device that I have on hand. It would take a lot longer to get this to work on a device that I don't own.

I suggest you request this functionality over in the OP3 forum. Maybe you can get a dev interested, who could certainly use the information that I've provided so far to get started.
[Google Pixel XL Themes, Apps, and Mods] taranfx:
I'll be happy with dual speaker mono, can you give me an estimate how much louder does the speaker get with mod vs without?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Well, all the mono mod does is add the earpiece speaker to play the left channel next to the overpowering main speaker (which is not modified at all). The overall perceived loudness may go up slightly, maybe by a dB or two. You would need to be able to crank up the earpiece speaker to the same level as the main speaker to get a, theoretically, 6 dB increase in overall loudness. This is impossible, though.

The stock implementation has the main speaker volume maxed out and the only way to increase the volume further is to use something like Viper to control the sound on a system-wide level in software. (You would likely only increase distortion that way, however.)

Note that I'm controlling the hardware directly.
[Google Pixel XL Themes, Apps, and Mods] nednednerb:
Doubling the power is an increase of 3.01 dB. 10*log(2)

Doubling the distance from a sound source is roughly 6 dB of level difference (but some frequencies may be more or less directional so skew the number. The power value is more exact.

You're very right about distortion. I don't think I'm interested in a mod like this because making use of it might damage or wear the speaker faster.

I think investing in a bluetooth speaker makes a lot more sense to me.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
You are correct in that the perceived volume generally only increases by 3 dB when playing "random" signals out of two loudspeakers. However, in theory, you do get up to 6 dB when you add two identical signals exactly in phase (constructive interference). It does not happen often in actual music playback, but that's the maximum theoretical value that I quoted above.

No, it doesn't. If you run the mod at the levels that I suggest there will be no damage or long-term wear. I'm running the earpiece at the same exact maximum volume as it is driven during a phone call, i.e. within its designed specifications. Please don't spread FUD.
[Google Pixel XL Themes, Apps, and Mods] nednednerb:
If you listen to a pure tone instead of actual music, you get phase coherence and slightly higher acoustic pressure.

With noise or music you get much closer to 3dB, so "theoretical" is fairly irrelevant compared to actual common sound sources.

Hmm, if people only use at recommended level which is quieter than the louder speaker, you definitely won't get a double of the power. Just a more slight increase (in my own theoretical grasp of the situation.

There's more detail here:

http://forums.prosoundweb.com/index.php?topic=95177.0

Obviously, not everyone agrees about this... I think I have fair doubts. It would literally take a SPL meter to know with certainty, and multiple program materials to be relevant.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
There is no contradiction here. I only laid out the theory and you are referring to common use-cases. There is no need to argue this any further.

Of course, this is exactly what I said above. There is absolutely no way to boost the earpiece to achieve the same loudness as the main speaker. You will have to lower the gain of the main loudspeaker to try to match the perceived loudness of the two. Whether this approach is "worth it" is and remains a personal preference. No more, no less.
[Google Pixel XL Themes, Apps, and Mods] nednednerb:
Okay.. you said you were doubling the source, then you said the need is for lowering the main so they're about the same...

Am I unclear about something to think these details -are- contradicting?

I am just a studied and experienced audio engineer, with some doubts and questions, here.

I will butt out now because you're right. There is no point in arguing which concepts to rely on..

Have a good day.
[Google Pixel XL Themes, Apps, and Mods] shotonhead:
Now that twrp is available any plan on flashable zip to make the processes easy?a lot of ppl would prefer an easy process..btw great job?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I think we got here because a user above asked about the perceived loudness gain of my mod in the "mono" version vs. stock, i.e. when the main speaker plays at stock volume while the earpiece is added in at a much lower volume. In that case, as you seem to be very aware, the overall loudness is only marginally higher (maybe a dB?) as the earpiece speaker only adds a "little bit to the picture". We can only expect to get higher overall loudness if we were able to increase the earpiece speaker to play at the same loudness as the main speaker. This is not possible, however. On the other hand, if we lower the main speaker playback volume to play at the same exact loudness at the main speaker, we are getting into the realm where constructive interference can, theoretically (!), make a 6 dB difference in SPL. But you were correct in pointing out that even in that scenario, a 3 dB increase in SPL is more realistic.

We seem to have a similar background. I'd be happy to explain everything at any level of detail you desire. Let's proceed via PM, though, to keep this thread from diverging.

I'm currently very busy at work, but yes, the plan is to release a flashable zip in the near future.
[Google Pixel XL Themes, Apps, and Mods] Xaikar:
Looking forward to that .zip I just don't have the time with my own work and child to mess with it.
[Google Pixel XL Themes, Apps, and Mods] epicroot:
Deleted
[Google Pixel XL Themes, Apps, and Mods] kapilathi:
Does it work work oneplus 3?
[Google Pixel XL Themes, Apps, and Mods] aaron.hossain75:
Does this work on other devices ? running lollipop cm 12.1
[Google Pixel XL Themes, Apps, and Mods] chdloc:
This mod is hardware-dependent and very likely needs to be adjusted to work on other phones. It is particularly difficult to port this mod to other phones that have an external speaker DAC/amplifier (such as the OP3) without having physical access to it. Your best bet is to ask for support in your phone's forum.
[Google Pixel XL Themes, Apps, and Mods] aaron.hossain75:
Alright, thanks .
[Google Pixel XL Themes, Apps, and Mods] aiinjylls:
Is this not compatible with the regular Pixel?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I don't see a reason why it would not be, unless the regular Pixel has a different speaker DAC/amp.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
WARNING: The latest Pixel system update (Android 7.1.1; NMF26O) broke dual-speaker playback in its current form. In a nutshell, Google seemed to have pushed audio initialization ahead of the point where system-less root engages and facilitates the bind mounts. The problem is that mixer_paths.xml is read only once where now the modified mixer_paths.xml file is not yet available. It appears that /system needs to be modified (among other things) to regain dual-speaker playback capabilities.
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
For those of us staying on 7.1... will there be any update? in call volume doesn't seemed to be fixed I still have to toggle speakerphone to hear ppl.. also, what is the difference between setting the headset gain in mixer_paths.xml vs the headset gain in a modified kernel such as flar's?

this is an awesome mod btw it really helps when using my phone and laying down as I usually set the phone down on my chest and it ends up covering the bottom speakers
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Are you using mixer_paths.xml from here (and the app from here)? I thought that this mixer_paths.xml fixes the no RX telephony audio...

The advantage of adjusting the gains with, e.g., [MENTION=4684315]flar2[/MENTION] 's kernel is that the values are cached so they can be changed dynamically and they "stick".
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
oh damn, no I just manually put in the additional mixer_paths lines that were stated in the op but I will def try the one you supplied in the zip. as for the app, no I wanted to use my own conditions for when the mod was applied so I just used tasker to set the conditions for issuing the relevant echo commands.

to fix the incoming call issue, are the new mixer_paths modifications enough to fix that or do I need to make a tasker condition for incoming calls? (while I appreciate the app you made, I rather have more control as to when I would like it to be stereo/quieter vs mono/louder)

also to be more clear, say that I have 6db for headset gain in mixer_paths and then have it at 0db in flar2s kernel, which one is taking priority? if I turn the kernel headset gain to 6db then will the gain be 6 from mixer paths + 6 from kernel = 12?

thanks for bearing with me and answering my questions... I'm just trying to understand what's going on
[Google Pixel XL Themes, Apps, and Mods] chdloc:
No new Tasker magic required.

flar's gains take over and any headphone-related gain changes in mixer_paths.xml will be ignored.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
It indeed turns out that to re-enable dual loudspeaker playback on the latest Android version (NMF26O), the audio mixer, mixer_paths.xml, needs to be modified in /system/etc directly. For those of you who have used this mod on the previous Android version, you can simply copy your modified mixer_paths.xml file to /system/etc. I'll be releasing an installer script (as TWRP is not quite there yet) for other interested folks soon.
[Google Pixel XL Themes, Apps, and Mods] mazubo:
Thanks for your work on this!
[Google Pixel XL Themes, Apps, and Mods] defvayne:
I will wait on that script. Confused at the moment with the procedure
[Google Pixel XL Themes, Apps, and Mods] Poli169:
Will this also work for the regular pixel?
[Google Pixel XL Themes, Apps, and Mods] Freak07:
Thank you very much for this! :)
[Google Pixel XL Themes, Apps, and Mods] Paddybecks87:
[MENTION=2760454]chdloc[/MENTION]:

So, if stereo mode has been enabled before, it should still be active when switching to "mode:stock", or is the stereo capability automatically deactivated?

Thank you for your work!

Regards
[Google Pixel XL Themes, Apps, and Mods] airmaxx23:
When I try the line "tar -xf chdloc_hardware_audio_mods_pixel.tar " I just a bunch of "operation not permitted" errors.
[Google Pixel XL Themes, Apps, and Mods] -DarkKnight-:
you forgot to ask for root in adb shell
[Google Pixel XL Themes, Apps, and Mods] airmaxx23:
Thanks, I didn't see that in the instructions anywhere. I see it now.

Should the app open when I press on it? The screen flashes white for a split second and that's it. I think I misunderstood what this mod does, I thought it enabled the second speaker on the bottom of the phone. With stereo enabled it's so quiet that I don't think I'd really use it much.

Edit: When trying to uninstall the mod I get the following error after pressing 9.

rm: /system/etc/media_profiles.xml.stock: No such file or directory

Is there another way to remove it?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
If it says "MODE:STOCK" in the notification, then the main loudspeaker should stay loud and play the downmixed signal, regardless whether the screen is on or off.

There is no second speaker on the bottom of the phone.

The app has no UI other than the permanent notification. It is really a service that automatically starts upon boot. Keep in mind that you will need to unlock the phone twice after the boot process has been completed for the service to become active. The reason for this is that Android only makes most services available only after the initial unlock as a security feature. After that the screen needs to turn off at least once for the speaker control service to detect the screen state.

You are back to stock. You can safely ignore that error.

You may want/need to manually uninstall the speaker control app/service.
[Google Pixel XL Themes, Apps, and Mods] airmaxx23:
I just noticed something that I'm not sure about. Before I grant the app SU permission the dual speaker mod is pretty loud, once I grant SU permission the volume drops a lot. Is this normal?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Yes, this is the intended behavior (by default, the speakers go into stereo mode with the main loudspeaker dropping in volume when the screen is turned on). The app/service can only function with superuser privileges. I need to make that clear in the relevant post. Thanks for pointing it out.
[Google Pixel XL Themes, Apps, and Mods] defvayne:
I did all this and I do not see a perm notification anywhere. Am I missing something?

Edit: Found an apk file within the mod folder and installed it. Now the both speakers work. But the volume level is low. Is that normal?
[Google Pixel XL Themes, Apps, and Mods] airmaxx23:
That's what I noticed, I like the idea of the dual speaker mod but it doesn't seem loud enough to be useful.