New Dragonfly Black and Red Discussion
Feb 22, 2017 at 1:41 PM Post #2,761 of 5,077
Digging up one of my very old thoughts, decided to unplug one of my Jitterbugs from my PC, and connected it to the DFR and my G5 cellphone, it's beyond placebo, the difference it makes... The sound is a fair bit tighter, more cohesive... A great $50 investment.

This is with using UAPP and bit perfect playback, so usual caveat, mileage may vary in other scenarios...

Blurry bus photo for authenticity...

 
Feb 22, 2017 at 2:06 PM Post #2,762 of 5,077
Awesome. Thanks for all the information! I'll give it a whirl when I have a bit more time.

On another note, are there *any* DACs that work with Android without tweaking? After reading a lot of posts it seems like even if AQ does update the dragonfly firmware we may still be running into these issues.

When a DAC handshakes with the host it tells it what Bit Depth and Bitrates it can handle along with other information about the number of channels, min/max and default volume. The DACs I have tried all tell the host to set the default hardware volume to 100%, you can still use the Android volume controls but DAC/Amp setups that have a volume pot are controlled by the pot. For some reason Audioquest decided to set the default hardware volume to around 66% with no way to change it on Android without rooting.
 
The other issue with Android is that all audio (unless using UAPP) goes through the Android audio system (Audio Flinger) this resamples the audio and also applies some EQ; so far as I am aware there is no way around this other than the method used by UAPP which completely bypasses the Android audio system.
 
USB audio can be hit and miss with Android, some combinations of DAC & Phone will work with other whilst other combinations won't. It's always best to ask to see if someone is successfully using the same combination that you are looking to use.
 
Feb 22, 2017 at 6:25 PM Post #2,763 of 5,077
Have any iPhone people compared the two Apple to USB adapters? One is quite a bit bigger and more expensive but lets you charge at the same time......
 
Feb 22, 2017 at 6:41 PM Post #2,764 of 5,077
  Have any iPhone people compared the two Apple to USB adapters? One is quite a bit bigger and more expensive but lets you charge at the same time......


Yes I have. The dragonfly Red is quite a draw on battery life so I now use the bigger one exclusively as pictured

A little self adhesive Velcro and everything stays nice and secure
 
Feb 22, 2017 at 9:25 PM Post #2,765 of 5,077
Curious if anyone has had problems with the Red, such as weird waves of digital noise suddenly appearing?  I have had this happen a number of times, even when using the Wyrd, couldn't figure out if it was my Mac, which is a little older, or the Red.  
 
Feb 22, 2017 at 10:09 PM Post #2,767 of 5,077
  Curious if anyone has had problems with the Red, such as weird waves of digital noise suddenly appearing?  I have had this happen a number of times, even when using the Wyrd, couldn't figure out if it was my Mac, which is a little older, or the Red.  

 
I did for two different DFR's, returned both and gave up. Unfortunate, cause I like the sound for such a form factor. I chalk it up to ungraceful handling of overlapping/changing frequency rates e.g. music at 44.1khz then a system sound plays at 48khz concurrently. Same with my iPhone when I'm watching a movie and I get a notification.
 
Feb 22, 2017 at 10:29 PM Post #2,768 of 5,077
AlsaMixer won't reset your DF to 100% on connection. I just use Tasker to run the command everytime I plug in.

Editing the system files is more tricky, it worked on my S5 and on a Moto G, both running CM13 but not on my S7E with rooted stock. Your luck may vary.

Backup fully before amending your system files and make sure you are able to restore from a custom recovery.

'audio_policy.conf' - look for the entry for USB_DEVICE and change the number against sample rate to 44100 and get rid of anything else (most likely 48000).

For 'build.prop' I suggest you do some searching for your specific device and ROM as the entries may vary. I will follow up with my entries later.

As noted these changes mean my S5 and Moto G now output all system audio at 44100 but I don't know if Android is doing anything with the audio in the background still and as the volume buttons still work and are software there is obviously some processing going on so it isn't bitperfect. These changes also mean than audio at higher rates than 44100 end up being out at 44100 unless anew app that can talk to the DAC directly is used. This works for me as I mainly stream Spotify and for anything else use UAPP. My S5 is now effectively my DAP and my S7E is my daily use phone.

 
Well, the 'audio_policy.conf' trick worked like a charm! Now I can play through Tidal or Spotify without any sort or resampling, and with the root fix I can set the Dragonfly's volume. Thank you very much sir! You have solved all my problems. One last question, how do you have Tasker set up to run when you attach the Dragonfly?
 
