yashsingh1/xdaforums huggingface dataset:
[Google Pixel XL Themes, Apps, and Mods] ASimpleSock:
Help!?

Earlier I used to use this mod with superSu and it worked.

I wanted to play FE: Heroes so I installed Magisk.

Now the pixelSpeakerControl app never asks for root permission.

The biquad app just says first run and closes itself.

I have tried-

Rebooting.

Turning off Magisk Hide.

Reinstalling the app for the app.

Reinstalling the whole mod.

This mod is so great that I would remove Magisk and get superSu back if I managed to get suhide to work somehow.

Anyways, Is anyone running this on Magisk? If so, how?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Both the biQuads and the speaker control app are based on Tasker (although you don't need to have Tasker installed for those apps to function), so there is a possibility that Magisk is hiding root from Tasker. I don't use Magisk, but you may be able to find suggestions for things to try elsewhere, e.g. here.
[Google Pixel XL Themes, Apps, and Mods] ASimpleSock:
Thanks a lot.

I did that and reinstalled the mod.

It asks for permission now.

The thing is, I'm getting no sound from the earpiece.

The mod reduces the volume on the main speaker but the ear piece just doesn't work.

I've tried with SuperSu too...

Simply put, the earpiece does not work. (Although it works fine during calls.) The mod only reduces the volume on the main speaker.

Helllpp!!
[Google Pixel XL Themes, Apps, and Mods] chdloc:
The earpiece is hard-coded ON in the mixer_paths.xml file. It is important to note that the mixer_paths.xml file in /system/etc needs to be modified directly. Symlinks and/or boot scripts via systemless root and (likely) Magisk will not work, unfortunately. The reason for this is that the mixer_paths.xml file is processed (and subsequently ignored) very early in the boot sequence, way before systemless root and/or Magisk becomes available.

What you are describing suggests that in your case the mixer_paths.xml file has either not been updated or Magisk possibly converted the modified file to a symlink.

I know nothing about Magisk, so maybe someone else has a suggestion on how to fix your issue. If you are an advanced user, you could pick the appropriate mixer_paths* file from this mod's installer/archive, rename it to mixer_paths.xml, remount your system partition read-write, manually push it to /system/etc, adjust the permissions, and reboot. If this is not an option for you then I'm afraid you will have to take your pick between this mod along with superSU and Magisk.
[Google Pixel XL Themes, Apps, and Mods] ASimpleSock:
Thank. Thank you so much.

It works.

THANK YOU!

(I didn't realise I was talking to you. Hehe.)

Thanks a lot.

Have a great year.
[Google Pixel XL Themes, Apps, and Mods] kirschdog1:
Chdloc this mod works great however as of late about 3 to 5 hours later I loose my speaker volume...Any idea what might be causing this issue? Only happens hours after installing your mod. Never had this problem before?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
You are not going me much to work with. Which loudspeaker is going down in volume? By how much? 3-5 hours of continuous loudspeaker use? What ROM are you running? Any other mods that may interfere with sound?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Try capturing a kernel log and a logcat right around when the loudspeakers stop working. Also, if possible, try to temporarily disable the Viper and Dolby mods and add them back one at a time.
[Google Pixel XL Themes, Apps, and Mods] rohitece06:
copying the mixer_path.xml and permission fix did it for you. it made me stuck at boot animation.
[Google Pixel XL Themes, Apps, and Mods] ASimpleSock:
I'm no expert but did you change it in recovery or with a root file browser?

What did you set the permissions to?

Did you name the new file exactly that? (And maybe keep the stock one safe?)

You could use this as reference-

https://android.gadgethacks.com/how-to/enable-true-stereo-sound-your-pixel-xl-0174749/

(Hope it's ok to put a random website. They did credit chdloc.)

You're not still stuck at boot animation, are you?
[Google Pixel XL Themes, Apps, and Mods] rohitece06:
root browser , rw-r-r, mixer_path.xml

I am not stuck. adb reboot recovery work during the "stcuk on boot-animation"

Also the mixer.xml in this link seems quite outdated because [MENTION=2760454]chdloc[/MENTION] mixer_path_dualLS.xml is quite different.

EDIT: So I got dual speaker mod (_dualLS_dualREC.xml from chdloc) working on 7.1.2 with magisk on my Pixel (not XL). I copied the file over to /system/etc, renamed, fixed permission. rebooted. then used the two command lines from the android hacks website above to fix the balance between two speakers. Since this balance fix goes away on a reboot. I put those two lines in a script in ex kernel manager. All good.
[Google Pixel XL Themes, Apps, and Mods] lachiefish:
Sorry, don't mean to sound like an idiot but do we need to be rooted for this or just unlocked bootloader? :)
[Google Pixel XL Themes, Apps, and Mods] mrmidnight:
In order to change permissions you must have root.
[Google Pixel XL Themes, Apps, and Mods] miXwui:
Hi, appreciate the mod -- however, I'm still getting echo during phone calls when the speakerphone is on. Any ideas?

I'm running ElementalX Kernel with Magisk, and your shell script doesn't work for some reason through Magisk (can't mount system, I think it's because of the way Magisk operates) so I use a root browser to copy over the files manually, change permissions, and install the apk.

Mod has been working well for over 2 weeks and I like it, except for the speakerphone echo issue. I'm using the latest March 7 zip that's supposedly supposed to fix the issue as well.

Edit: Did some more testing, and it seems that there's no echo, until I turn the phone screen off during the call. The moment I do, the echo is there no matter if the screen is off or on. If I call again, there is no echo, until I turn the screen off during the call.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Are you manually manipulating my app/notification during a phone call? If not, it sounds to me that my app is switching loudspeaker profiles during phone calls which should definitely not happen. In technical terms, manipulating the loudspeaker profile during an active (speakerphone) call changes the echo path drastically, from which an echo canceler may or may not recover. To debug this further, in what state is my app/notification when you are on a speakerphone call and the echo occurs? Can you manually switch it to "Mode:Stock" before making a call and try again?
[Google Pixel XL Themes, Apps, and Mods] miXwui:
The echo occurs if I turn the phone screen off, or manually change to stock/adaptive. It never recovers, until the next phone call.

I did already try being in "Mode:Stock" before initiating the phone call, same issue as I described. Definitely think it's something to do with the apk. In the meantime, I setup a custom quicktile using Tasker/QuickTask to toggle between stereo/mono, as well as a tasker to disable stereo/enable mono on incoming/outgoing phone calls as well as screen tuning off. No echo problems it seems!

****Edit: Actually same issue occurs -- seems like it's still echoing with my manually set tasker tasks (mimics the code in your apk)****
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Are you getting echo if you disable/remove the app, but keep the rest of the mod? It is probably a good idea to reboot your phone after removing the app.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Are you getting echo if you disable/remove the app and your Tasker task(s), but keep the rest of the mod? It is probably a good idea to reboot your phone after disabling/removing the app.
[Google Pixel XL Themes, Apps, and Mods] miXwui:
No echo if I remove the app, and I've rebooted my device multiple times. I've pinpointed the cause of the issue -- when I turn my phone screen off, these commands are run:

echo 0x809b > /sys/kernel/debug/tfa98xx-34/regs/04-I2SREG

echo 0xf > /sys/kernel/debug/tfa98xx-34/regs/06-AUDIO_CTR

The command, switch to left-right speaker:

echo 0x809b > /sys/kernel/debug/tfa98xx-34/regs/04-I2SREG

causes the echo to occur, because when the phone screen turns off, that shell command runs in the middle of the phone call and somehow messes up the echo cancellation?

Hopefully this provides some insight.

By the way, I tried to disabling power optimization for tasker, magisk, and superuser with no difference.

---------- Post added at 10:22 AM ---------- Previous post was at 10:15 AM ----------

I'm going to double reply with a potential fix:

Only run the /sys/kernel/debug/tfa98xx-34/regs/04-I2SREG commands on display on/off IF there is no current phone call in place.

Revert to stock speaker settings on incoming/outgoing phone calls
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Exactly, the speaker setting should be untouched while on speakerphone. Echo control, indeed, may get screwed up otherwise. I thought my app did that. I will go back and double-check. It actually makes sense to go to stock settings whenever a phone call is coming in or the user is in the process of initiating one (before audio starts), regardless of the setting.
[Google Pixel XL Themes, Apps, and Mods] miXwui:
Glad we're on the same page -- take your time, as I've got it working in Tasker (stock settings on incoming/outgoing phone call, turning off the phone screen sets phone to stock settings, unless in phone call). I just need to add when turning phone back on, reverting to the settings before the phone turned off, but should be easy enough to do with Tasker variables.

I think this part of your app triggers in during a phone call:

<Task sr="task144">
<id>144</id>
<nme>SetMaxSpeakerGains</nme>
<pri>100</pri>
<Action sr="act0"ve="7">
<on>false</on>
<Str sr="arg0"ve="3">Setting max speaker gains (screen is off so main speaker should be loud)</Str>
<Int sr="arg1"val="0"/>
<code>548</code>
</Action>
<Action sr="act1"ve="7">
<Str sr="arg0"ve="3">echo 0x809b > /sys/kernel/debug/tfa98xx-34/regs/04-I2SREG</Str>
<Int sr="arg1"val="0"/>
<Int sr="arg2"val="1"/>
<Str sr="arg3"ve="3"/>
<Str sr="arg4"ve="3"/>
<Str sr="arg5"ve="3"/>
<code>123</code>
<label>switch to left-right speaker</label>
</Action>
<Action sr="act2"ve="7">
<Str sr="arg0"ve="3">echo 0xf > /sys/kernel/debug/tfa98xx-34/regs/06-AUDIO_CTR</Str>
<Int sr="arg1"val="0"/>
<Int sr="arg2"val="1"/>
<Str sr="arg3"ve="3"/>
<Str sr="arg4"ve="3"/>
<Str sr="arg5"ve="3"/>
<code>123</code>
<label>increase the speaker gain</label>
</Action>
<cdate>1478279075694</cdate>
<edate>1482257005500</edate>
</Task>
[Google Pixel XL Themes, Apps, and Mods] chdloc:
[MENTION=549738]miXwui[/MENTION] , could you please try the attached apk and check for echo issues?

One stock "feature" that I forgot about was that when turning on speakerphone, the phone app automatically turns the speaker gain up to stock by default.
[Google Pixel XL Themes, Apps, and Mods] fairyshacker:
I have followed step 1 & 2 successfully.

On the 3rd step, (./install_chdloc_mods.sh) on Terminal Emulator, it says "Not Found"
[Google Pixel XL Themes, Apps, and Mods] chdloc:
If the first two steps did not return any error messages, I'm guessing that you were switching to a different shell between steps 2 and 3 (going from adb to Terminal Emulator, for instance).

Try the following:

Drop into a root shell in Terminal Emulator by typing 'su'

execute:

cd /data/local/tmp/chdloc_hardware_audio_mods_pixel

and then execute:

./install_chdloc_mods.sh
[Google Pixel XL Themes, Apps, and Mods] fairyshacker:
All Good. Thanks!

Ps: Manually unzip the file, placed on temp, with full permission. The actual problem was with "Terminal Emulator". Even after "su" command, it's not getting the # sign.
[Google Pixel XL Themes, Apps, and Mods] fairyshacker:
install all mods together, option 7

but when i use headphone only right side of the earphone is working, with low volume. any other settings should i need to work with?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
What you are describing is an unfortunate side effect of the recently-introduced power-gating capabilities of the codec (/sys/module/snd_soc_wcd9335/parameters/dig_core_collapse_enable), which interferes with biQuads. You have three options to get around this issue:

Option #1 if you don't care about biQuads: simply re-install the mod without biQuads support

Option #2 if you'd like to keep biQuads: use ElementalX kernel and disable codec power gating in the kernel's installer

Option #3 if you'd like to keep biQuads: it is actually relatively simple to modify your current kernel to disable power gating as it can be controlled in the kernel boot command line. The disadvantage is that you would need to go through the required steps after each kernel update yourself. Let me know if you are interested in this option and I'll share the necessary steps. If enough folks are interested I can also post the modified stock kernel monthly in this thread. Note that the actual kernel binary remains untouched in the process as the only step required is to repack the kernel image with a slightly modified boot command line and the unmodified kernel binary.
[Google Pixel XL Themes, Apps, and Mods] EstiR86:
Can I install this mod using 7.1.2?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Yes.
[Google Pixel XL Themes, Apps, and Mods] EstiR86:
Would the mod work in conjunction with ARISE, thanks for taking your time to answer.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I don't know enough about ARISE to know whether it modifies any of the system files this mod is (mixer_paths.xml, media_profiles.xml, and audio_platform_info.xml).

If it does not, the two mods can coexist. If it does, then they cannot.
[Google Pixel XL Themes, Apps, and Mods] EstiR86:
Okay thanks for all your help
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
anyone else having issues where notifications seem to only play half the notification tone and the rest is cut out? same thing with lock/unlock sounds and pretty much any other sound has some kind of delay such as starting up music , once I press play to start a song it takes about 3 seconds to start playing, and ok google responses seem to take longer as well
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
here is a log for me trying to play music... the errors loop around 10-20 times for 3-4 seconds and the audio finally starts playing when the log DOESNT show, returned error code -1. also not pictured in the log is a final message from AudioFlinger that says: write blocked for 499 msecs, 1580 delayed writes. a similar issue is found https://community.nxp.com/thread/319050
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Thank you. The level of log detail is very much appreciated!

I have not seen this behavior. To try to replicate this issue I will need some more details from you:

which version of the mod did you install?

do you see the error both in "ADAPTIVE" as well as in "STOCK" mode?

do you have any other sound mods installed?

what ROM are you running?

please give me an exact example of what you are doing to get this behavior (app, settings, fx such as EQ enabled)

is this issue repeatable/consistent?

Edit: Are there any kernel error messages during the audio issues you are experiencing?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
What ROM are you using? Does this issue show up regardless of the music player used?

Also, please post your current /system/etc/mixer_paths.xml and /system/etc/audio_platform_info.xml files
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
[MENTION=2760454]chdloc[/MENTION] I'm using pixel dust which utilizes sharkey's r6 exp kernel... I will try another kernel as well. issue occurs across all music apps, and seems like across all audio in general. if I lock my screen, the lock sound doesn't occur until about 4 seconds after screen is off and same thing with unlocking my screen

edit: issue occurs on kirikasura's kernel as well which explicitly supports your mod. so not kernel related
[Google Pixel XL Themes, Apps, and Mods] chdloc:
I think the issue is ROM-related. Please try the following: Uninstall my mod by selecting the appropriate option in the installer. After that, make sure that mixer_paths.xml and audio_platform_info.xml are back to stock. Then download and install the "ull" version (chdloc_hardware_audio_mods_pixel__ull_mar7.tar.gz) instead of the "no-ull" one, see OP.
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
same issue still :/
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Can you share your ROM's stock mixer_paths.xml, media_profiles.xml, and audio_platform_info.xml ?
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
thanks for your help
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Thanks for the files. Unfortunately, though, I don't have a definite answer for you as I'm unable to replicate the issue on my end.

My gut feeling is that you either have some mod installed that interferes with mine or the ROM you are running is incompatible with this mod.
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
hmmm that's odd, I don't really have any modifications at all tbh the heaviest mods I have are substratum and an iptables based firewall, otherwise just you're average facebook, youtube, etc apps for the most part. also, pixel dust is based on stock firmware which also makes this whole situation odd. maybe someone else or [MENTION=5091819]spezi77[/MENTION] could chime in on this. otherwise thanks for trying. I don't have enough knowledge about it to go any further myself
[Google Pixel XL Themes, Apps, and Mods] fairyshacker:
btw, should I need to run the script after every reboot?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
If you are referring to the installer script, then the answer is no. You would only need to re-run the script after you update your ROM.
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
FWIW I'm also having this issue on Dirty Unicorns Rom

---------- Post added at 09:40 PM ---------- Previous post was at 09:28 PM ----------

[MENTION=2760454]chdloc[/MENTION] it looks like by default I2S-reg is set to 0x889b rather than 0x809b as you indicate in OP... and if I leave it at this setting I am not having any issues... assuming that I should be using this value for mono loud speakers , what should I be setting this to for stereo speaker

edit: intuitively I tried 0x8893 for stereo since the old way was 0x8093 but that didn't work
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Have you tried the stock ROM?

Everything still works for me as expected on stock. Hard to believe that codec/amp registers change from ROM to ROM.
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
I'm sure it would work fine on stock, I'm not doubting that at all, but unfortunately some features available on custom roms are more important to me than dual speakers so I rather not migrate back to stock.... I find it very odd as well that a custom rom would have this significant of a difference for the same device, especially because stock isn't very far from the upstream commits that these roms are being built on... but its not like I'm making it up lol, I figure I am this close to solving the issue I might as well try to get it working here.

the modified /etc files are obviously not causing the issue. its this I2S file that is. as i stated it has a different default value as i checked by removing all mods and rebooting and then checking the value
[Google Pixel XL Themes, Apps, and Mods] chdloc:
This is not making any sense to me. You have tried my mod with different ROMs and different kernels, all with the same poor outcome. I doubt that custom ROM/kernels would go so far as to modify a hardware register in codec/amp in this fashion. I would have expected to hear about these issues earlier if there, indeed, were any. Are you sure you are applying the values correctly? Please try again, but this time, please use my app/service and make sure you disable your Tasker script.

Does anybody else use this mod with anything but stock?
[Google Pixel XL Themes, Apps, and Mods] Freak07:
I am running DU on my pixel xl and have no issues as described. Installed the full mod, applied a biquads setting and everything is working well.
[Google Pixel XL Themes, Apps, and Mods] SonarMonkey:
Will this work on stock if I'm using a custom kernel? Specifically the ElementalX kernel, because some kernels explicitly state that they are compatible with this mod, but EX has no such statement.
[Google Pixel XL Themes, Apps, and Mods] [Gorgasm]:
Hi ! Can you tell me how you achieve to build your tile ? Thanks !
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Yes, this mod will work with ElementalX. As a matter of fact, ElementalX was the first kernel to offer biQuads support.
[Google Pixel XL Themes, Apps, and Mods] diabl0w:
Unfortunately my pixel broke and I wasn't able to unlock the replacement ... Thanks for your patience in trying to help
[Google Pixel XL Themes, Apps, and Mods] xUmaRix:
Can I use this mod for Mi 5s which have similar spec to Pixel ?
[Google Pixel XL Themes, Apps, and Mods] chdloc:
No. In terms of audio, the only thing the Mi 5s and the Pixel have in common is the audio codec.

The mixer is very different as the two devices have different speaker amps, audio HALs, microphone types, etc.

Flashing this mod on any device other than the Pixel and Pixel XL will have you lose audio at best or leave you with a soft-brick at worst.
[Google Pixel XL Themes, Apps, and Mods] caballon:
It's this more work with paranoid pixel XL and Franco kennel some one?
[Google Pixel XL Themes, Apps, and Mods] [Gorgasm]:
I would like to know if someone here is aware about Magisk ? I would like to use the stereo recording and higher bitrate mods (and change the video encoding mode), but thanks to Magisk...

Thanks !
[Google Pixel XL Themes, Apps, and Mods] caballon:
Thanks to the Deb. It's a great help in running latest Android o DP4 Avd he help to the installing process, thank people herbs to know your great service to community. :svetius:
[Google Pixel XL Themes, Apps, and Mods] louis-JYG4t:
[MENTION=2760454]chdloc[/MENTION]

I'm trying to make a similar mod for my oneplus one. I succeeded in editing my mixer_paths.xml to how I like it and I made a tasker app that detects when the screen is on and in landscape mode (since screen must be on to watch a video and stereo won't benifit when phone is in portret mode).

The only part I don't have a clue about is how to edit values in the mixer_paths.xml file, without having to reboot the phone.

Could you educate me a bit about this please?

Thanks!
[Google Pixel XL Themes, Apps, and Mods] chdloc:
Unless you are running a custom kernel with audio control you, unfortunately, cannot make permanent changes to the mixer without having to reboot the phone. You can do one of two things:

dynamically adjust the level with Tasker and tinymix. You would have to do this anytime the audio stream changes. [MENTION=281070]bjrmd[/MENTION] has shared very nice work along those lines.

use a custom kernel with Faux-style audio control. [MENTION=4684315]flar2[/MENTION] 's kernel, for instance, offers this. Those controls are typically exposed as codec module parameters somewhere in /sys/module/snd_soc_*, which will allow you easy control with Tasker.
[Google Pixel XL Themes, Apps, and Mods] louis-JYG4t:
Thank you for the quick response.

What's the purpose of your app then? Doesn't it modify the mixer_paths.xml to switch between mono and stereo? And I thought the mount binding is used for this purpose?

I realy need to be able to turn up the volume for alarms, it's quiet with the stereo mod.
[Google Pixel XL Themes, Apps, and Mods] chdloc:
In my app I only adjust the gain of the main speaker while keeping the gain of the earpiece fixed at 0 dB. To change the gain (and playback mode) of the main speaker I write to the hardware registers of the separate speaker codec/amp directly, thereby completely bypassing the mixer.
[Google Pixel XL Themes, Apps, and Mods] louis-JYG4t:
I see... It probably won't be possible to do this on the oneplus one I guess? As far as I know it only has one codec/amp. Thank you for your help anyway, apriciate it!