Does neutron actually go around android system, or is the output resampled to android supported frequency?

Support questions for Neutron Player only.
Lolik
Posts: 21
Joined: Fri Jan 08, 2021 9:39 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by Lolik » Mon Jan 11, 2021 2:43 pm

blaubär wrote:
Sun Jan 10, 2021 5:33 pm
If you activate oversampling then "Follow Source Frequency" is ignored.
How can this be explained?
My "test" playlist consists of:
16/44.1/Flac
24/88.2/Flac
24/176.4/Flac
24/352.8/Flac
1/2.8Mhz/DSD64
1/5.6Mhz/DSD128
1/11.3Mhz/DSD256
16/96/WAV
16/192/WAV

For some reason, when I turn on Oversampling WITH Follow Source Frequency, everything looks like this:
176.4
176.4
176.4
176.4
176 4
176.4
176.4
192
192
(Makes sense)

But when I turn Follow Source Frequency OFF, the frequency for the DSD files starts acting strangely... When I skip tracks Forward, everything is exactly the same as what's written above, but when I start skipping tracks Backwards (starting from the 192khz (and/or 96, which is oversampled to 192) it starts showing the DSD files to have a frequency of 192, not 176.4... as if instead of multiplying by even numbers, it forgets and just goes with the last used frequency (192), and then it returns to 176.4 when I reach the Flac files.
I don't know, but to me this seems like a bug. Is my description understandable? 😅

blaubär
Posts: 3313
Joined: Tue Apr 02, 2019 6:48 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by blaubär » Mon Jan 11, 2021 3:44 pm

Lolik wrote:
Mon Jan 11, 2021 2:18 pm
The thing that I find confusing in Neutron is that it says that the output is 192, when, if I and so many other people understand correctly, it shouldn't. In other words, Neutron shows Neutrons output, without showing the "final" output.
I guess I should write to the developer about this, but I'm kinda unsure on how to phrase my big question, and I'm very busy right now, so I'll probably write to him later.
As far as Neutron is concerned I'd argue that if the os tells it that 192 kHz is supported and Neutron processes 192 kHz and transfers that to the os then that's the real output. And yes, ask the developer about this and give us feedback.
---
A proposal for the "big question" : does and/or can Neutron make sure that allegedly supported sampling rates aren't downsampled before the DAC ? Can it check whether the os resamples ? Can it ask the DAC what sampling rate it gets ?

blaubär
Posts: 3313
Joined: Tue Apr 02, 2019 6:48 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by blaubär » Mon Jan 11, 2021 4:02 pm

As to DSD: I don't think that there's a definite correlation between DSD and PCM. Of course you can calculate
DSD64 X = 44100 Hz * X -> DSD64 = 2822400 Hz ~ 176.4 kHz * 16
But all I've read about DSD tells me that doesn't mean that DSD64 = 176 kHz 16bit PCM.
So, without a clear correlation, the history may play a part in Neutron's decision what PCM parameters to choose.
---
On some phones Neutron can directly deliver the DSD to the DAC. Look for Audio Hardware > DSD, DSD over PCM (DoP)

20210111_170835.jpg
20210111_170835.jpg (49.87 KiB) Viewed 2719 times

Lolik
Posts: 21
Joined: Fri Jan 08, 2021 9:39 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by Lolik » Mon Jan 11, 2021 5:10 pm

blaubär wrote:
Mon Jan 11, 2021 4:02 pm
As to DSD: I don't think that there's a definite correlation between DSD and PCM. Of course you can calculate
DSD64 X = 44100 Hz * X -> DSD64 = 2822400 Hz ~ 176.4 kHz * 16
But all I've read about DSD tells me that doesn't mean that DSD64 = 176 kHz 16bit PCM.
So, without a clear correlation, the history may play a part in Neutron's decision what PCM parameters to choose.
What I don't quite understand is: Oversampling should use an EVEN Multiple, correct? Then how can it be 192?
File format:
IMG_20210111_195941_518.jpg
IMG_20210111_195941_518.jpg (56.42 KiB) Viewed 2706 times
Neutron output without Oversampling:
IMG_20210111_195945_529.jpg
IMG_20210111_195945_529.jpg (55.75 KiB) Viewed 2706 times
With Oversampling AND Follow Source Frequency:
IMG_20210111_195948_269.jpg
IMG_20210111_195948_269.jpg (57.77 KiB) Viewed 2706 times
With Oversampling and WITHOUT Follow Source Frequency (after moving from other file with 192khz):
***Doesn't let me attach 4th image, see next post

