Music Apps, Tips and Tricks for the LG V30, V35, V40, V50 & V60
Mar 12, 2021 at 3:26 PM Post #991 of 1,181
Hi,

I ran some tests via ADB and I'm wondering if there's anything I need to do after I run the audioflinger command? I can't quite make out the results as there is so much information.

I've searched the results based on one of your previous posts and have screen captures of what I've found but I just want to be sure I'm not missing something to make it easier.

It's a log file, so they're not spelling is out for us. Basically just capture the output by typing adb shell dumpsys media.audio_flinger >audio_flinger.txt during playback, then find the last Output thread in that dump file (audio_flinger.txt). Compare it to the one I included in this post, looking at the bolded words.

In particular, you want the Output thread type to be (DIRECT) not (MIXER), and you want the Sample rate and HAL format to be the same as the source (except in UAPP's case, it converts 16-bit to 24-bit, since otherwise it WILL go through the mixer). You also want to see (AUDIO_OUTPUT_FLAG_DIRECT) and the flag offloadable. Again, these are all bolded in my post.

When playing Bluetooth, it gets more complicated, as it will always use the Mixer, and you have to look at the input tracks. Also, there will be multiple Mixer Output threads, as it first resamples, then converts to the BT codec, and finally duplicates it to the BT device. We'll save that for some other day :jecklinsmile:
 
Mar 13, 2021 at 3:54 AM Post #992 of 1,181
It's a log file, so they're not spelling is out for us. Basically just capture the output by typing adb shell dumpsys media.audio_flinger >audio_flinger.txt during playback, then find the last Output thread in that dump file (audio_flinger.txt). Compare it to the one I included in this post, looking at the bolded words.

In particular, you want the Output thread type to be (DIRECT) not (MIXER), and you want the Sample rate and HAL format to be the same as the source (except in UAPP's case, it converts 16-bit to 24-bit, since otherwise it WILL go through the mixer). You also want to see (AUDIO_OUTPUT_FLAG_DIRECT) and the flag offloadable. Again, these are all bolded in my post.

When playing Bluetooth, it gets more complicated, as it will always use the Mixer, and you have to look at the input tracks. Also, there will be multiple Mixer Output threads, as it first resamples, then converts to the BT codec, and finally duplicates it to the BT device. We'll save that for some other day :jecklinsmile:
What does it mean if the output thread type says (record)?
 
Mar 13, 2021 at 4:05 AM Post #993 of 1,181
I have done loads of checks with audio_flinger and have seen that uapp plays files as it should on my V50. The tidal app version 2.21 doesn't as said already. But, with this version I can use the quad DAC where as I can't on the newer app versions and it does sound better than just using the Android mixer.

I have now wasted hours on doing these checks and not actually listened to any music. :beyersmile:
 
Mar 13, 2021 at 4:32 AM Post #994 of 1,181
I have done loads of checks with audio_flinger and have seen that uapp plays files as it should on my V50. The tidal app version 2.21 doesn't as said already. But, with this version I can use the quad DAC where as I can't on the newer app versions and it does sound better than just using the Android mixer.

I have now wasted hours on doing these checks and not actually listened to any music. :beyersmile:
:smile: :smile::smile:

Welcome back, my friend, to the world of music. ^^
 
Mar 17, 2021 at 10:10 AM Post #996 of 1,181
Indeed.

Sadly, the price for a V50 has raised in germany to > 600 € nowadays. :frowning2:
 
Mar 19, 2021 at 9:47 AM Post #997 of 1,181
Thank you for sharing that. Again incredulous that they didn't know about these issues, but not surprising. We'll see if you ever hear back.

@csglinux will say that I am too naive, and he has been right so far :D
Hi,

I've had a reply from LG today. See below

Good Morning Daniel,

I am sorry for the delay in getting back to you, this is due to a high influx of emails which we are working quickly to respond to. Thank you for your patience.



I have had a response regarding your issue with the MQA no longer working after updating to Android 10. We have had a response from our Head Office, and they have been unable to find any fault and so they would like to re-create the issue using the same files and applications that you are using. For us to do this, please confirm which MQA filed you were unable to play and also which app you were using.



Once we have this information, we can investigate this further for you. I look forward to hearing from you.



I hope I have helped you today, but if you have any more questions regarding this, please do not hesitate to get back in contact with us for further assistance, we would be happy to help you. I hope you have a lovely day.



-----------------------------------------------------------------



Kind Regards



Rebecca | LG Electronics UK Helpdesk
 
Mar 19, 2021 at 9:49 AM Post #998 of 1,181
Any recommendations for my response?

I was going to mention the tidal app no longer playing through the Quad DAC but wanted to make sure I had all the correct information before I reply.
 
Mar 19, 2021 at 10:25 AM Post #999 of 1,181
Any recommendations for my response?

I was going to mention the tidal app no longer playing through the Quad DAC but wanted to make sure I had all the correct information before I reply.
I would give them the following information:

1. App being used is the TIDAL app from the Play Store (version number, build number, etc)
2. TIDAL app settings (e.g you need a TIDAL HiFi account, set Masters quality, etc)
3. Two or three links to TIDAL Masters songs (to be played from within the TIDAL app_
4. An explanation of what should happen (with ways of verifying what should happen)
5. An explanation of what is happening (with ways of verifying what is happening)

A few screenshots would be useful. Leave nothing to chance or misinterpretation!
 
Mar 19, 2021 at 12:44 PM Post #1,000 of 1,181
Any recommendations for my response?

I was going to mention the tidal app no longer playing through the Quad DAC but wanted to make sure I had all the correct information before I reply.

In addition to everything mentioned by @Taz777 I would say include audio-flinger dumps that show MQA tracks playing through the mixer. And explain that MQA tracks must play using Direct path in order to preserve the MQA.

Make sure to include both 16/44 MQA tracks (like the Warner albums) and HiRes tracks (like the 2L albums) and include dumps for both.

Thank you for doing this. And for sharing the answers from LG :)

Edit: And make sure to use the latest Tidal app when you provide evidence to LG. Otherwise they'll just come back and say you need to update to the latest, and assume that is the problem.

Edit 2: You could also include a dump file from Tidal 2.21.0 on an earlier Android version to illustrate the difference. Just grab one of the ones I posted earlier in this thread. They were captured on V30 using Android Pie.
 
Last edited:
Mar 20, 2021 at 5:16 AM Post #1,001 of 1,181
Done some tests this morning. Will post my results for people with better knowledge than me to look over.

Tidal MQA 2.37 build
Output thread Ox724d65ddco, name Audio0ut 10, tid 1604, type o (MIXER):

I/0 handle: 29

Standby: yes Sample rate: 48000 Hz

HAL Frame count: 768

HAL format: 0x1 CAUDIO_FORMAT_PCM 16 BIT)

HAL buffer size: 3072 bytes

count: 2 Channel mask: Ox00000003 (Front-Left, front-right)

Processing format: Ox5 CAUDIO_FORMAT_PCM_FLOAT)

