yashsingh1/xdaforums huggingface dataset:
[Google Pixel 2 XL Themes, Apps, and Mods] Freak07:
No. In fact it showed reading device. Afterwards it showed the invalid mixer file toast and then google dongle detetected.

So I just deleted the tinymix file from sbin. Deleted the app and set it up new again without ever plugin the Google dongle in. Now it shows this in the notification area.

It says reading device and closing in ten seconds. But the toast never says dragonfly detected.

The other two commands I did again.

But setting the gain manually works! Via the last two commands.
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
I am not 100% sure why it didn't work but I made a change in the syntax for recognition and try the version below if you can.

It also has a few bug fixes and if it does work for you and you are interested, the Spl is now quite accurate for both devices.
[Google Pixel 2 XL Themes, Apps, and Mods] Freak07:
Hello, thanks for the test however it still isn't working.

I deleted tinymix binary and the app again before updating.

When I plug in the dragonfly the window pops up. It says reading device but it never says dragonfly.

what may give a clue. When I never put in the google dongle before using the dragonfly I cannot bring up the slider/gain screen.

I attached a screenshot with the logcat lines hitting the slider button in statusbar 2 times. I also ran the commands you gave me again.
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
The gain app is not related to MQA at all. You may need to update the dragonfly firmware to run MQA.
[Google Pixel 2 XL Themes, Apps, and Mods] rafael.rm.moreira:
I understand, it is not certain whether MQA will be enabled in the Tidal application. Does Dragonfly have a difference between black and red version? Because I only saw a difference in the price, which black costs 99 dollars.
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Both should do it:

https://parttimeaudiophile.com/2017...nder-5-minutes-with-the-audioquest-dragonfly/
[Google Pixel 2 XL Themes, Apps, and Mods] holtmann:
Tested v 3.8 with the Apple Dongle:

1) When dongle is plugged in "Reading device" is displayed, after that "Pixel 2 Audio was granted super user rights"

2) However the UI does not open and clicking the "Pixel 2 Audio" icon again "No dac inserted" is displayed. Also when playing audio the Pixel 2 Audio does not appear in the notification area.

tinymix is copied successfully to /sbin on start and the Apple Dongle is available in the system at /proc/asound/card2

/proc/asound/card2/stream0 is present

/proc/asound/card2/usbmixer reads:

USB Mixer: usb_id=0x05ac110a, ctrlif=0, ctlerr=0

Card: Apple, Inc. USB-C to 3.5mm Headphone Jack A at usb-xhci-hcd.0.auto-1, full spee

Unit: 2

Control: name="PCM Playback Volume", index=0

Info: id=2, control=2, cmask=0x3, channels=2, type="S16"

Volume: min=-15360, max=0, dBmin=-12000, dBmax=0

Unit: 2

Control: name="PCM Playback Switch", index=0

Info: id=2, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"

Volume: min=0, max=1, dBmin=0, dBmax=0

Any ideas??
[Google Pixel 2 XL Themes, Apps, and Mods] lorikeet:
Very fundamental question. Digital gain is above 0dBFS or below it? A digital gain of 84 is confusing? If the rms level of my audio source is say -10 dbFS, what will be the result of setting digital gain of 84?
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Does the app work with the plain Google dongle that came with it?

Perhaps a bad download? There has been no issue from my end on a P2 or P3 XL.
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
The digital gain here is way different than with the old internal Dac (headphone jack) mixerpath mods where 84 was 0 dB (loudest without distortion). The number here depends on the Dac, for example the Google Dac (old) had a scale of 175, the Dragonfly has a scale of 64 and the HTC only 14! So to try to accommodate many devices, my compromise was to "normalize" to 64 (except HTC). If you look at the slider control or notification pictures on the first post you will see what I mean. The latest OS (Pie) generally optimizes quality pretty well, but will NOT allow full power on the Apple or Dragonfly Dacs. My personal preference is to set the digital to about 10 dB below a max (based on Spl, to protect my ears) and just use the volume rocker to adjust up by 1 dB increments. This way I don't have to worry about getting an ear blast if the volume is too high.
[Google Pixel 2 XL Themes, Apps, and Mods] lorikeet:
I am used to digital gain always specified as negative numbers. These arbitrary positive ranges were confusing. Now, it makes sense.
[Google Pixel 2 XL Themes, Apps, and Mods] holtmann:
I must admit I tested it on a non Pixel Device (Xiaomi A2, Android Oreo Pie). I did it a bit more testing and could make it work by manually calling tinymix using