Why does Neutron decide to chose a different frequency with/without Follow Source Frequency if "3. If you activate Audio Hardware > Oversampling then Audio Hardware > Frequency will be ignored."?

Why can 192khz even be possible if "4. Audio Hardware > Oversampling sets the sampling rate to an even multiple of the input.", and 192 is not an even multiple?

Lolik
Posts: 21
Joined: Fri Jan 08, 2021 9:39 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by Lolik » Mon Jan 11, 2021 5:11 pm

Lolik wrote:
Mon Jan 11, 2021 5:10 pm
With Oversampling and WITHOUT Follow Source Frequency (after moving from other file with 192khz):
***Doesn't let me attach 4th image, see next post
IMG_20210111_195950_815.jpg
IMG_20210111_195950_815.jpg (55.4 KiB) Viewed 2705 times

blaubär
Posts: 3313
Joined: Tue Apr 02, 2019 6:48 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by blaubär » Mon Jan 11, 2021 5:15 pm

As I wrote in my last post, I don't think there's a defined correlation between DSD and PCM. So there is no even mutiple. This concept doesn't work for DSD.

Lolik
Posts: 21
Joined: Fri Jan 08, 2021 9:39 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by Lolik » Mon Jan 11, 2021 5:36 pm

blaubär wrote:
Mon Jan 11, 2021 5:15 pm
As I wrote in my last post, I don't think there's a defined correlation between DSD and PCM. So there is no even mutiple. This concept doesn't work for DSD.
Ok, I see 👌 I just thought that there should be some "optimal" choice

blaubär
Posts: 3313
Joined: Tue Apr 02, 2019 6:48 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by blaubär » Mon Jan 11, 2021 8:28 pm

Well, perhaps there is :-), another question for the developer : what algorithm does Neutron use to calcaluate the PCM sampling rate when it plays DSD ? Does this somehow depend on the history ( here you could document your experiment ) ?

blaubär
Posts: 3313
Joined: Tue Apr 02, 2019 6:48 am

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by blaubär » Mon Jan 11, 2021 9:00 pm

As to the change of the sampling rate: if that changes between tracks then certain effects ( gaplessness, fading, ... ) won't work. So it might be part of an algorithm to keep the sampling rate unchanged as long as possible to make the track-transition-effects work, even if there is some cost as to a not-optimal-rate. That might explain the role of the history in such an algorithm.

dmitrykos
Site Admin
Posts: 1914
Joined: Mon Apr 25, 2011 6:15 pm

Re: Does neutron actually go around android system, or is the output resampled to android supported frequency?

Post by dmitrykos » Tue Jan 12, 2021 8:15 pm

Lolik wrote:
Mon Jan 11, 2021 2:18 pm
---
A proposal for the "big question" : does and/or can Neutron make sure that allegedly supported sampling rates aren't downsampled before the DAC ? Can it check whether the os resamples ? Can it ask the DAC what sampling rate it gets ?
There is no big question really. Neutron can not know (and any other apps too) what is the real final output frequency. OS does not provide such API.

All we can do is to force hi-res format to the OS via OS API in hope that it will be accepted by the OS drivers (in normally it is successful).

Assumption regarding the supported frequencies is made on the basis of OS internal config files for audio core which report frequencies and sample formats, some information for device families and SoCs is hardcoded, some device producers provided information regarding what format setup is need for hi-res (for example DAP producers) and etc. The output audio driver is therefore very complex. If config is not accessible then user can tackle it by using the Generic Driver -> Custom Format option which helps to try to enforce hi-res output.

To check if you really have hi-res you could either use ADB command while playback is active and line-out is attached to speakers/headphone (some devices support hi-res only for line-out):

adb shell dumpsys media.audio_flinger

In the obtained log you need to find a DIRECT stream, if all are MIXER then there is no hi-res happening. Some devices do not reflect hi-res via audio_flinger dump, like Samsung S10 and higher and in such case you can employ really effective method which works for all devices:

1. Use Audacity (https://www.audacityteam.org) audio app
2. Create sweep tone for the range of frequencies you wish to test
3. Play sweep tone with Neutron or any other music app and Record it with PC with Audacity at for example 192 kHz frequency
4. Do spectrum with Audacity for the recording and see what frequencies are available

Here is an example of Samsung Galaxy S10e sweet test: https://twitter.com/neutroncode/status/ ... 5745920002

Some users who are using HDMI as output device see the output format on the receiver.

So these are the possibilities.

Please also note that some options may cancel hi-res output: https://neutroncode.com/forum/viewtopic ... 811777ce94

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 32 guests