Processing frane size: 8 bytes Pending config events: none

Output device: O CAUDIO_DEVICE_NONE) Input device: O ÇAUDIO_DEVICE_NONE)

Audio source: 0 (AUDIO_SOURCE DEFAULT)

Timestamp stats: n-o disco cold-o ndy-err-i jitterms(unavail)

Timestamp corrected: Master mute: off

no

Normal frame count: 1152

Total writes: 0 Delayed writes: 0

Blocked in write: no Suspend count: 0

Sink buffer : 0x72dd1 48800 Mixer buffer: Ox724d6bbf 80 Effect buffer: 0x72ddi a6000

Fast track avai IMask=Oxfe Standby delay ns-3000000000

Audiostrearout: Ox72dd183600 flags o (AUDIO_OUTPUT_FLAG_NONE)

Franes written: 0

Suspended frames: 0 Pipe5ink frames written: 0

Hal stream dump: Standby: yes Frames written: 0

Errors: 0 Signal power history: (none)

Thread throttle time (msecs): 0

AudioMixer tracks: Master mono: off

Master balance: 0.000000 (0.000000) FastMixer thread Ox724d6delco tid=1603 FastMixer command=COLD_IOLE writeSequence=a frameswritten=D

numTracks-0 writeErrors underruns:0 overruns-0 SampleRateo frameCount=0 measured warmup=0 ms, warmupCycles=0

XPeriodenan ms latency=0.00 ms No FastMixer statistics available currently

