LG Quad DAC Tips, Tricks, Etc...

Search This thread

g35mt

Senior Member
Jul 17, 2005
1,832
6
Orange County, California
I have a 600ohm beyerdynamic dt990 and it still wont allow me to inceease more than 75. I assume since my headphone is high impedance it would work. Oh well. It aound pretty good but very low volume. I will try out hifiman he560 but need adapter.

Sent from my LM-V405 using Tapatalk
 

demonknight

Senior Member
Apr 17, 2008
73
9
I understand the risks involved with it but is there a cable to force full high impedance?

Tried it with my v20 years back but then i realized forcing it into high impedance mode did not affect the quality of the music so i chucked it out.

Get one of these:
https://www.aliexpress.com/item/3-5...lug-for-HiFi-Player-Earphone/32810903635.html

From what i remember, plug the 75ohm adapter into the aux extension cable first, then plug the cable into the phone with the impedance adapter attached. Phone will trigger high imp mode.

Remove only the imp adapter and connect your earphone/headphone cable into the extension cable which is plugged in the phone.

Not really sure if LG prevented it from happening in later models. Saved the trouble and just bought a high impedance headphone :) Less of a hassle.
 

TheDannemand

Senior Member
Feb 12, 2008
1,168
1,181
For audiophiles looking for the most faithful reproduction of the recorded sound (as opposed to the "best tuned" sound) both LG Music and PowerAmp come up short, since neither of them are able to bypass up-sampling to 48Khz when playing Redbook 16/44 tracks (anything CD quality).

LG Music does a great job indeed, and faithfully plays any HiRes tracks (or anything 24-bit) using the Direct path to the Quad DAC. It also plays MQA files correctly.

But when playing 16/44 tracks, it uses the Mixer path, causing them to be up-sampled to 48Khz before being sent to the DAC. In most cases, this up-sampling isn't horrible, and in fact many people would never notice it. But to the trained ear, and with sensitive IEMs (such as ones using Balanced Armature drivers) it can cause a noticeable hiss and other artifacts. And even knowing that it occurs is offensive to audiophiles, who use the V30 for the otherwise excellent performance of its ESS Sabre 9218P DAC.

Almost all music apps do the same, simply because LGs implementation of the DAC (or its driver) doesn't accept 16/44 directly. You can check this for a given app by inspecting a dumpsys of audio_flinger captured during playback.

The only apps confirmed to bypass the Android Mixer when playing 16/44 (again, anything CD quality) are UAPP and Neutron. They have dedicated support for V30, and convert 16/44 to 24/44 on the fly (a harmless conversion that just adds zero-bits) in order to bypass the Mixer.

They are also excellent player apps in almost every other way. I personally do not like Neutron's UI, but I love UAPP, which also supports streaming from Qobuz and Tidal (with full hardware MQA decoding and rendering on V30/V35/G7/V40).

Read more about this in the head-fi thread linked below:

https://www.head-fi.org/threads/music-apps-tips-and-tricks-for-the-lg-v30.868978/

As for tuning... well, you select headphones or IEMs that have the sound signature you like, which of course will depend on your type of music and your personal preference.
 
Last edited:
  • Like
Reactions: nyttliv7

ctheanh

Member
Aug 9, 2007
33
14
For audiophiles looking for the most faithful reproduction of the recorded sound (as opposed to the "best tuned" sound) both LG Music and PowerAmp come up short, since neither of them are able to bypass up-sampling to 48Khz when playing Redbook 16/44 tracks (anything CD quality).

LG Music does a great job indeed, and faithfully plays any HiRes tracks (or anything 24-bit) using the Direct path to the Quad DAC. It also plays MQA files correctly.

But when playing 16/44 tracks, it uses the Mixer path, causing them to be up-sampled to 48Khz before being sent to the DAC. In most cases, this up-sampling isn't horrible, and in fact many people would never notice it. But to the trained ear, and with sensitive IEMs (such as ones using Balanced Armature drivers) it can cause a noticeable hiss and other artifacts. And even knowing that it occurs is offensive to audiophiles, who use the V30 for the otherwise excellent performance of its ESS Sabre 9218P DAC.

Almost all music apps do the same, simply because LGs implementation of the DAC (or its driver) doesn't accept 16/44 directly. You can check this for a given app by inspecting a dumpsys of audio_flinger captured during playback.

The only apps confirmed to bypass the Android Mixer when playing 16/44 (again, anything CD quality) are UAPP and Neutron. They have dedicated support for V30, and convert 16/44 to 24/44 on the fly (a harmless conversion that just adds zero-bits) in order to bypass the Mixer.

They are also excellent player apps in almost every other way. I personally do not like Neutron's UI, but I love UAPP, which also supports streaming from Qobuz and Tidal (with full hardware MQA decoding and rendering on V30/V35/G7/V40).

Read more about this in the head-fi thread linked below:

https://www.head-fi.org/threads/music-apps-tips-and-tricks-for-the-lg-v30.868978/

As for tuning... well, you select headphones or IEMs that have the sound signature you like, which of course will depend on your type of music and your personal preference.

As I know, without rooting and modifying the system, the direct PCM mode will only play 16 /48 output even in audio policy show it can play 44,1.

Currently, I am using LG V35 with android 9 and UAPP seems not work in Direct Mode.

With Poweramp and Neutron it show output correctly for Hi-res and 16/44,1 (I assume that is on offload mode).

