[LG V30 Guides, News, & Discussion] TheDannemand:
Is anybody aware of a system-wide solution to avoid the upsampling of 44.1KHz / 16-bit music to 48KHz?

With system-wide, I mean a solution that does not rely on certain player apps such as UAPP or Neutron, which we know can do it, but only when playing from inside that app. A solution which works with all (or most) audio sources and apps, modifying the default system behavior of upsampling 44/16 to 48KHz when playing to the Quad DAC.

Personally, I am looking for solutions to work with Tidal offline tracks. Others are looking for solutions to Qobuz, Spotify, Google Play Music or other apps.

Do some of the custom ROMs have fixes for this? Are there policy file or build.prop changes that are proven to fix it?

Googling and searching on XDA finds many references to Android's infamous 48KHz upsampling/re-sampling (SRC) but none that look to be actual, working solutions for our phones. I hope I am wrong and that there is a simple fix which I overlooked.

Background

The LG V series and G series (most models) are appreciated by audiophiles for their excellent ESS Sabre DAC (ES9218P, branded Quad DAC by LG). It can deliver amazing sound quality when paired with good headphones or IEMs (In-Ear-Monitors, earphones). (And no, that doesn't necessarily mean High-Impedance headphones/IEMs, but that's a whole other discussion.)

V30 in particular has gained a rather large following among audiophiles, many of whom congregate on head-fi.org, where you will find a huge V30 thread, a growing V40 thread and a dedicated V30 Music apps, tricks and tips thread.

When it comes to HiRes music (anything higher than 48KHz sample rate and anything 24-bit) most music apps play it correctly: Bit-perfect, without any processing or re-sampling, directly to the DAC -- exactly as audiophiles want it. A few apps are known to downsample HiRes music to Android's default sample rate of 48KHz, but those are the exception.

However 44.1KHz / 16-bit music is always routed through Android's Mixer, which upsamples it to 48Khz. This causes artifacts that are audible to good ears, particularly when played on sensitive IEMs. Since 44/16 includes anything CD quality (whether compressed or uncompressed) that means most music in the world gets molested before it reaches the DAC.

For whatever reason, LGs implementation of the ESS DAC throughout the V and G series have suffered from this inability to play 44/16 music without upsampling. It is the one thing that truly hampers their reputation among audiophiles (arguably even more so than the inability to select between gain modes, which is annoying, but not a deal breaker for most).

This can be verified by inspecting the Output Thread of audio_flinger dumps, showing whether an output stream is played through the DIRECT path (not the MIXER path) and with the offloadable flag (sent straight to the DAC for decoding and rendering). Of course it can also be verified by listening for those artifacts.

The last 1.5 years, audiophile V30 users have relied on UAPP or Neutron as music players because they are able to work around this upsampling. They do so by converting 44/16 format music to 44/24 on the fly, adding zero bits to convert 16-bit to 24-bit. Different from the 48KHz upsampling, this is a harmless conversion which doesn't affect audio quality. (Of course it's also much faster, requiring no interpolation.) And once music is in 44/24 format, it is no problem sending it directly to the DAC, as described above.

We recently confirmed that PowerAmp also is able to do this correctly now (which wasn't always the case). But only if you configure it to convert all music to 44/24, which obviously isn’t desirable for HiRes.

UAPP is my personal favorite, as it also supports streaming services Tidal, Qobuz and Google Play Music, in addition to network services and any PCM or DSD file you can throw at it. All of it pristinely bit-perfect. But it cannot support Tidal or Qobuz offline, which means when playing offline you are limited to HiRes music (only a small part of their catalog) unless you can tolerate the 48KHz upsampling of CD quality tracks in the Tidal/Qobuz apps.

Head-Fi titan [MENTION=9305992]csglinux[/MENTION] and I have set out looking for a solution to this, along with other interested head-fi members. csglinux has been testing various policy and build.prop edits (so far no cigar), while I have been digging through the ESS driver source code from the kernel (but I am not set up to actually build the kernel).

More background and discussion can be found in csglinux' V30 Music apps, tricks and tips thread on head-fi. I also recently had a brief (and more technical) discussion with [MENTION=566221]ctheanh[/MENTION] about this over in the XDA V40 forum, starting here. Arguably those posts would be more suited here.

We have several ideas, but it is a steep hill to climb, as none of us are Android developers. But before posting pages of what we have already tried, or dozens of audio_flinger dumps from various setups, we wanted to throw the topic out there for input. Again, maybe there is already a solution we have overlooked.

Any input is much appreciated!

TL;DR

I personally recommend UAPP as the best $8 anybody can spend if they care about sound quality on their V30. This is not about avoiding that. But UAPP doesn't cover all scenarios, in particular offline Tidal and Qobuz.

That's why we're looking for a system-wide fix (mod or custom ROM) that avoids the upsampling.