tinymix -D 2 "PCM Playback Volume" X

If I raise X above 82 volume gets louder. I put 999 just for testing and it seems to give an acceptable high volume now. What would be the correct value for X for the digital gain?

Is the USB device path (/proc/asound/card2 on my test device) maybe hardcoded in the app and therefore not working on non Pixel devices?
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
That's the correct syntax.

The number depends on the dongle. The old Google one has a max of 175, dragonfly red is 64, HTC is 14. You can generally tell by looking at the USB mixer setting in the device path folder.

Apple is 120 BTW.

Try to keep the gain low and volume rocker setting high.
[Google Pixel 2 XL Themes, Apps, and Mods] neontigers:
The app works fine with one pair of my earphones but with another it gives me an some kind of mixer pcm error. The pair that doesn't work has a mic and the one that works doesn't if that makes any difference ? Tried uninstalling and reinstalling.
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
What Dac dongle are you using?
[Google Pixel 2 XL Themes, Apps, and Mods] neontigers:
Apple
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
There may be an issue with the Apple dongle with certain headphones, cables. I initially could not get the typical commands working but then it miraculously was fixed. It may have been a cable or headphone combo, but it's been fine since. Not sure how to correct that for you.
[Google Pixel 2 XL Themes, Apps, and Mods] smartfoner:
Not working again. :( After upgrading to January security patch.
[Google Pixel 2 XL Themes, Apps, and Mods] uosunsetter:
Same happened to me just now on Pocophone F1 running Android 9

I can reproduce the problem. The Beyerdynamic Byron (23 ohm) results in "Invalid mixer control: PCM Playback Volume". If I use a headphone splitter + the very same headphones then the app works flawlessly. BTW, if I unplug the splitter and plug only the headphone again (while not removing the dongle) the app still works.

Right now, I am playing with tinymix to see what is changing in these cases.

Can it be something to do about changing the mixer control depending on the resistance/ohm of what's plugged in? Also, do you think using a splitter with a single headphone plugged has any drawbacks sound-wise or power-consumption-wise?
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Absolutely - The mixer name changes for some reason, therefore the commands won't work. The same situation occurs with the original google Dac dongle in "line out" mode (very high impedance). The problem with the Apple dongle (in my initial usage) was that even the correct mixer name syntax would not allow control to occur.

Also, do you think using a splitter with a single headphone plugged has any drawbacks sound-wise or power-consumption-wise?

Not sure I follow - what are you splitting?

So you have a Y cable from the Dac jack to headphone on one side and something else on the other?
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
I have a P3 XL now so hard for me to comment. I'm still on Dec patch though. Let me update and get back to you.
[Google Pixel 2 XL Themes, Apps, and Mods] uosunsetter:
Yes, I mean the Y cable connected to USB-C DAC, with only a single headphone connected to it. Would it cause any sort of drawback?
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Should be no problem, unless something else is plugged into the other side.
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Magisk has changed the file structure a bit.

The post FS data folder should be like this now:

tinymix placement is fine as is.
[Google Pixel 2 XL Themes, Apps, and Mods] docentore:
[MENTION=281070]bjrmd[/MENTION]

Hey mate. Thanks for great app. Unfortunately it works on my HTC U12+ with Apple dongle only every 10th time or less, other times it just freezes the phone (phone and DAC works fine without app installed).

I was testing v38 (the one with Apple dongle support). For the most of the time I don't need to use it as my main portable IEMs are very sensitive and Apple dongle low voltage output fits the profile, but from time to time I use on ear portables and could use some more juice.

Is there terminal command I could use and maybe script it so I could amend the DAC gain?

EDIT: found it ;)

tinymix -D 1 "PCM Playback Volume" X

Now need to find way of scripting this (time to go into learn mode :))
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
You can run it as a shell script in Tasker, or from a command line. You will need to have tinymix installed of course.

I can't explain the intermittent behavior, are you using a cable with a mic or control on it. If so, the Apple Dac will not respond to any command.
[Google Pixel 2 XL Themes, Apps, and Mods] joedajoester:
Edit: The SPL graph doesn't seem to work. I have m40x's plugged in with the Google DAC. I filled out the info in the headphones section and then enabled visualizer
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Do you get a notification bar on top with the SPL (second image on the first post)?
[Google Pixel 2 XL Themes, Apps, and Mods] joedajoester:
I don't see that icon at all.