I am not sure how these app can play bypass audioflinger. Anyone knows what API they are using? It must be not base on ALSA because it does not need root access.
 
  • Like
Reactions: TheDannemand

TheDannemand

Senior Member
Feb 12, 2008
1,168
1,181
As I know, without rooting and modifying the system, the direct PCM mode will only play 16 /48 output even in audio policy show it can play 44,1.

Currently, I am using LG V35 with android 9 and UAPP seems not work in Direct Mode.

With Poweramp and Neutron it show output correctly for Hi-res and 16/44,1 (I assume that is on offload mode).

I am not sure how these app can play bypass audioflinger. Anyone knows what API they are using? It must be not base on ALSA because it does not need root access.

Well, as I wrote in my post, the way they do it (speaking of UAPP and Neutron) is by NOT playing 16/44, but converting it on the fly to 24/44, a simple and harmless process that doesn't involve interpolation. That avoids the Android Mixer and upsampling to 48KHz.

All music apps I've tested, including dumb ones like Google Play Music, play 24-bit music of any sample rate correctly, through the Direct path and with the offloadable flag, as verified by inspecting audio_flinger dumps. See example in the Show Content section below.

Have you verified that PowerAmp does the same? Lots of people rave about PowerAmp for its ability to "improve" their music (EQ, up-sampling etc). But what audiophiles care most about is whether it can play bit-perfect, unmolested directly to the DAC.

All my tests are based on V30 with Nougat and Oreo. I cannot speak to V35 or Android Pie, since we don't have that for V30 yet.

On rooted devices, are you saying there are ways to avoid upsampling of 16/44, other than using UAPP/Neutron? Ways that verifiably work on V30/V35/V40/G7? If so, I would love to know about them. And so would a lot of other audiophile V30 users.

Thank you in advance.

Google Play Music 24/44 audio_flinger dump. Note DIRECT path, Sample Rate and offloadable flag.

Code:
Output thread 0xed9ad000, name AudioOut_6D, tid 4751, type 1 (DIRECT):
  I/O handle: 109
  Standby: no
  Sample rate: 44100 Hz
  HAL frame count: 1792
  HAL format: 0x6 (AUDIO_FORMAT_PCM_24_BIT_PACKED)
  HAL buffer size: 10752 bytes
  Channel count: 2
  Channel mask: 0x00000003 (front-left, front-right)
  Processing format: 0x6 (AUDIO_FORMAT_PCM_24_BIT_PACKED)
  Processing frame size: 6 bytes
  Pending config events: none
  Output device: 0x8 (AUDIO_DEVICE_OUT_WIRED_HEADPHONE)
  Input device: 0 (AUDIO_DEVICE_NONE)
  Audio source: 0 (default)
  Normal frame count: 1792
  Last write occurred (msecs): 37
  Total writes: 1026
  Delayed writes: 0
  Blocked in write: yes
  Suspend count: 0
  Sink buffer : 0xed9c1000
  Mixer buffer: 0xed9df000
  Effect buffer: 0xed916000
  Fast track availMask=0xfe
  Standby delay ns=1000000000
  AudioStreamOut: 0xeff8e000 flags 0x1 (AUDIO_OUTPUT_FLAG_DIRECT)
  Frames written: 1838592
  Suspended frames: 0
  Hal stream dump:
  Stream volumes in dB: 0:-10, 1:-20, 2:-23, 3:-14, 4:-23, 5:-23, 6:0, 7:-18, 8:-22, 9:-96, 10:-21, 11:0, 12:0
  Normal mixer raw underrun counters: partial=0 empty=0
  1 Tracks of which 1 are active
    Name Active Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB  VS dB    Server Main buf  Aux buf Flags UndFrmCnt  Flushed
    none    yes   4305    3 00000006 00000003     129  22932 A 3 44100     0     0     0   001C1500 ED916000 00000000 0x000         0        0
  1 Effect Chains
    1 effects for session 129
    In buffer               Out buffer                 Active tracks:
    0xed916000 -> 0xf30b2000   0xf30b2000 -> 0xed916000   1
    Effect ID 147:
        Session Status State Engine:
        00129   000    003   0xf17203e0
        Descriptor:
        - UUID: 08B8B058-0590-11E5-AC71-0025B32654A0
        - TYPE: 08B8B058-0590-11E5-AC71-0025B32654A0
        - apiVersion: EF503600
        - flags: 00C00280 (conn. mode: insert, insert pref: any, volume mgmt: requires indication, device indication: requires updates, input mode: not set, output mode: not set, offloadable)
        - name: Volume listener for Music
        - implementor: Qualcomm Technologies Inc.
        - Input configuration:
            Frames  Smp rate Channels Format Buffer
            01792   44100    00000003      1 (AUDIO_FORMAT_PCM_16_BIT) 0xf30b2000
        - Output configuration:
            Buffer     Frames  Smp rate Channels Format
            0xf30b2000 01792   44100    00000003 1 (AUDIO_FORMAT_PCM_16_BIT)
        1 Clients:
              Pid Priority Ctrl Locked client server
            1235        0  yes    yes      0      0
  Local log:
   02-10 13:58:52.567 CFG_EVENT_CREATE_AUDIO_PATCH: old device 0x8 (AUDIO_DEVICE_OUT_WIRED_HEADPHONE) new device 0x8 (AUDIO_DEVICE_OUT_WIRED_HEADPHONE)
   02-10 13:58:52.576 addTrack_l    (0xeea28d80) none     no   4305    3 00000006 00000003     129  22932 A 1 44100     0     0     0   00000000 ED916000 00000000 0x000         0        0