Feb 22, 2017 at 11:40 PM Post #2,769 of 5,077
I figured it out. I set Tasker to run "alsa_amixer -c1 set PCM 100%" (using Root) when a USB Audio Device is attached. It is fairly reliable and seems to also let me use Viper4Android. Super nice because now I can play all my audio including Tidal and Spotify through my DFR. By the way, I'm running Exodus Marshmellow 6.0.1 on a OnePlus One with Franco Kernal.
 
Just a rundown for anyone else who might want to do this (note: all credit for how to do this goes to west0ne, I just wanted to put in all in one place for rooted Android users):
**DO THIS AT YOUR OWN RISK**
 
 
1. Changing the Dragonfly volume setting through Android:
 
First get Alsamixer, then you will need a terminal shell like Terminal Emulator or a script runner like $cripter or Tasker.
 
Then in a terminal type:-
 
su
alsa_aplay -l
 
This will list the audio devices available on your phone, if you connected the Dragonfly after booting the phone you will probably find that it is 'Card 1'. You will need this for next bit.
 
In a terminal type:-
 
su
alsa_amixer -c1 set PCM 100%
 
The '-c1' flag points to the Dragonfly and assumes it is 'Card 1'  change the '-c1' flag to a different number depending on the number of your card.
 
You can also change the PCM setting, you could use a percentage or a number on the DFB the volume settings are from 0-64 so you could use PCM 32 for example which would be the same at 50%.
 
The volume buttons on the phone still work to change the volume but they don't affect the internal hardware of the Dragonfly so they act like software volume controls.
 
The volume will reset each time you reboot your phone or remove the Dragonfly, so you can use Tasker to automate the volume change each time you attach the Dragonfly.
 

2. Change sample rate on your Android by editing 'audio_policy.conf' 
 
Using a file explorer navigate to root then /etc (or /system/etc). Open 'audio_policy.conf". Scroll down and find the area that says "USB_DEVICE". Change the sample rate to 44100, and get rid of anything else. Mine said "dynamic", it might also say something like "44100 | 48000". Change it so it says just 44100.
 
After editing mine looked like this:
Code:
[color=rgb(69, 69, 69)] usb { outputs { usb_accessory { sampling_rates 44100 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_USB_ACCESSORY } usb_device { sampling_rates 44100 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_USB_DEVICE } } }[/color]
 