Also, thank you for all of the great information in this thread. It pushed me to get an apple dongle and I must say, I'm impressed. It's better than my motherboards audio output by quite a bit and they said my motherboard has purity sound 3 which was supposed to be good. But it sounds flat and dead compared to Apple's dongle.
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
I just checked the app on my Pixel 3 and it works fine. Two questions, 1 - did you enable the "visualizer" on the headphone entry dialog and 2 - what music app are you using?

Thanks
[Google Pixel 2 XL Themes, Apps, and Mods] soms_2:
I tested this using an Apple DAC on my Pixel 2 XL running Pie. It works fine with headphones without mics, but with all the headphones with mics that I tested I received the "Mixer PCM playback error" message
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Yes, that is a known issue. Somehow the Pixel OS misinterprets the DAC mixer controls (or the Apple unit does not respond to what the OS says it is). Sorry, nothing I can do (and I have a headset with mic as well). The good news is that at that particular output (in mV) the signal is very clean. The bad is we can't get full power. So for power hungry headphones, just use a straight cable.
[Google Pixel 2 XL Themes, Apps, and Mods] _mysiak_:
I am using Apple DAC dongle for my Xiaomi Mi A1 phone running stock Android Pie. With the default configuration, the volume output is quite low - fine for sensitive IEMs, but not really usable with higher impedance headphones. I stumbled upon a quite old Reddit post suggesting to use ALSA mixer to fix this issue. I extracted ALSA binaries from some old Android APK and made a simple Magisk module. I control the gain with Tasker. Microphone and play button work and I don't have any playback issues. I don't have any measurement system, but volume gets definitely much higher and I can drive less sensitive headphones without any issues. Is this solution any different to the app in this thread?

Default:

# [B]alsa_amixer -c 1[/B]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch pswitch-joined penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 120
Mono:
Front Left:[B] Playback 80 [67%] [-40.00dB][/B] [on]
Front Right:[B] Playback 80 [67%] [-40.00dB][/B] [on]

Headphones with no mic:

# [B]alsa_amixer -c 1 sset Headphone 120[/B]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch pswitch-joined penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 120
Mono:
Front Left: [B]Playback 120 [100%] [0.00dB][/B] [on]
Front Right: [B]Playback 120 [100%] [0.00dB][/B] [on]

Headset with a mic:

# [B]alsa_amixer -c 1 sset Headset,1 120[/B]
Simple mixer control 'Headset',1
Capabilities: pvolume pswitch pswitch-joined penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 120
Mono:
Front Left: [B]Playback 120 [100%] [0.00dB][/B] [on]
Front Right: [B]Playback 120 [100%] [0.00dB][/B] [on]
[Google Pixel 2 XL Themes, Apps, and Mods] bjrmd:
Nice work.

Yes, it is similar (I use tinymix which is an offshoot of alsa).

You may want to adjust the gain (the 120 number) so the net output volume is at a comfortable level with the android rocker volume near max. Distortion will be higher if the Dac gain is 120/120 and the android volume is let's say 50% max rather than a near max android volume and 80% Dac output.
[Google Pixel 2 XL Themes, Apps, and Mods] Glenn2:
I know this is an old thread, but this intrigued me.

On my phone (Pixel 3a) in the audio_policy_configuration.xml file I have changed some of the 48000 settings to 44100. I use Viper and the driver status now tells me I'm at 44100Hz instead of 48000Hz like before.

I assumed that this meant my 44.1kHz files were now not being resampled. Is that not the case?

My old Samsung S3 LTE (exynos) running Lineage 14.1 has 44100 everywhere and Viper also says 44100 on that device.
[Google Pixel 2 XL Themes, Apps, and Mods] drizzt:
Hi,

I noticed that the Apple USB-C adapter has a different behavior if you plug-in a headphone (TRS) or a headset (TRRS).