USB audio module:
  No output streams.

  No input streams.

Reroute submix audio module:
 route[0] rate in=0 out=0, addr=[]
 route[1] rate in=0 out=0, addr=[]
 route[2] rate in=0 out=0, addr=[]
 route[3] rate in=0 out=0, addr=[]
 route[4] rate in=0 out=0, addr=[]
 route[5] rate in=0 out=0, addr=[]
 route[6] rate in=0 out=0, addr=[]
 route[7] rate in=0 out=0, addr=[]
 route[8] rate in=0 out=0, addr=[]
 route[9] rate in=48000 out=48000, addr=[]
 
Last edited:

ctheanh

Member
Aug 9, 2007
33
14
Well, as I wrote in my post, the way they do it (speaking of UAPP and Neutron) is by NOT playing 16/44, but converting it on the fly to 24/44, a simple and harmless process that doesn't involve interpolation. That avoids the Android Mixer and upsampling to 48KHz.

All music apps I've tested, including dumb ones like Google Play Music, play 24-bit music of any sample rate correctly, through the Direct path and with the offloadable flag, as verified by inspecting audio_flinger dumps. See example below (I thought we had spoiler tags on XDA, but I guess not).

Have you verified that PowerAmp does the same? Lots of people rave about PowerAmp for its ability to "improve" their music (EQ, up-sampling etc). But what audiophiles care most about is whether it can play bit-perfect, unmolested directly to the DAC.

All my tests are based on V30 with Nougat and Oreo. I cannot speak to V35 or Android Pie, since we don't have that for V30 yet.

On rooted devices, are you saying there are ways to avoid upsampling of 16/44, other than using UAPP/Neutron? Ways that verifiably work on V30/V35/V40/G7? If so, I would love to know about them. And so would a lot of other audiophile V30 users.

Thank you in advance.

Google Play Music 24/44 audio_flinger dump. Note DIRECT path, Sample Rate and offloadable flag.

Code:
Output thread 0xed9ad000, name AudioOut_6D, tid 4751, type 1 (DIRECT):
  I/O handle: 109
  Standby: no
  Sample rate: 44100 Hz
  HAL frame count: 1792
  HAL format: 0x6 (AUDIO_FORMAT_PCM_24_BIT_PACKED)
  HAL buffer size: 10752 bytes
  Channel count: 2
  Channel mask: 0x00000003 (front-left, front-right)
  Processing format: 0x6 (AUDIO_FORMAT_PCM_24_BIT_PACKED)
  Processing frame size: 6 bytes
  Pending config events: none
  Output device: 0x8 (AUDIO_DEVICE_OUT_WIRED_HEADPHONE)
  Input device: 0 (AUDIO_DEVICE_NONE)
  Audio source: 0 (default)
  Normal frame count: 1792
  Last write occurred (msecs): 37
  Total writes: 1026
  Delayed writes: 0
  Blocked in write: yes
  Suspend count: 0
  Sink buffer : 0xed9c1000
  Mixer buffer: 0xed9df000
  Effect buffer: 0xed916000
  Fast track availMask=0xfe
  Standby delay ns=1000000000
  AudioStreamOut: 0xeff8e000 flags 0x1 (AUDIO_OUTPUT_FLAG_DIRECT)
  Frames written: 1838592
  Suspended frames: 0
  Hal stream dump:
  Stream volumes in dB: 0:-10, 1:-20, 2:-23, 3:-14, 4:-23, 5:-23, 6:0, 7:-18, 8:-22, 9:-96, 10:-21, 11:0, 12:0
  Normal mixer raw underrun counters: partial=0 empty=0
  1 Tracks of which 1 are active
    Name Active Client Type      Fmt Chn mask Session fCount S F SRate  L dB  R dB  VS dB    Server Main buf  Aux buf Flags UndFrmCnt  Flushed
    none    yes   4305    3 00000006 00000003     129  22932 A 3 44100     0     0     0   001C1500 ED916000 00000000 0x000         0        0
  1 Effect Chains
    1 effects for session 129
    In buffer               Out buffer                 Active tracks:
    0xed916000 -> 0xf30b2000   0xf30b2000 -> 0xed916000   1
    Effect ID 147:
        Session Status State Engine:
        00129   000    003   0xf17203e0
        Descriptor:
        - UUID: 08B8B058-0590-11E5-AC71-0025B32654A0
        - TYPE: 08B8B058-0590-11E5-AC71-0025B32654A0
        - apiVersion: EF503600
        - flags: 00C00280 (conn. mode: insert, insert pref: any, volume mgmt: requires indication, device indication: requires updates, input mode: not set, output mode: not set, offloadable)
        - name: Volume listener for Music
        - implementor: Qualcomm Technologies Inc.
        - Input configuration:
            Frames  Smp rate Channels Format Buffer
            01792   44100    00000003      1 (AUDIO_FORMAT_PCM_16_BIT) 0xf30b2000
        - Output configuration:
            Buffer     Frames  Smp rate Channels Format
            0xf30b2000 01792   44100    00000003 1 (AUDIO_FORMAT_PCM_16_BIT)
        1 Clients:
              Pid Priority Ctrl Locked client server
            1235        0  yes    yes      0      0
  Local log:
   02-10 13:58:52.567 CFG_EVENT_CREATE_AUDIO_PATCH: old device 0x8 (AUDIO_DEVICE_OUT_WIRED_HEADPHONE) new device 0x8 (AUDIO_DEVICE_OUT_WIRED_HEADPHONE)
   02-10 13:58:52.576 addTrack_l    (0xeea28d80) none     no   4305    3 00000006 00000003     129  22932 A 1 44100     0     0     0   00000000 ED916000 00000000 0x000         0        0

