|
| 1 | +## A Magisk module resampling for cheapies |
| 2 | + |
| 3 | +This module has been developed for casual users to overide re-sampling parameters of AudioFlinger (the system-wide mixer) in my other modules (["Audio misc. settings"](https://github.com/Magisk-Modules-Alt-Repo/audio-misc-settings) and ["Hifi Maximizer"](https://github.com/yzyhk904/hifi-maximizer-mod)) to significantly improve audio quality of DAC's under $30 (probably) and LDAC bluetooth devices especially when replaying 44.1kHz tracks up-sampled over or equal to 96kHz & 24bits by AudioFlinger, but also the quality of internal speakers and 3.5 mm jack receiving 48kHz & 24bits audio data (except 48kHz & 16bits) up-sampled by AudioFlinger. If you are an audiophile expert, please use "extras/change-resampling-quality.sh" in ["USB SampleRate Changer"](https://github.com/yzyhk904/usb-samplerate-changer) which can change the parameters on the fly flexibly. |
| 4 | + |
| 5 | +And its effect is accomplished almost without pre-echo, ringing (post-echo) and aliasing noise by very long filter length re-sampling near ideally cutting a frequency zone from just above 20kHz (ultrasonic noise) generated by high frequency dithering and deteriorating audible sound by intermodulation significantly amplified by large amplification non-linearity of DAC's under about $30 and LDAC BT devices. Furthermore this can be considered to be a kind of decimation filtering from 44.1 kHz & 16 bits samples to 40 kHz & 24 or 32 bits ones except the ultrasonic noise by hight frequency dithering. So it has little effect when using AAC and SBC codecs which transmit audio data by 44.1 kHz & 16bits. |
| 6 | + |
| 7 | +However, as the noise has a merit adding mellowness in the case of none cheap DAC's having very small non-linear amplification distortion, please use this module only when using DAC's under $30 (probably) and LDAC bluetooth devices. |
| 8 | + |
| 9 | +Finally, this module is designed to override re-sampling parameters set by my other modules, but can be used by itself only. You can install this module and enjoy its effect whether you are using one of them or not. |
| 10 | + |
| 11 | +Notes: |
| 12 | + * This module doesn't have the effect for HIRES. tracks (greater than 44.1 kHz sample rate) which not having large pre-echo and ringing, and high frequency dithering noise. |
| 13 | + * DAC's deteriorate the quality more or less by their internal over-sampling filtering when receiving low sample rate data. |
| 14 | + * Don't forget disabling "A2DP hardware offload" on Snapdragon devices (if you can), because it forces double re-sampling (44.1 kHz to 48 kHz, and 48 kHz to 96 kHz) and it is so much worse that the latter re-sampling guts the former one at all. |
| 15 | + |
| 16 | +<br/> |
| 17 | + |
| 18 | + - Appendix A. Examples of Re-sampling Parameters : |
| 19 | + |
| 20 | + |
| 21 | + | Stop band attenuation (dB) | Half filter length | Cut-off (%) | Stop band (%) | Memo | |
| 22 | + | ---: | ---: | ---: | ---: | ---- | |
| 23 | + | AOSP parameters: | - | - | - | - | |
| 24 | + | 90 | 32 | 100 | | Default Quality| |
| 25 | + | 80 | 16 | 100 | | LOW Quality | |
| 26 | + | 84 | 16 | 100 | | MED Quality | |
| 27 | + | 98 | 32 | 100 | | HIGH Quality | |
| 28 | + | Parameters of Audio misc. settings: | - | - | - | - | |
| 29 | + | 159 | 480 | 92 | | Old devices of A11 and earlier | |
| 30 | + | 165 | 360 | | 104 | Low performance devices of A12 and later with audio ones having small non-linear amp. distortion | |
| 31 | + | 179 | 408 | | 99 | General purpose on A12 and later for audio devices having small non-linear amp. distortion | |
| 32 | + | Parameters of this module: | - | - | - | - | |
| 33 | + | 179 | 520 | 94 | | for DAC's under $30 and LDAC BT devices both having large non-linear amp. distortion | |
| 34 | + | External examples: | - | - | - | - | |
| 35 | + | 100 | 29 | (91) | 109 | AK4493 (Sharp roll-off N-fold over-sampling) | |
| 36 | + | 150 | 42 | (91) | 109 | AK4191EQ (Sharp roll-off N-fold over-sampling) | |
| 37 | + | 120 | 35 | (97) | 110 | ESS 9038PRO (Fast roll-off N-fold over-sampling) | |
| 38 | + | 50 ~ 118 | 34 | 96 | (398) | ESS 9039PRO (Fast roll-off N-fold over-sampling) | |
| 39 | + | 110 | 40 | (96) | 109 | CX43131 (Fast roll-off N-fold over-sampling) | |
| 40 | + | 98 | 130 | 98.5 | | MacOS Leopard (guess) | |
| 41 | + | 159 | 240 | | 99 | iZotope, No-Alias (guess) | |
| 42 | + | 100 | 64 | | 99 | SoX HQ linear phase (guess) | |
| 43 | + | 170 | 520 | | 99 | SoX VHQ linear phase (guess) | |
| 44 | + |
| 45 | + |
| 46 | + - Appendix B. Characteristics of Re-sampling Parameters : |
| 47 | + |
| 48 | + |
| 49 | + | Category | Background opaqueness (aliasing noise) | Pre-echo and ringing | Mellowness (intermodulation) | Memo | |
| 50 | + | ---: | ---: | ---: | ---: | ---- | |
| 51 | + | DAC | light | heavy | heavy | AK4491EQ Sharp roll-off | |
| 52 | + | DAC | medium | medium | light | ESS9039PRO Fast roll-off | |
| 53 | + | Mastering tool | slight | slight | light | iZotope, No Alias (guess) | |
| 54 | + | Audio misc. settings | almost none | almost none | light | for general purpose | |
| 55 | + | Audio misc. settings | very slight | very slight | medium | for low performance devices | |
| 56 | + | Audio misc. settings | slight | almost none | almost none | for old devices | |
| 57 | + | This module | almost none | almost none | very slight | for DAC's under $30 and LDAC BT devices | |
| 58 | + |
| 59 | +<br/> |
| 60 | +<br/> |
| 61 | + |
| 62 | +## DISCLAIMER |
| 63 | + |
| 64 | +* I am not responsible for any damage that may occur to your device, so it is your own choice to attempt this module. |
| 65 | + |
| 66 | +## |
0 commit comments