Thank You for your continued support and contributions!
In your example, why go down to 24 bit again?
This is entirely out of pure curiosity, but I recently learned what dithering is, and noticed Rockbox has this capability. That got me thinking, I know parts of the RB audio path/pipeline are fixed to 16-bit. What does the audio path's bit depth look like, anyway? Maybe there's already a thread that explains this, but I did a quick search and didn't get much, especially within the last decade.Say I've got a 32-bit FLAC file. I understand most of the sound processing stuff is 32-bit, so does it stay 32-bit all the way through the DSP stuff and then get truncated/dithered once to 16-bit, or does it get converted to 16-bit, upped to 32-bit (if stuff is enabled), and then converted again to 16-bit?
Another quite a bit more specific question... is dithering twice a bad thing, if the audio must be converted to lower bit depth twice? I'm working on getting higher bit depth volume working on the Eros Q, and it will go 16 --> 32 --> 24 (that's the plan, anyway...), could/should it be dithered there as well? Once I get the basic functionality working, anyway.
For reasons only Ingenic know, they limited the audio module in the X1000 processor to 24-bit samples, so that's the highest bit depth we can send to the DAC. Not bad by any means, but just like... why not 32?
I don't think 32 bit flac exists, but ignoring that, since these are 32 bit processors without floating point everything is done natively on 32 bit. At the end of processing it is converted to 16 bit in order to double the PCB buffer capacity and because most hardware expects 16 bit samples. For the most part smaller than 32 bit samples are not used because they're slower on most of our hardware.
You only dither when reducing bit depth, never increasing. In this case though its not needed since nothing can actually decode a 24 bit sample, so the dither would be lost anyway.
Most real world hardware has somewhere between 14 to 18 bits, so values larger than 24 bit do not make sense. They simply waste memory.
It looks like PCM_SW_VOLUME_FRACBITS = 15 by default but it can go up to 16 without the need for 64-bit math. I am no expert here, but it looks to me like the ALSA software volume implementation is effectively working with 16 fractional bits. Maybe this is the reason why the Eros Q is getting artifacts on native but not with hosted ALSA.
To me it seems more likely that this is a precision issue -- after all, if you play back a very quiet file at full volume, the data getting sent to the DAC would be "the same" as playing a loud file at low volume. I would be surprised if you got artifacts on the quiet file. If you did I'm not sure why 24 bit output would solve the problem, unless there's some hardware voodoo going on. You could actually use 'sox' to apply a volume correction to a file and test out this theory. (According to its man page it does dithering after volume correction whereas rockbox's software volume doesn't, so that might affect the results slightly.)Side note, the X1000 is fast enough you could use 64 bit math if you want to test even higher fracbits (it goes up to 31 or 32, I think). That'll probably drain the battery a bit faster though, so I wouldn't recommend it as a permanent fix.
Since your DAC can only do ~ 17 or 18 bits
Page created in 0.054 seconds with 17 queries.