USB audio module:
  No output streams.

  No input streams.

Reroute submix audio module:
 route[0] rate in=0 out=0, addr=[]
 route[1] rate in=0 out=0, addr=[]
 route[2] rate in=0 out=0, addr=[]
 route[3] rate in=0 out=0, addr=[]
 route[4] rate in=0 out=0, addr=[]
 route[5] rate in=0 out=0, addr=[]
 route[6] rate in=0 out=0, addr=[]
 route[7] rate in=0 out=0, addr=[]
 route[8] rate in=0 out=0, addr=[]
 route[9] rate in=48000 out=48000, addr=[]

I understand now. You can see here in the file audio_io_policy.conf and know why they can oly play 16/48 .

About Poweramp, yes, it will convert to 24/44,1 to play 16/44,1 source also (in Hi-res output option)

I have no root access for V35 now so I did not test on it. But I used alsaplayer before for V10, Vibe X3 and it can play 16/44,1 well without touching audioflinger. You can check it here: https://xdaforums.com/general/general/hi-fi-playback-android-developers-t3011925
 
  • Like
Reactions: TheDannemand

TheDannemand

Senior Member
Feb 12, 2008
1,168
1,181
I understand now. You can see here in the file audio_io_policy.conf and know why they can oly play 16/48 .

About Poweramp, yes, it will convert to 24/44,1 to play 16/44,1 source also (in Hi-res output option)

I have no root access for V35 now so I did not test on it. But I used alsaplayer before for V10, Vibe X3 and it can play 16/44,1 well without touching audioflinger. You can check it here: https://xdaforums.com/general/general/hi-fi-playback-android-developers-t3011925

Thank you for confirming about Poweramp. Were you able to verify it by inspecting audio_flinger dumps (not just trusting settings menus in the app)?

No doubt policy is what forces 16/48. But I know others with rooted V30 spent considerable time experimenting with audio_io_policy.conf modifications without being able to make it play 16/44 Direct/offloadable. Personally I think because the codec driver doesn't implement it.

When you mentioned other solutions on rooted phones, I was hoping you meant system-wide solutions, not just another app. We've already had UAPP and Neutron for ~1.5 years supporting it through 24/44. And now possibly Poweramp too, if confirmed. So we're covered there.

A common issue for audiophile V30/V35/V40/G7 users is upsampling in Tidal: The Tidal app is perfect when playing Master tracks (MQA/HiRes) which are 4x unfolded and rendered beautifully in hardware on V30. But most of Tidal's catalog is non-Master 16/44 tracks, which are upsampled when played in the Tidal app. You can avoid that by streaming Tidal with UAPP, but not Tidal offline -- for that you have to use their app.

Others want to use Spotify or Google Play Music or some other service, although audiophiles are more focused on Tidal and Qobuz because of the higher sound quality.

So if you have suggestions for how to address this system-wide on rooted phones, I am very interested. So far my conclusion is we need a modified audio_flinger which converts 16/44 to 24/44 on the fly instead of passing it through the Mixer for upsampling. But I hope I am wrong, that it can be done with policy tweaks after all.
 
Last edited:

ctheanh

Member
Aug 9, 2007
33
14
Thank you for confirming about Poweramp. Were you able to verify it by inspecting audio_flinger dumps (not just trusting settings menus in the app)?

No doubt policy is what forces 16/48. But I know others with rooted V30 spent considerable time experimenting with audio_io_policy.conf modifications without being able to make it play 16/44 Direct/offloadable. Personally I think because the codec driver doesn't implement it.

When you mentioned other solutions on rooted phones, I was hoping you meant system-wide solutions, not just another app. We've already had UAPP and Neutron for ~1.5 years supporting it through 24/44. And now possibly Poweramp too, if confirmed. So we're covered there.

A common issue for audiophile V30/V35/V40/G7 users is upsampling in Tidal: The Tidal app is perfect when playing Master tracks (MQA/HiRes) which are 4x unfolded and rendered beautifully in hardware on V30. But most of Tidal's catalog is non-Master 16/44 tracks, which are upsampled when played in the Tidal app. You can avoid that by streaming Tidal with UAPP, but not Tidal offline -- for that you have to use their app.

Others want to use Spotify or Google Play Music or some other service, although audiophiles are more focused on Tidal and Qobuz because of the higher sound quality.

So if you have suggestions for how to address this system-wide on rooted phones, I am very interested. So far my conclusion is we need a modified audio_flinger which converts 16/44 to 24/44 on the fly instead of passing it through the Mixer for upsampling. But I hope I am wrong, that it can be done with policy tweaks after all.

I 've just came back to V35 for 3 days without rooting access so not enough time to research many things.