If I attack a headphone and I configure "PCM Playback Volume" to 120 I have 0.5V, but if I attack a headset "PCM Playback Volume" is not available anymore and "Headset Playback Volume" is only settable to something like 35 and I have a really low volume (I didn't measure the mV yet).

I can replicate the same behavior on Linux by setting the output as "IEC958 (S/PDIF) Digital Audio Output" with the headset connected. If I use, instead, "analog-output-headphones" I have the 0.5V with headset connected and working on Linux too.

I guess Android uses the "default" profile of the USB DAC ( "IEC958 (S/PDIF) Digital Audio Output" in this case) that reduce the output power a lot.

Is there any way to avoid that (maybe by configuring android to do not use the IEC958 profile)?

Thank you
[Google Pixel 2 XL Themes, Apps, and Mods] RogerF81:
For me, the app is somehow working, but tapping on sliders in the notification does nothing and does not open the sliders UI. Also the DAC up or down buttons seem to do nothing. I followed the insructions carefully, but I wasn't able to determine the issue :/
[Google Pixel 2 XL Themes, Apps, and Mods] Banbeucmas:
Seem like on my samsung S8, the device doesn't work due to the app keep reading from /card1/ rather than card2 where the dac is supposed to connect
[Google Pixel 2 XL Themes, Apps, and Mods] Hung0702:
Unfortunately he already addressed this (quoted below) and hasn't found a working solution. That's a good starting point tho. Maybe we can figure something else out.

Also, I wonder if it affects sound quality at all. Is it purely a volume issue or will I notice clipping/distortion on higher impedance headphones with high sensitivity. I noticed some ... graininess or maybe very minor clipping with my Tin T4s + a TRRS cable. I tried with with the stock TRS cable and couldn't notice it as much. T4s are 32 Ohm so I wouldn't imagine they need a lot of power to drive normally (ignoring volume). I am still burning these in (first 20h) and getting used to the sound signature, so I can't be sure how much of this is subjective misinterpretation vs actual difference.

Either way, hopefully we can get a fix soon. I plan on using a Shanling UP2 exclusively when it arrives, but as with anything Bluetooth I frequently need a wired backup.
[Google Pixel 2 XL Themes, Apps, and Mods] joecaesar:
Cannot find that path to put volmod on android 10. Can u help?
[Google Pixel 2 XL Themes, Apps, and Mods] Glenn2:
I had problems using this on Android 11 (Pixel 3a + Apple DAC). I think this is due to not being able to copy tinymix to sbin folder which no longer exists.

I solved the issue and now have it working but note that I use viper4android (A11 version) so was able to piggyback tinymix into that module by doing the following:

Go to /data/adb/modules/viper4magisk/system

Anything you put in here will be moved into system when Magisk loads V4A.

In that folder I create a new folder 'bin' and put tinymix in that (with permissions set to rwxr-xr-x), i.e., in here

/data/adb/modules/viper4magisk/system/bin/

Therefore Magisk and v4a move it into system/bin on boot and the Pixel 2 Audio app works fine.

I don't know if it works with other Magisk modules.

Just posting in case anyone else has the same issue.
[Google Pixel 2 XL Themes, Apps, and Mods] MrMagicPotato:
On my pixel 2 with android 11 I can't get the Apple Dac to work, my dac is the European model (a2155) which outputs 0.5v max.

Correct me if there's something wrong in my installation process:

-I install the gain control v3.8 (which is the latest version that I know of)

-I install v4a in magisk, then I create the bin folder, put tinymix in it with permissions and reboot

-I install the volume mod in data/adb/post-fs-data.d then I set permissions for it too

Is there any modification that I need to do to tinymix or some steps that I miss?

Thanks a lot for the help :D
[Google Pixel 2 XL Themes, Apps, and Mods] Glenn2:
Hmmm.... not sure. I didn't use the volume mod but I don't think that will be your problem. Maybe it's the version of v4a? I didn't install it from the Magisk repo, because at the time I installed it, the special Android 11 version wasn't in there. The one that was in there didn't work.

I'll attach the one that I use. I don't have any other audio mods installed (ACP, AML, Ainur or anything).
[Google Pixel 2 XL Themes, Apps, and Mods] MrMagicPotato:
Ok I've tried to install your viper, and viper itself works.

When I open the dac gain app, it seems to work from the messages, it recognizes the dac, but nothing actually changes when I change the DAC gain level.

And after a while anothere message appears, giving me this error "Invalid mixer control: PCM Playback Volume"

Do you know what it means?
[Google Pixel 2 XL Themes, Apps, and Mods] Glenn2:
I don't, but that's not the error you get when tinymix is not present, so you are probably OK on that front.

Ensure that the headphones are connected to the DAC before you plug the DAC in.

Are your headphones actually a headset? (i.e., do they have a mic and a 4-pole jack). I think this only works with normal headphones, that may be your problem. There were some posts about that earlier in the thread I think.
[Google Pixel 2 XL Themes, Apps, and Mods] Glenn2:
Hi all,

I made a little Magisk module to install Tinymix into /system/bin upon boot.

This is for Android 11 ROMs where the app does not install it anymore.

(My earlier tip for sneaking it into Viper4Android is not necessary now, you can use this instead whether you use v4a or not.)
[Google Pixel 2 XL Themes, Apps, and Mods] Bnhershy:
You and OP are doing God's work, m8. I had bought a bunch of Apple usb-c dongles for my devices and was regretting my decision after having low volume output compared to some random dongle I had bought.

I now have whatever the opposite of buyer's remorse is. Cheers o/
[Google Pixel 2 XL Themes, Apps, and Mods] jadajada:
I have several Apple USB-C to 3.5mm adapters, and they have low volume on Android. It seems that there’s a solution in this thread, but I am having problems sorting out what can be done. There’s a solution in this thread, but it requires making a folder in a subfolder of /sbin. I am on an Android 12 rom and it doesn’t have en /sbin folder… Neither does my Pixel 6. Is there a solution working for A12 that I may use on my P6 as well?
[Google Pixel 2 XL Themes, Apps, and Mods] Bnhershy:
Using [this](https://xdaforums.com/t/pixel-2-or-3-usb-audio-control.3704024/post-85312281) Magisk module from earlier in the thread worked for my pixel 3xl, but I cannot vouch for anything else.

Should the app solution not work, I know of a workaround that uses termux and termux:widget, which is explained in this Reddit post I made (no one liked it 🥲)

https://www.reddit.com/r/headphones/comments/s8an4h

The fix described by u/Menfie should work on all android phones. You still need to install the Magisk module for it to work.
[Google Pixel 2 XL Themes, Apps, and Mods] jadajada:
Thanks! Installed the app + magisk module. When I insert the adapter it’s recognized as Apple Dac. But when I try to adjust gain/volume it’s says something about invalid mixer pcm..
[Google Pixel 2 XL Themes, Apps, and Mods] Bnhershy:
Pretty sure someone said something about it only working with non-headset type headphones (2 rings instead of 3 on the 3.5mm), but can't tell you anything outside of that as I never had this issue myself.

Worst case, follow the Reddit thread fix for u/Menfie. No idea where the script gets placed in Android12 (they moved the power menu shortcuts, didn't they?), But it can be automated with Tasker or something similar if you put it in a "if audiojack is plugged in, trigger the script" config.
[Google Pixel 2 XL Themes, Apps, and Mods] jadajada:
Perhaps. Going the termux route. Trying to figure it out, but should the command:

su tinymix -D 1 2 150

do anything? Trying to manually get my headphones to react before going further..

Edit:

You’re right! headphones with two rings on the plug works with the tinymix command. Three rings don’t.
[Google Pixel 2 XL Themes, Apps, and Mods] Bnhershy:
After setting up termux:widget (an add-on application for termux) by following the instructions on GitHub, you should have a folder named .shortcuts in the termux home folder. If you don't, create it using

"mkdir .shortcuts"

After going to this folder using

"cd .shortcuts" (verify with the command pwd)

you need to create a file using

"cat > usbdac" (you can name it whatever you want, but for this example the name is usbdac)

and then type the lines:

su -c "tinymix -D 1 2 150"

exit

If you mess up the lines, you can edit the file using

"nano usbdac" (nano should tell you how to edit text, write quit, etc. If not, look it up)

Quote from u/Menfie: "You can run tinymix -D 1 (device 1) and see all the options. 2 150 means set the second option to 150 which is the max volume."

I hope this explanation is clear for anyone who doesn't know how to navigate doing this.
[Google Pixel 2 XL Themes, Apps, and Mods] gr8Tomato:
Amazing, i was looking for this for the last hour. Works also with A12. Thank you so much.
[Google Pixel 2 XL Themes, Apps, and Mods] gr8Tomato:
Is there a way to automate tinymix to max volume when connected?
[Google Pixel 2 XL Themes, Apps, and Mods] msshaikh1717:
thanx dev for tinymix.rar and pixel 2 audio.apk . You guys saved me from buying google dongle. Using Lineageos 18.1 with latest magisk. Working fine although i had many trial and error but in the end it works. Using Apple gondle with Monk plus and lite, both earphone with mic as this doesnt work with mic. Also, for people who wants to save the setttings can have this tip-

Goto Headphone section...

Name- Monk Plus(Impedence 64, Sensitivity 116, Initial Volume 25 which is max for my 2xl, digital gain 80% which is 96 of 120)

Note- Impedence and Sensitivity value i got from soundphilereview website but u can get from google.

Thnx again dev i hope ur life goes ease all the way...
[Google Pixel 2 XL Themes, Apps, and Mods] msshaikh1717:
anyone knows how to improve voice for apple dac with pixel 2xl for earphones with mic as tinyzip and pixel 2 audio apk doesnt work