FastMixer Timestamp stats: n=0 disc=0 cold-0 nRdy-0 err-0 jitterMs (unavai1) localSR (nan, nan) correctedlitterMs (unavail)

Fast tracks: SMaxFastTracks=8 activelask-0 Index Active Full Partial Empty Recent Ready written
 
Last edited:
Mar 20, 2021 at 5:23 AM Post #1,002 of 1,181
UAPP Tidal MQA

Output thread Ox7247005800, name Audidout_92D, tid 2786, type 1 (DIRECT): I/O handle: 2349

Standby: no Sample rater 44100 Hz

HAL frame count: 3552 HAL format: Ox6 (AUDIO_FORMAT_PCM_24_BIT_PACKED)

HAL buffer size: 21312 bytes

Channel count: 2 Channel mask: Ox00000003 (front-left, front-right)

Processing format: Ox6 (AiDIO_FORMAT_PCM_24_BIT_PACKED) Processing frame size: 6 bytes

Pending config events: none Output device: Ox8 (AUDIO DEVICE OUT WIRED HEADPHONE)

Input device: 0 (AUDIO_DEVICE. NONE) Audio source: O (AUDIO_SOURCE_DEFAULT)

Timestamp stats: n-204 disc-1 coid-1 ndy-0 err-o rate=1.00036 jitterns[avce-0.0276386

d=0.283785 min=-1.37198 mac=1.63426) Timestamp corrected: no

Last write occurred (esecs): 93 Process time ms stats: ave-0.492003 std-0.188114 min-0.14099 max-1.31083

Hal write jitter ms stats: ave=-0. 3385 34 std=5. 12396 min=-79.7009 max=9.29958 Threadloop write latency stats: ave-268.625 std-21.3762 min--0.113281 max-280.108

Master mute: off

Normal frame count: 3552 Total writes: 203

Delayed writes: 0 Blocked in write: yes

Suspend count: 0 Sink buffer : Ox724d77d080 Mixer buffer: Ox7246a46bs0

Effect buffer: Ox72467caado Fast track avai Mask=0xfe

Standby delay ns-3000000000

Audiostreanout: Ox724d759aB0 flags Ox200001 (AUDIO_OUTPUT_FLAG_DIRECT) Frames written: 72105 6

Suspended frames: 0 Hal stream dump:

Standby: no Frames written: 4326336
 
Last edited:
Mar 20, 2021 at 5:26 AM Post #1,003 of 1,181
LG Music App Hi Res

Output thread Ox7247074000, name Audio Out 935, tid 3265, type 1 (DIRECT):

I/0 handle: 2357

Standby: no Sample rate: 176400 Hz

HAL frame count: 14112 HAL format: OxS (AUDIO_FORMAT_PCM_FLOAT)

HAL buffer size: 112896 bytes

Channel count: 2

Channel mask: Ox00000003 (front-left, front-right) Processing format: 0x5 (AUDIO_FORMAT_PCM_FLOAT) Processing Frame size: 8 bytes

Pending config events: none Output device: 0x8 (AUDIO_DEVICE_OUT_WIRED_HEADPHONE)

Input device: 0 (AUDIO DEVICE NONE) Audio source: 0 ČAUDIO_SOURCE DEFAULT)

Timestamp stats: n-181 disc1 cold-0 nRdy-0 err-0 rate-1.00208 jitterMs(ave--0.153138 std-1.99207 min--20.2314 max-9.70672) tocalSR(176403, 6.33201e-07) correctedlitterks(ave--0.137003

58529 min=-20.3731 max=1.19225) Timestamp corrected: no

Last write occurred (msecs): 156 Process time ms stats: ave-0.439859 std-0. 217971 min-0.169427 max-3. 28797 Hal write jitter ms stats: ave--0, 35595 std-4.83904 min--76, 6585 max=9, 60167

Threadloop write latency stats: ave-227, 361 std-19.4239 min--0. 062864 max-238, 894 Master mute: off

Normal frame count: 14112 Total writes: 180

Delayed writes: 0 Blocked in write: yes

Suspend count: 0

Sink buffer : 0x7242115700 Mixer buffer: Ox72430a4b00

Effect buffer: Ox7247132d40 Fast track avai IMask-Oxfe