My experience with Vibe X3, LG V10 before with Poweramp (from their alpha version) with checking the mixer path, dumping file, alsa output status... and I can confirm that Poweramp show correctly what they did. With LG V35, sometime it turn off HIFI Mode(don't know why, you can check it by switching On/Off to here the interuption) and Poweramp will show that it will play at 16/48 output.

Changing *.conf file never give the result, because the parameter is setup in source code file. I have to use ALSA or tinyalsa to check because with Vibe X3, I can check the kernel source code and it 's not the problem in kernel level. We only can do it if anyone can rebuild the audioflinger, so we need the whole system source code. I don't think LG will public it.

I checked this on G6 file.
direct_pcm_16 {
flags AUDIO_OUTPUT_FLAG_DIRECT
formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT
sampling_rates 44100|48000|88200|96000|176400|192000
bit_width 16
app_type 69936
}
Can you check it build.prog if this option is disable?

I have no idea with Tidal for 16/44,1 file or we can ask Tidal to convert it to 24 bits for us.

Mixer path is a good solution when we want to route the signal to Hi-res path, but this is not for everyone. It will not work for commercial app like Neutron,UAPP and that's why I tested it with ALSA Player.

About ALSA player,no..it's not a real player..it's just for researching.
 
  • Like
Reactions: TheDannemand

TheDannemand

Senior Member
Feb 12, 2008
1,168
1,181
I 've just came back to V35 for 3 days without rooting access so not enough time to research many things.

My experience with Vibe X3, LG V10 before with Poweramp (from their alpha version) with checking the mixer path, dumping file, alsa output status... and I can confirm that Poweramp show correctly what they did. With LG V35, sometime it turn off HIFI Mode(don't know why, you can check it by switching On/Off to here the interuption) and Poweramp will show that it will play at 16/48 output.

Changing *.conf file never give the result, because the parameter is setup in source code file. I have to use ALSA or tinyalsa to check because with Vibe X3, I can check the kernel source code and it 's not the problem in kernel level. We only can do it if anyone can rebuild the audioflinger, so we need the whole system source code. I don't think LG will public it.

I checked this on G6 file.
direct_pcm_16 {
flags AUDIO_OUTPUT_FLAG_DIRECT
formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT
sampling_rates 44100|48000|88200|96000|176400|192000
bit_width 16
app_type 69936
}
Can you check it build.prog if this option is disable?

I have no idea with Tidal for 16/44,1 file or we can ask Tidal to convert it to 24 bits for us.

Mixer path is a good solution when we want to route the signal to Hi-res path, but this is not for everyone. It will not work for commercial app like Neutron,UAPP and that's why I tested it with ALSA Player.

About ALSA player,no..it's not a real player..it's just for researching.

Thanks again for confirming about PowerAmp that it actually does it correctly now (which wasn't the case a few months ago). You should post that in csglinux' Head-Fi thread, where I see you are also active, so that he can update his opening post.

So we now have three confirmed player apps to bypass 48Khz upsampling of 16/44: UAPP, Neutron, PowerAmp. That's great :)

Of course the system-wide fix I am looking for is for all the OTHER apps, since these three already play everything correctly, including Redbook 16/44, HiRes and MQA (in the case of UAPP).

I want to stress again for others who may read this, that as long as we're playing 24-bit, other apps (even dumb ones) work fine as well: As shown in that audio_flinger dump from Google Play Music I posted, 24/44 plays through the Direct path with offloadable flag. That includes Tidal when playing Master/MQA tracks. (There is a myth that Tidal doesn't play MQA correctly or fully unfolds, which is NOT true in the case of V30/V35/V40/G7)

We DO actually have sources for most of the LG phones. Check here: http://opensource.lge.com/index

I spent quite a bit of time parsing through the ES9218P codec driver source for various models of V30, V35, V40, G7 and G8. The goal of that was to inspect the differences between the models (the claimed B&O vs Meridian tuning) and to better understand the gain modes (Normal, Aux, High-Impedance -- which many people completely misunderstand, thinking that HIM is required for good sound quality, even on efficient headphones/IEMs that don't need it).

But one of my first observations in those sources was that 44.1 is NOT in the list of supported sample rates at all (see below).

There is something strange with that, since evidently 24/44 plays beautifully through the Direct path with offloadable flag. Even if we speculate that it might be upsampled by some other process than the Mixer, but BEFORE reaching the DAC, there is an audible difference between playing the same track as 24/44 (Direct, offloable) and upsampled to 16/48 by the Mixer, with the latter causing hiss and other artifacts on sensitive IEMs. Also, csglinux received confirmation from Shanling that the same 9218P (used in their M0 DAC) DOES indeed support 44.1.

Any insights you might have about that would be great.

I am not set up to recompile the kernel (where the codecs are located) so I cannot test changes to the drivers. Heck, I haven't even rooted my H932 yet, as I am hanging on to my 2-year warranty. But finding a solution to this upsampling would make me root in a heartbeat! :cool:

Snippets from es9218.c (codec driver source) for V30 H932
Code:
#define ES9218_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |  \
        SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |   \
        SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |   \
        SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_384000 ) //|SNDRV_PCM_RATE_352800  TODO for dop128

#define ES9218_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | \
        SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S20_3BE | \
        SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE | \
        SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE)

...

static struct snd_soc_dai_driver es9218_dai[] = {
    {
        .name   = "es9218-hifi",
        .playback = {
            .stream_name    = "Playback",
            .channels_min   = 2,
            .channels_max   = 2,
            .rates          = ES9218_RATES,
            .formats        = ES9218_FORMATS,
        },
        .capture = {
            .stream_name    = "Capture",
            .channels_min   = 2,
            .channels_max   = 2,
            .rates          = ES9218_RATES,
            .formats        = ES9218_FORMATS,
        },
        .ops = &es9218_dai_ops,
    },
};
 
Last edited:

csglinux

New member
Jul 17, 2018
2
5
Big thanks to Dannemand for pursuing this. It is frustrating that LG are unaware of (or don't care about) this re-sampling issue.

I just checked with the trial version of Poweramp. It's not working correctly for me:

Output thread 0xee783980, name AudioOut_15, tid 3849, type 0 (MIXER):
I/O handle: 21
Standby: no
Sample rate: 48000 Hz
HAL frame count: 1920
HAL format: 0x1 (AUDIO_FORMAT_PCM_16_BIT)
HAL buffer size: 7680 bytes
Channel count: 2
Channel mask: 0x00000003 (front-left, front-right)
Processing format: 0x1 (AUDIO_FORMAT_PCM_16_BIT)

Is there some setting I'm overlooking, or do I need the paid version? (The UI does look pretty.)

Here's brief summary/re-wording of something I posted a while back on headfi...

I found a post on the V20 thread that looked really optimistic (I can't post a link to it because of the anti-spam rules here, but you'll find it if you search the headfi V30 tips/tricks thread). I tried that suggestion (and a zillion other options) on a rooted V30 and nothing worked :( I pm'd the user that made that post, but they never replied. FYI, my V30's Oreo /system/build.prop contains this line:

vendor.audio.offload.pcm.16bit.enable=false

Changing the above to "true", and/or adding "audio.offload.pcm.16bit.enable=true" has no effect on my V30.
The closest I've gotten to something interesting was to replace the AUDIO_FORMAT_PCM_16_BIT flags in audio_policy.conf and audio_policy_configuration.xml in /etc, /vendor/etc and /vendor/etc/audio with
AUDIO_FORMAT_PCM_24_BIT_PACKED. This results in audio_flinger reporting 44 kHz/24 bit, but it still goes through the mixer. (I still hear the resampling artifacts and audio_flinger still reports "mixer" on the output thread). I've never heard a V20, so I'm not 100% sure the fix in the above link actually worked, or just tricked audio_flinger. However, it's interesting that the output thread reports "DIRECT". I've not been able to get the V30 to do that.

Neutron and UAPP avoid the Android mixer by calling the AudioTrack API. I asked Dmitry Kos (Neutron developer) whether he thought there was any hope of a global/system-wide fix for this. His reply:

"No no, it is not possible because it depends on each app which is
doing audio output. E.g. app needs to implement access to AudioTrack
in its code which is then compiled into a binary executable."

And also...

"LG knows about AudioTrack for sure, it is an internal main audio class
for audio input/output and is well documented inside the Android OS
source code. It is used directly by the system apps too but may be
developers of firmware do not bother with format switching (or
matching to a track) and therefore do not implement extended
functionality."

I'm not sure all hope is lost for a system-wide fix, but after a couple of days of messing around with system files and getting nowhere, I gave up. I'll happily try again if I get any other ideas or suggestions :)

P.S. Aha! There are indeed settings for Poweramp :) Under Settings->Audio->Output, there's an AudioTrack output option. That looked promising, but seems to do nothing :( However, below that is a "Hi-Res Output" option. If you switch this on for the wired headset/aux, we can indeed get direct output, by-passing the mixer. Nice find ctheanh! The one small caveat seems to be that you have to set the sampling rate manually. 44/16 plays back as 44/24 and reports as such via audio_flinger (which is great news), but so does 96/24, 192/24, etc. Curiously, the higher-res tracks sound ok even when reported as 44 kHz. I'll have to run some tracks through an FFT to see if it's just a reporting issue.
 
Last edited:
  • Like
Reactions: TheDannemand

TheDannemand

Senior Member
Feb 12, 2008
1,168
1,181
@csglinux: Awesome, thank you for stepping in. I was hoping you might! Those efforts of yours were exactly the ones I referred to a few posts up.

One thing puzzles me with those reports about UAPP and Neutron using the AudioTrack API to allow 24/44 to be played unmolested: As you'll recall, I tested 24/44 with Google Play Music, and it ALSO plays it unmolested: DIRECT path, offloadable flag, all exactly the same as UAPP.

So if UAPP is doing something fancy to avoid resampling (other than converting 16/44 to 24/44) then Google Play Music is doing it too.

@ctheanh: Not being rooted, I wasn't able to read my build.prop directly, but I extracted it from the ROM zip file.

As csglinux posted, the V30 build.prop contains:

vendor.audio.offload.pcm.16bit.enable=false

and also:

audio.offload.24bit.enable=1

The direct_pcm_16 entry you asked about is not in build.prop, but in vendor/etc/audio_output_policy.conf:

Code:
  direct_pcm_16 {
    flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_DIRECT_PCM
    formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT
    sampling_rates 44100|48000|96000|192000
    bit_width 16
    app_type 69936
  }

In vendor/etc/audio_policy_configuration.xml, we have the following:

Code:
<mixPort name="direct_pcm" role="source"
		flags="AUDIO_OUTPUT_FLAG_DIRECT">
	<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
			 samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000"
			 channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
	<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
			 samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800"
			 channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
	<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
			 samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000,352800"
			 channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>

I'll attach these files later for your perusal.

Now, just because cglinux and I eagerly latch on to you, and dump our investigative findings on you, you shouldn't feel any pressure at all. We've been waiting 1.5 years for a solution to this, so we can wait another week :D (That was a joke, in case it wasn't obvious)

And seriously, we appreciate any suggestions that you (or others) may have. This is the biggest obstacle for the acceptance of V30/V35/V40/G7 among audiophiles: When they hear that this upsampling of 16/44 is unavoidable with Qobuz or Tidal, that's a dealbreaker for many.

So thanks again :)
 
Last edited:
May 7, 2019
7
0
Wow ok this thread has been a read. Just trying to learn tricks with my g8. Is this info applicable? And I wanted to clarify because a lot of this info was crazy thorough and went over my head. With tidal, it will upsample non mqa tracks? And when playing outside of tidal (I use the lg player), all is well? Plays as the source file intends? Sorry, you may need to dumb it down for me, new to all this.

Edit: just found uapp on playstore. Is it worth getting? So tidal would stream via there vs my tidal app? Also, im not rooted or anything
 
Last edited:

TheDannemand

Senior Member
Feb 12, 2008
1,168
1,181
Wow ok this thread has been a read. Just trying to learn tricks with my g8. Is this info applicable? And I wanted to clarify because a lot of this info was crazy thorough and went over my head. With tidal, it will upsample non mqa tracks? And when playing outside of tidal (I use the lg player), all is well? Plays as the source file intends? Sorry, you may need to dumb it down for me, new to all this.

Edit: just found uapp on playstore. Is it worth getting? So tidal would stream via there vs my tidal app? Also, im not rooted or anything

I apologize for derailing the thread a bit: While the discussion about how to avoid up-sampling is quite relevant to the thread topic, it is arguably better suited for a separate thread.

To sum it up and answer your questions:

1) The Tidal app plays all Master/MQA tracks perfectly and fully decoded + rendered using the Quad DAC, both streaming and downloaded/offline.