Then save. Reboot your phone and try playing audio through a non-UAPP player (note: Do not let UAPP launch when the DAC is attached. If you already set this preference, removed it in the app's settings). You should get the green LED through your Dragonfly if it worked. If not, make sure it saved correctly.
 
Thanks again for the help west0ne! I hope this can help someone else... I'm still hopeful the firmware update will solve these problems, but in the meantime I'm happy this works.
 
Feb 22, 2017 at 11:45 PM Post #2,770 of 5,077
AlsaMixer won't reset your DF to 100% on connection. I just use Tasker to run the command everytime I plug in.

Editing the system files is more tricky, it worked on my S5 and on a Moto G, both running CM13 but not on my S7E with rooted stock. Your luck may vary.

Backup fully before amending your system files and make sure you are able to restore from a custom recovery.

'audio_policy.conf' - look for the entry for USB_DEVICE and change the number against sample rate to 44100 and get rid of anything else (most likely 48000).

For 'build.prop' I suggest you do some searching for your specific device and ROM as the entries may vary. I will follow up with my entries later.

As noted these changes mean my S5 and Moto G now output all system audio at 44100 but I don't know if Android is doing anything with the audio in the background still and as the volume buttons still work and are software there is obviously some processing going on so it isn't bitperfect. These changes also mean than audio at higher rates than 44100 end up being out at 44100 unless anew app that can talk to the DAC directly is used. This works for me as I mainly stream Spotify and for anything else use UAPP. My S5 is now effectively my DAP and my S7E is my daily use phone.

I'm very interested in trying this. In audio_policy.conf I'm seeing a few things related to usb device, not sure which one(s) to change. Would you take a look at my screenshot and let me know what you think? I'm rooted and used to making changes in build.prop, so I'm comfortable with the risks. I use Spotify enough that it's worth trying.
 

 
Feb 22, 2017 at 11:48 PM Post #2,771 of 5,077
   
Well, the 'audio_policy.conf' trick worked like a charm! Now I can play through Tidal or Spotify without any sort or resampling, and with the root fix I can set the Dragonfly's volume. Thank you very much sir! You have solved all my problems. One last question, how do you have Tasker set up to run when you attach the Dragonfly?

In Tasker I have created a task called USB AUDIO with the following steps
 
1. Silent Mode - Set system to vibrate from 'Audio' (this stops any system sounds being passed to the USB Audio device which can cause odd noises)
2. Media Volume 3 - Set the media volume to 3 from 'Audio' (drops the system volume level so that you don't hurt your ears with IEMs, you can adjust the volume later with the volume buttons)
3. Run Shell - Command 'su -c sh /sdcard/Scripts/USB.sh' you need to select 'root' (this will run a script to set the DF volume to 100%, script below)
4. Launch App - I have mine launch Spotify but you could launch your favourite music app or leave this stage out.
 
I then created a Profile called USB Audio
 
1. State - Select 'Hardware' then 'USB Connected' then in class select 'Audio'
2. Select your 'USB AUDIO' task.
3. Remember to activate Tasker. On first run you will also have to grant root permission and opt to remember your choice.
 
When you plug in any USB audio device the script will run.
 
The shell script is as follows and should be saved in '/sdcard/Scripts' , I created the 'Scripts' directory myself but you may already have one if another app has created it.
 
#!/system/bin/sh
alsa_amixer -c1 -q set PCM 100%
 
Feb 22, 2017 at 11:49 PM Post #2,772 of 5,077
Birdman, mine looked the same as yours. Don't worry about anything under "inputs". Under "usb_device" change everything so it matches whats under "usb_accessory", except for the last entry which stays the same.
 
So:
Code:
[color=rgb(69, 69, 69)] usb_device { sampling_rates 44100 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_USB_DEVICE[/color]
 
Feb 23, 2017 at 12:01 AM Post #2,773 of 5,077
  I'm very interested in trying this. In audio_policy.conf I'm seeing a few things related to usb device, not sure which one(s) to change. Would you take a look at my screenshot and let me know what you think? I'm rooted and used to making changes in build.prop, so I'm comfortable with the risks. I use Spotify enough that it's worth trying.
 

In your case under the first 'usb_device' not the second under inputs change the following
 
'sampling_rates' dynamic to 'sampling_rates 44100' then reboot.
 
In my 'build.prop' I added the following; I would say changing this is more risky than changing the 'audio_policy.conf' and may or may not work on any given device.
 
#Audio Tweaks
af.resample=44100
af.resampler.quality=255
ro.audio.samplerate=44100
persist.af.resampler.quality=255
persist.audio.samplerate=44100
persist.audio.pcm.samplerste=44100
ro.audio.pcm.samplerate=44100
persist.af.resample=44100
persist.pm.dyn_samplingrate=1
 
 
 
I have also install Viper4Android which deletes the built in EQ software, this may also have an impact on audio quality as I could ever see a way of completely turning off the EQ on my S7E for example and there was a noticeable change in sound when I froze 'Sound Alive' and 'Adapt Sound', unfortunately it kept throwing out errors so it was a case of either run them or run something else and as V4A had more options I ran that instead.
 
Finally it is worth saying that I enjoy tinkering which is why I've been playing with the system audio but in truth the impact is minimal and possible not worth the effort in the end.
 
Feb 23, 2017 at 12:54 AM Post #2,774 of 5,077
  Birdman, mine looked the same as yours. Don't worry about anything under "inputs". Under "usb_device" change everything so it matches whats under "usb_accessory", except for the last entry which stays the same.
 
So:
Code:
[color=rgb(69, 69, 69)] usb_device { sampling_rates 44100 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_USB_DEVICE[/color]

Strange results for me. I tried your suggested changes and also tried only changing the sampling_rates line as west0ne suggested. Dragonfly light turned green, but sound wasn't so good to my ears. Sound (especially highs) was really sibilant and tinny, extremely so. I do have V4A ARISE installed, which adds some libraries, but this shouldn't affect anything since I'm bypassing that through USB, right?
 
Thanks, and if you can think of something I missed I'll try again (tomorrow--time to sleep now 
smily_headphones1.gif
)
 
Feb 23, 2017 at 3:56 PM Post #2,775 of 5,077
Hi,
 
I own DragonFly Red and Black at this moment, use them connected to the MacBook via JitterBug, source - iTunes. Seems I have a problem with powering/amping - when using Red with my NightHawks, I put macOS sound level at 5th "level/mark" of system volume. Simultaneously connected Black produce same volume level right at 1.5th mark. This is very strange, taking into account both DAC's specifications. Could You please tell, have anyone experiences similar? Maybe one of my Black or Red is defective? 
basshead.gif
 
 

Users who are viewing this thread

Back
Top