Standby delay ns=3000000000 Audiostreanout: Ox725445 6cco flags Ox2 (AUDIO_OUTPUT_FLAG_DIRECT) Frames written: 2540160

Suspended frames: 0 Hal stream dump:

Standby: no Frames written: 20321280
 
Last edited:
Mar 20, 2021 at 5:28 AM Post #1,004 of 1,181
Last one, LG Music App MQA

Output thread Ox72469b1000, name Audio0ut 93D, tid 3627, type 1 (DIRECT): I/O handle: 2365

Standby: no Sample rate: 48000 Hz

HAL frame count: 3840

HAL format: Ox6 (AUDIO_FORMAT_PCM_24_BIT_PACKED) HAL buffer size: 23040 bytes

Channel count: 2 Channel mask: Ox00000003 (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: O CAUDIO DEVICE NONE)

Audio source: 0 (AUDIOSOURCE DEFAULT)

Timestamp stats: n-181 disc-1 cold-l nRdy-0 err-0 rate-0.999736 jitterMs (ave-0.0194243 std-0.732338 min--5.52057 max-5.25328) localSR(47999. 8, 1.54148e-08) correcteditterMs

d=0.269084 min=-0.547292 max=3.51729)

Timestamp corrected: no Last write occurred (nsecs):

157

Process time ms stats: ave=0.494404 std-0.577929 min=0.142552 max 7.63275

Hal write jitter ms stats: ave--0.362424 std-5.00862 min--79.3351 max=7.86901 Threadloop write latency stats: ave=266. 587 std=23.1628 min=-0.093645 max=273.065

Master mute: off

Normal frame count: 3840 Total writes: 180 Delayed writes: 0

Blocked in write: yes Suspend count: 0

Sink buffer : 0x724d7b60c0 Mixer buffer: Ox7246a465c0

EFfect buffer: Ox72468a5 6c0 Fast track avai IMask-Oxfe Standby delay ns=3000000000

Audiostreanout: Ox724d759e00 flags Ox200001 Frames written: 691200

Suspended frames: 0 Hal stream dump:

Standby: no Frames written: 4147200
 
Last edited:
Mar 20, 2021 at 8:21 AM Post #1,005 of 1,181
Results are as we would expect:

1) Tidal MQA 2.37 build - goes though Mixer path and loses MQA.

2) UAPP Tidal MQA - goes through Direct path and preserves MQA. It always does (16 or 24 bit, MQA or non-MQA) because it converts 16-bit to 24-bit, which allows Direct path.

3 & 4) LG Music - goes through Direct path in both of these cases since they are both 24-bit files. It goes through Mixer path on 16-bit files.

All the tests you did there would be the same on my V30 with Pie or Oreo: 16-bit files always go through the Mixer, thus losing MQA and injecting audible artifacts caused by the poor re-sampling performed by the Mixer. 24-bit files go through Direct path IF (and only if) an app sets AUDIO_OUTPUT_FLAG_DIRECT.

Again, this is true on all Android versions and all LG models.

Tidal App versions up until 2.21.0 do, in fact, set AUDIO_OUTPUT_FLAG_DIRECT, so they play 24-bit files correctly (through Direct path) while 16-bit files go through the Mixer (because LG designed it so that 16-bit files cannot play Direct). If you include one of my dumps from Tidal app 2.21.0 it'll show that.

(As I posted a while ago, it turns out that LG phones CAN actually play 16/44 through Direct path, as long as the MQA flag (lgmqadummy effect) is enabled. Tidal app 2.21.0 demonstrated that.)

After 2.21.0 Tidal app stopped setting AUDIO_OUTPUT_FLAG_DIRECT, so it always goes through Mixer, even 24-bit files, thus losing MQA.

Where there *may* be a difference in Android 10, is that even Tidal 2.21.0 goes through the Mixer according to @csglinux, at least on his V60. But that could be because MQA is removed from that model. We have yet to see if the same is true on V50 with Tidal 2.21.0. If you could test that, it would add significantly to our understanding - and to the evidence you can provide LG.

(Note to self: I have to stop writing head-fi posts on my phone. Between the stupidity of Gboard and the stupidity of head-fi after their redesign, it is a recipe for disaster.)
 
Last edited:

Users who are viewing this thread

Back
Top