2) The Tidal app plays all non-Master/MQA tracks (ie all CD quality 16/44 tracks) through the Android Mixer, which up-samples to 48Khz, hurting quality somewhat.

3) UAPP plays EVERYTHING correctly (assuming correct settings) both 16/44, HiRes and MQA, regardless of source (local files, Tidal, Qobuz, etc). To me that $8 purchase is a no-brainer for anyone concerned about sound quality. You do NOT have to purchase UAPPs MQA decoder, as it uses the Quad DACs hardware MQA. Unfortunately UAPP does not support Tidal offline, you have to use the Tidal app for that.

4) Most other apps, including LG Music, Spotify, Google Play Music etc, ALL play HiRes files correctly -- in fact, anything 24-bit. And they ALL play 16/44 through the Mixer (up-sampling) including CD quality Flac, MP3, etc. Someone posted somewhere that AAC files don't up-sample, which is interesting, if true.

That's all I have time for now. There are more myths to clear up, particularly about High Impedance Mode, but that will have to wait.
 
May 7, 2019
7
0
I apologize for derailing the thread a bit: While the discussion about how to avoid up-sampling is quite relevant to the thread topic, it is arguably better suited for a separate thread.

To sum it up and answer your questions:

1) The Tidal app plays all Master/MQA tracks perfectly and fully decoded + rendered using the Quad DAC, both streaming and downloaded/offline.

