[LG V40 Guides, News, & Discussion] TheDannemand:
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

#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,
},
};