2) The Tidal app plays all non-Master/MQA tracks (ie all CD quality 16/44 tracks) through the Android Mixer, which up-samples to 48Khz, hurting quality somewhat.

3) UAPP plays EVERYTHING correctly (assuming correct settings) both 16/44, HiRes and MQA, regardless of source (local files, Tidal, Qobuz, etc). To me that $8 purchase is a no-brainer for anyone concerned about sound quality. You do NOT have to purchase UAPPs MQA decoder, as it uses the Quad DACs hardware MQA. Unfortunately UAPP does not support Tidal offline, you have to use the Tidal app for that.

4) Most other apps, including LG Music, Spotify, Google Play Music etc, ALL play HiRes files correctly -- in fact, anything 24-bit. And they ALL play 16/44 through the Mixer (up-sampling) including CD quality Flac, MP3, etc. Someone posted somewhere that AAC files don't up-sample, which is interesting, if true.

That's all I have time for now. There are more myths to clear up, particularly about High Impedance Mode, but that will have to wait.

Thanks for the detailed info ! I got uapp, and also got the mqa enhancement because I didnt know what I was doing. Is it "harming" anything or is it just something added that I didnt require?

Can you sanity check my uapp settings?
-Bit perfect mode is on (as opposed to when possible)
-Hi res driver audio format is set to auto
-Hi res driver flags untouched since it said the phone should know what to do.
-Upsample off.

Something else I was curious about was even though I'm "direct" as the app says, I can still use the lg equalizer in sound options. Shouldnt I not be able to mess with those settings? Or does that mean I'm not direct after all?
 

TheDannemand

Senior Member
Feb 12, 2008
1,168
1,181
Thanks for the detailed info ! I got uapp, and also got the mqa enhancement because I didnt know what I was doing. Is it "harming" anything or is it just something added that I didnt require?

Can you sanity check my uapp settings?
-Bit perfect mode is on (as opposed to when possible)
-Hi res driver audio format is set to auto
-Hi res driver flags untouched since it said the phone should know what to do.
-Upsample off.

Something else I was curious about was even though I'm "direct" as the app says, I can still use the lg equalizer in sound options. Shouldnt I not be able to mess with those settings? Or does that mean I'm not direct after all?

Enable MQA in Hi res driver flags, that will activate full 4x MQA decoding and rendering using the Quad DAC hardware (instead of the software MQA decoder you purchased, which only does 2x).

Your other settings sound right.

And yes, you can still use the LG equalizer and presets, but shouldn't if you want bit-perfect. Once you enable the MQA flag, that will block EQ and presets for most PCM files.

Have to run...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Howdy All,

    For those who have had a LG V device in the past you'all know what's coming - how do we trick the quad DAC into high impedance mode (HIM) or AUX mode?

    For those who don't know here's a little background. The previous LG V series phones have had a very nice DAC and AMP setup which can almost meet the standards of audiophile quality. The thing was that in the later phones (V20 and V30 AFAIR) the software was designed to "smart switch" which mode the AMP was in. HIM and AUX mode settings had the loudest volumes and was corresponding to the headphone impedance value. The normal setting had the lowest volume designed for low impedance IEMs. Note that the AMP setting doesn't really have a bearing on sound QUALITY, just sound VOLUME. I'm guessing but the reasoning for this is to prevent blown IEMs and blown eardrums. I'm going to find the link for the old V30 quad DAC thread and some stuff tried and what worked in order to activate AUX mode and/or HIM. BTW having ROOT on the phone allows for adjusting this setting as needed, which is why I went with the unlocked version this time around. My pair of MrSpeakers Aeon Flows have low impedance but need power in order to drive properly and the AMP in the V series phones would only trigger normal impedance mode.

    https://xdaforums.com/lg-v30/help/modes-quad-dac-t3690567

    So that brings us to the V40. Does it have a quad DAC? Yes it does. Does it have a smart switching AMP? So far my indications are yes it does. Do the old tricks from the V30 days work on the V40? I don't think that they do. I have multiple extension cables, which I use for triggering the AUX mode as well as an impedance adapter (50ohms I think). The old methods of using the extension cable, the adapter, and both don't seem to have an effect on the AMP setting. My Sony MDR-1As are much louder than my Aeon Flows...bummer for me.

    UPDATE - Upon further testing with the help of this app: https://play.google.com/store/apps/details?id=com.apptrio.hi_fi_status I was able to trigger the AUX AMP mode and it kicked up the volume on my Sony's quite a bit! Unfortunately when I triggered HIM the volume of the sound did not change from the normal mode. Basically what I did was take a 2ft 3.5mm cable extension (male on one side female on the other) and plug it in WITHOUT THE HEADPHONE CABLE ATTACHED. Once the HIFI status app displayed AUX mode I then plugged in my HPs and BOOM, here comes the volume!

    Anyways if you have anything to add or have any questions feel free to hit us up. When root is available I'll also make updates to this thread if need be.

    Have a good one :highfive:
    2
    Thank you for all your advice. I followed it and purchased the Poweramp. However, I couldn't find the output setting which can enable the quad DAC.
    I also went to your download link but the file is no longer available.
    Please show me further if you are still available in this forum.

    I am not completely sure of the context here, but if you enable Quad DAC on the OS Quad DAC Settings page (which you can only do when something is plugged into the 3.5mm port) it will be used by any player app.

    For best sound quality, you should use UAPP or Neutron, which are able to avoid upsampling of 16/44 music (i.e. all non-HiRes music). Check the thread linked below for more details.

    https://xdaforums.com/lg-v30/how-to/bypassing-mixer-48khz-upsampling-16-44-t3933075

    Apps or mods which claim that they can avoid down-sampling or re-sampling HiRes music are NOT needed on this phone. While many Android devices are limited to 48KHz, that is NOT the problem with Quad DAC phones, except with a few bonehead apps (notably Amazon and Qobuz). Other apps play HiRes just fine, including LG Music, PowerAmp, Tidal and even dumb ones like Google Music.

    You are generally best off disabling all digital processing in the player app (up-sampling, EQ etc) and all effects on the Quad DAC settings page. Some people prefer EQ to compensate for the sound color of their headphones/IEMs, but when possible, it's always better to find ones that match your preference and avoid digital processing.
    2
    Went back to Poweramp (poweramp-alpha-build-705) and so far it's the best one for me.
    For anyone who didn't know, if you payed for the full version, you can upgrade it to high res.

    https://forum.powerampapp.com/topic...s-within-old-feature-complete-user-interface/
    2
    I have both the V30 and V40 too. The V40 doesn't sound weaker to me, it's just that the amp scales differently with the volume slider. You need slightly higher volume on the V40's slider to achieve the same amplification as the V30 and the volume rises more abruptly towards the end of the scale. I even measured both phones output voltage while playing pink noise. It's about the same.

    Other than than that, the V40 sounds cleaner. The V30 has worse mids and muddier soundstage, maybe warmer bass. The differences are very small but noticeable. I wouldn't say the V30 sounds bad, but it's clearly not better than the V40 to my ears.
    2
    MQA stands for Master Quality Authentication. It's an audio codec using lossy compression and a form of file fingerprinting used for high fidelity digital audio streaming and file downloads. It was launched in 2014, and is included in some very high quality and expensive hifi gear. It has been hailed as a significant advance by some of the industry's golden ear reviewers and editors, but some in the industry are against it, mostly due to royalties and licensing requirements. Tidal's "Hifi" streaming package uses the MQA codec, so the content sounds best when played back using equipment that supports MQA playback. I heard a demonstration of MQA at HIFI Buys in Atlanta, on some very high resolution equipment, and it sounded great, sounding more analog and much less digital than standard CD playback.

    The LG V30 does have the MQA decoding software. That devise has been tested by various high end audio reviewers to much acclaim, and some of that was due to the inclusion of MQA. That's why I'm hoping it's also in the V40.