Short description:
The combined port of the audio engine of Samsung Galaxy S8 and Galaxy S9
The global influence on the sound device, whether it be the sound from the browser, polyphony, microphone recording and audio player
Increases the detail, clarity, volume and selection of instruments in the track being played.
Treated vocals become more lively, deep and saturated low frequencies.
With a long listening to music does not occur discomfort in the ears.
Loss quality audio fixes.
The ability to control proprietary SoundAlive audio effects such as:
- Clarity
- Bass Treble
- Vocal Instrumental
- Concert Hall
- Tube Amp Pro
- Sorround
- 9 band EQ with presets configured
- UHQ Upscaler
- Rehampler UHQ
- Dolby Atmos
Features:
- HiRes effects are ported and used, (list above), ie when listening to music 32/384 or 24/192 and so on, the processing will take place at the same bit rate and frequency
- Dolby Atmos has full support for androids 9.0 and below
Smart installer:
- Support installation via Magisk and determining whether it is embedded in the system
- Support installation directly in the system without disconnecting the device through the terminal emulator, if recovery is not available
- Automatic creation of backup, all replaceable and editable files
- Automatic selection of installation on 32 and 64 bit systems
- Fully deleted, the installer is also an uninstaller, to delete, you must reinstall the archive in the recovery or magic, then the removal process will go
Settings soundalive:
You don’t need the presence of root for the engine, but it is needed to manage its settings.
Settings are stored in /system/etc/soundalive/SoundAlive_Settings.xml
If this file does not appear, flash SoundAlive again.
To apply the settings you will need to restart or restart the interface, which is much faster
Enter the following commands in the terminal:
su
am restart
Effects designed for individual outputs speaker, bluetooth, headphones.
BT__ - Bluetooth Headset
SPK__ - phone speaker
EAR__ - headphones
1 enabled, 0 disabled
Example:
<int name = "BT__SA_GLOBAL_EFFECT_SURROUND" value = "0" /> Effect disabled
<int name = "BT__SA_GLOBAL_EFFECT_SURROUND" value = "1" /> Effect enabled
INSTRUMENTAL_VOCAL
Instrumental Vocal Regulator
Values from -8 to 8, where 0 is disabled, to -8 more instrumental part is allocated, up to 8 vocals are allocated
BASS_TRABLE
Low and high frequency control
Values from -8 to 8, where 0 is disabled, -8 bass is allocated, up to 8 high frequencies
EQ
Presets for 9 band EQ:
0 - Normal
1 - Pop
2 - Classic
3 - Jazz
4 - Rock
5 - Customizable (manual equalizer adjustment is available on this preset only)
SA_SQUARE_INDEX
Clarity
Makes the sound more lively and clear.
Values 36, 38, 40, 42
SA_GLOBAL_EFFECT_DOLBY
SA_GLOBAL_EFFECT_DOLBY_OLD
Dolby atmos
A playback system that provides incredibly surround sound and surround sound effect.
To activate the effect, you need to enable, for example, preset music.
DOLBY value = "3"
DOLBY_OLD value = "3"
To disable everywhere put 0
0 - disabled
1 - auto
2 - movies
3 - music
4 - voice
SA_GLOBAL_EFFECT_SURROUND
Sorround
Create a rich surround sound effect.
0 - disabled
1 - enabled
SA_GLOBAL_EFFECT_TUBE_AMP
Tube amp pro
Emulate the tone of a tube amp.
0 - disabled
1 - enabled
SA_GLOBAL_EFFECT_CONCERT_HALL
Concert hall
Sound effect in the concert hall.
0 - disabled
1 - enabled
SA_GLOBAL_EFFECT_UHQ
SA_GLOBAL_EFFECT_UHQ_OLD
UHQ Upscaler
Improve sound quality when playing music and videos for the best listening experience.
To enable, put 1 on both versions
UHQ value = "1"
UHQ_OLD value = "1"
0 - disabled
1 - enabled
SA_GLOBAL_EFFECT_PBM_UHQ_OLD
UHQ Re-sampler
For BT:
0 - off
1 - 96 KHz
For EAR:
0 - disabled
1 - 192 KHz
2 - 384 KHz
SA_LIST_INDEX
3D processing, 5 presets, each has its own sound
0 - disabled
1-5 included
SA_EQ_INDEX_0, frequency 63
SA_EQ_INDEX_1, frequency 125
SA_EQ_INDEX_2, frequency 250
SA_EQ_INDEX_3, frequency 500
SA_EQ_INDEX_4, frequency 1k
SA_EQ_INDEX_5, frequency 2k
SA_EQ_INDEX_6, frequency 4k
SA_EQ_INDEX_7, frequency 8k
SA_EQ_INDEX_8, frequency 16k
9 band equalizer
Values from -10 to 10, where 0 is disabled, down to -10 lowers the amplitude of frequencies, increases to 10 to 10
Important for samsung phones:
Incompatible with official firmware and ports based on them
The list of supported firmware is possible and not all of them will work:
Lineage os
RR
Aosp
And all based on los and do not write about other ports (custom)!
Click to expand...
Click to collapse
Version 4.4:
- Updated installer for the new Magisk
- Updated audio engine
- Updated Sound Alive
- Alsa configuration port, qcom and exynos only
- Connected soundalive via alsa, only for qcom and exynos
- Setting up the audio engine based on the latest Galaxy S9 firmware using a disassembler
- Redesigned general sound panorama
- Added interface in the terminal emulator, for managing effects, in the test
Called by the command: sae
- Added automatic cleaning of the dalvik-cache and reboot
Changed the installation procedure for version 4.4:
1. After installing the engine, the dalvik cache will be automatically cleaned, then the phone should reboot, it will be necessary to wait ...
2. Set SA_Settings
3. Reboot
And enjoy the music
Uninstall:
Run the installer in recovery and the removal process will go
Android required: 5.0+
Recommended Android version: 7.0-9.0
Interface: No
System: 32/64/x86
Stable version: 4.4
Samsung Audio Engine V4.4: Download
SA Settings R8: Download
XDA:DevDB Information
[PORT][AUDIO] Samsung Audio Engine, App for all devices (see above for details)
Contributors
Roman_city
Version Information
Status: Stable
Current Stable Version: 4.3.1
Stable Release Date: 2020-01-09
Created 2019-02-25
Last Updated 2020-02-02
Reserved
Changelog:
Version: 4.2 | 10.05.2019
- Added Magisk support
- Added Speex from S9 improves speech processing
- Fixed bug with hanging outgoing and incoming calls
- Fixed bootloop on mtk android 8.1
- Fixed errors in the engine
- Fixed bugs in UHQ resampler
- Cut conflict files
- Adjustment in sound
Version: 4.1 | 25.02.2019
- Fixed bugs
- Added and corrected system file permissions
- Rewritten installation process
- High resolution effects for androids 5-6 included
- Fixed partition mounting
- Fixed installation process via terminal
- Added option resampler UHQ Upscaler
Version: 4.0 | 03.02.2019
- Updated SoundAlive52 to version 54 from Galaxy S9 9.0
- Added support for high resolution effects.
- Included high-resolution effects, ported from Galaxy S9 9.0 for Android 7.0-9.0, for Android 5.0-6.0 the standard resolution is used
- Fixed Dolby, UHQ effects
- Added choice of quality UHQ Upscaler
Resampler UHQ support:
Bluetooth:
Normal 44.1 kHz
UHQ 96 kHz
Headphones:
Normal 48 kHz
UHQ 192 kHz
SUHQ 384 kHz
- Security update for the engine
- Combined Galaxy s8 engine with Galaxy s9
- Added support for audio pro, low latency if system supports
- Updated pro audio driver
- Removed installation of Google media effects on systems without gapps - this has a good effect on sound
- Improved compatibility with android 5.0-6.0, 9.0
- Updated soundalive settings
- Fixed installer errors
Version: 3.0 | 12.01.2019
- Bugs fixed
- Improved compatibility with android 9.0
- Migrated sound
Version: 2.2 | 31.12.2018
- Updated DolbyAtmos from the latest Galaxy S9 update android 9.0 Pie
- Effects fixes
- Minor installer changes
- Balanced sound
Version: 2.1 | 24.12.2018
- Fixed bootloop on android 9.0 Pie
Version: 2.0 | 23.12.2018
- Fully updated engine from the latest version of the firmware Galaxy S8
- Ported SoundAlive from Galaxy S9
- Ported DolbyAtmos from Galaxy S9
- Added the ability to manage SoundAlive settings and effects such as:
Dolby Atmos
Concert Hall
Tube Amp Pro
Sorround
UHQ Upscaler
3D
EQ
- Fixed compatibility issues with some devices.
- The function that from long listening to music does not cause discomfort in the ears
Version: 1.0 | 28.11.2018
- Ported audio engine from Samsung Galaxy S8
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Interesting, got to try it.
Thanks Dev.
Nice! Thanks for that, now about the Mod
The App force close, is that normal? Are we supposed to edit the settings in the System Files?
Edit: Yes
Is there any apps SoundAlive? Cause I don't see it, but SoundAlive.xml is there.
For sure, my existing Dolby atmos crash.
teatea said:
Is there any apps SoundAlive? Cause I don't see it, but SoundAlive.xml is there.
For sure, my existing Dolby atmos crash.
Click to expand...
Click to collapse
Yes there is, it just does not show up on the Drawer, but you can see it on your Apps List
Guilhermex12 said:
Yes there is, it just does not show up on the Drawer, but you can see it on your Apps List
Click to expand...
Click to collapse
Well, somehow I can't open it. I try to use Sony Music - Setting - Sound Effect, doesn't show.
And most importantly, my Dolby atmos crash.
teatea said:
Well, somehow I can't open it. I try to use Sony Music - Setting - Sound Effect, doesn't show.
And most importantly, my Dolby atmos crash.
Click to expand...
Click to collapse
You actually can't use the app, at least for now, you must edit the settings via the Soundalive.xml file.
And what Dolby Atmos are you talking about? Are you on Oreo?
Guilhermex12 said:
You actually can't use the app, at least for now, you must edit the settings via the Soundalive.xml file.
And what Dolby Atmos are you talking about? Are you on Oreo?
Click to expand...
Click to collapse
I'm on Nougat. On my oreo and pie devices, atmos doesn't work. I keep my Nougat devices only for atmos.
No chance to install on official samsung j7 nougat rom ?
teatea said:
I'm on Nougat. On my oreo and pie devices, atmos doesn't work. I keep my Nougat devices only for atmos.
Click to expand...
Click to collapse
Ah, got it
The sound really got better.
But bootlup on the latest version. Previous worked.
Sharp aquos p1 device
OS: Android 6.0.1
Logcat can be provided if needed
This is an amazing mod. Using 4.2 on one plus 7 pro Android 10. The thread looks dead. I stumbled across it in Google search. Instructions need to be a bit clearer. It also won't install unless you install the sound alive APK. I chose the version closest to the date of 4.2 It really is night and day difference. Much better than the usual distorted sound of viper (for me). Using with digital plus. Sounds stronger than Atmos. Thanks.
Hello everyone, I didn’t go to this resource for a long time, as soon as free appeared, I solved many problems
Version 4.3.1:
- Fixed bootlap on android 9 and 8
- Fixed installation freezing
- Fixed installation failure due to Busybox in recovery and terminal
- Added automatic recovery in case of failure, if changes were made
- Optimized installer
- Optimized and tuned audio engine from captured Galaxy S9 dumps
- Edited SoundAlive settings
Added option to restore audio to a bt headset, a number of options have been removed and changed
https://forum.xda-developers.com/android/apps-games/audio-engine-samsung-galaxy-s8s9-t3904527
Rumin133 said:
The sound really got better.
But bootlup on the latest version. Previous worked.
Sharp aquos p1 device
OS: Android 6.0.1
Logcat can be provided if needed
Click to expand...
Click to collapse
Hello try the new version.
Roman_city said:
Hello everyone, I didn’t go to this resource for a long time, as soon as free appeared, I solved many problems
Version 4.3.1:
- Fixed bootlap on android 9 and 8
- Fixed installation freezing
- Fixed installation failure due to Busybox in recovery and terminal
- Added automatic recovery in case of failure, if changes were made
- Optimized installer
- Optimized and tuned audio engine from captured Galaxy S9 dumps
- Edited SoundAlive settings
Added option to restore audio to a bt headset, a number of options have been removed and changed
https://forum.xda-developers.com/android/apps-games/audio-engine-samsung-galaxy-s8s9-t3904527
Click to expand...
Click to collapse
Many thanks. Big fan. ?
Edit: removed 4.2 and installed 4.3.1. Much clearer sound. OnePlus 7 pro Android pie. Using together with ice sound profile 1 and Dolby digital from repeye. Sound is truly amazing. Thanks again.
tropical cactus said:
Many thanks. Big fan.
Edit: removed 4.2 and installed 4.3.1. Much clearer sound. OnePlus 7 pro Android pie. Using together with ice sound profile 1 and Dolby digital from repeye. Sound is truly amazing. Thanks again.
Click to expand...
Click to collapse
I'm glad you liked it)
Roman_city said:
I'm glad you liked it)
Click to expand...
Click to collapse
Please continue your great work. Hopefully, you could get it to work on Android 10 and more people will try it.
Thanks for this topic and very useful info...
Version 4.4:
- Updated installer for the new Magisk
- Updated audio engine
- Updated Sound Alive
- Alsa configuration port, qcom and exynos only
- Connected soundalive via alsa, only for qcom and exynos
- Setting up the audio engine based on the latest Galaxy S9 firmware using a disassembler
- Redesigned general sound panorama
- Added interface in the terminal emulator, for managing effects, in the test
Called by the command: sae
- Added automatic cleaning of the dalvik-cache and reboot
Samsung Audio Engine
Hi,
I send Feedback about it to Xiaomi and they said this:
"Dear user,
I am the Xiaomi user feedback group. The feedback about the Equalizer. Due to the adjustment of Xiaomi business, the Q version no longer provides this function, which is inconvenient for you."
So dont expect it on the future versions.
Solution for missing sound setup.
perfect_ said:
Hi,
So don't expect it on the future versions.
Click to expand...
Click to collapse
Not that the stock equalizer that came from Android Pie was any good. We just need people to try and revive the old DogsBark team (Noozxoide Laboratories) and make rootless DSP. I have nothing against Viper, don't get me wrong, on my other device I use Viper Audio, root and all that stuff... but sometimes you just need to stick to the old user/non-dev ways. I am sure it's possible, the problem is the financing and the will to do it. For me, the app developed by them and last updated in 2013 worked like a charm on many devices... except this one, since november update... That's when the problems started to appear.
Since then, I've been looking not just for an equalizer, but a self contained DSP pack that would work better and guess what, nothing's there... nothing except apps with built in function (which by definition are not system wide) and crappy adware.
As for the "Xiaomi business" this really shows me that Xiaomi really gave up on the development of this device, and ALL stock Xiaomi apps will be gone, replaced by Qualcomm's apps... and I don't ever recall seeing any DSP coming directly from Qualcomm.
----------Later addon----------
While the PRO version of Noozxoide EIZO-Rewire PRO has the problems mentioned it seems that the second software Noozxoide EIZO-Rewire Elemental which works even better is still compatible and working just fine on Android 10. Right now it's in testing and benchmarking... which is not an easy job to do, but as long as I love quality music I will do it and post results/download links for it.
-----Download Software-----
Download the Noozxoide EIZO-Rewire Elemental from HERE.
-----Testing abstract-----
For the following tests, were done using only hi-res audio (FLAC/ALAC 96khz 3mbps) files and 320kbps mp3 files so results may vary compared to what I tested here. Remember that streaming services use low bitrate/extremely compressed content.
---Test Speakers---
Internal audio speakers has a good response, bass is there audible, resolution is good, in this case I cannot post any reference to advanced graphs since they are irrelevant in this case.
The best settings (for me) are posted in the first screenshot here. While this is my recommendation, the software doesn't go overboard and keeps the audio quality in control. While testing all the test tracks which varies from Rock/Metal to Acoustic to a more aggressive dubstep there were absolutely NO cracks and pops in audio output from the speaker (which is a result of poor equalization/frequencies outside the speaker range).
---Test Line-Out/Amplified output---
Headphones (because of my current limitations of testing - a conclusive test would be source file vs. processed audio output and multiple headphone test - in ear, open back, ported, etc) were only tested with 3.5mm jack Apple EarPods which are well known to have the best consumer grade frequency response I found that the 2nd attached screenshot works best (for me). While some FLAC files with really deep bass (about 6-10Hz) totally overrun them (and not the Qualcomm audio processor) I would say that this DSP (VSP) works just fine on our devices.
I don't know if I should leave a placeholder here for the advanced, audiophile grade, passive amplified headphones.
---Test Wireless Audio---
Bluetooth and wireless media. Works just as expected. Test were done only with a Nokia BH-503 headset (couldn't test on the car, and neither did I want to spend time going to the car and test it on the BMW Pro-Logic system) but on those headset it made them literally vibrate on the ears, extremely good quality sound, deep bass, crystal clear trebbles and warm mid-tones. Again, I didn't manage to get a single crackle or pop on the speaker drivers which means the equalization done by this engine is sensible and perfectly limited/compressed. The settings I used are posted in the third screenshot.
-----Conclusion-----
The solution posted here works fine, while extensive testing the app still shows that is consumed 0% battery, so the battery drain is minimal.
The application works perfectly after reboot and closing from the recents screen, there were no modifications done/or excluded from the battery optimization screen.
This application is not a booster, this application is a DIGITAL SOUND PROCESSOR controlling the Qualcomm core (was built for this back in the day) and upscaling the audio resolution.
-----Q/A-----
Q: Does this app require any tampering with the system?
A: No, this app is installed as a normal app from the link provided (Play store link)
Q: Does this app work as a system wide equalizer and integrates in other apps?
A: Yes, yes it does, and from my testing it works with all media players (the equalizer option opens up the app), Youtube, Games, etc.
Q: Does this app consume system resources while processing?
A: Yes and no. Of course you need system resources for processing but they aren't that intensive at least for MP3 processing but for FLAC/ALAC processing things get a little more frisky as shown in the 4th screenshot attached.
Q: How's the battery drain overall with FLAC and MP3 playback?
A: Depending on the method of listening the drainage is different, but even on Bluetooth the consumption didn't affect my battery overall.
Q: Does this enable AptX?
A: No. This has nothing to do with that. But while AptX and SBC are not that different in base audio quality, this pushes the codec to 328kbps and upscales the audio to a resolution of 48khz which is ideed great for maxed out mp3 quality over Bluetooth, which again is based on the source files.
----------Thanks----------
If this problem helped you fixed a problem, press the thank you button.
Hello, I'm going to present to you a method to enable hi-res on the DAC of the Xiaomi Redmi Note 9' family.
The procedure will allow to you to use the full potential of the WCD9385 DAC present (at least) in the Snapdragon 720G.
Indeed, this chip can go up to 32 bits @ 192Khz for PCM stream and can decode natively DSD. Moreover, this chip have a THD+N (Total Harmonics Distortion + Noise) at a level of -108dB, but all audio tests of Xiaomi's phones mesures a THD+N about ~ -96dB, which is the noise floor of 16bits, logic cause by default, this chip is configured to only output in 16 bits mode.
I have setup, tested and experimenting myself on my own phone (Redmi Note 9 Pro - Global Version - MIUI 12.0.2.0 QJZMIXM) this method.
Due to some ROM similarity with other smartphone models in Xiaomi, it will probably works with other smartphones than the Note 9's family, but i will probably need some adjustments if your phone use a different DAC or scheme of audio configuration files.
Before anything :
I'm not responsible of any damage, malfunction or brick that you can do by applying the method. In general, if you don't know what are you doing, just don't do it !
Click to expand...
Click to collapse
Pre-requests :
1) Install ADB, Fastboot and Google ADB Drivers (if you are on Windows)
2) You need to unlock bootloader with Mi-Flash-Unlock (THIS WILL WIPE ALL YOUR PERSONAL DATA, MAKE A SAVE BEFORE STARTING ANYTHING !)
3) Install TWRP for Redmi Xiaomi Note 9
4) You need to root your smartphone with Magisk and install the boot image in fastboot mode that it will give to you.
5) Install ABD_ROOT and ENABLE_ENG Magisk's modules (it will give you the possibility to get root access in ADB) and turn them on for the next device reboot in Magisk App
6) Install MakeSysRW in TWRP (without it we can't remount /vendor partition in Read-Write, and can't touch system's files)
7) Strongly recommanded but not necessary : install Sample Rate Checker from Google Play (with this tool, you can check if the DAC has correctly been set in "HI-RES" mode)
Click to expand...
Click to collapse
Get your phone tuned for Hi-RES :
1) One all of those pre-requests are effectives, you need to get a terminal with adb working (smartphone connected to your PC and debug mode activated) and type :
adb shell mount -o remount,rw /vendor
If you get no errors, you just mounted the partition /vendor on your phone in Read-Write mode, this will allow you to get to the next step, otherwise, i strongly recommand to you to check if you have correctly done all the pre-requests i have described.
2) The next step will save the current audio configuration of your phone (in case you want to return to it for some reasons), still in a terminal window, type :
Code:
adb pull /vendor/etc/audio/audio_policy_configuration.xml ./saved_audio_policy_configuration.xml
adb pull /vendor/etc/audio_io_policy.conf ./saved_audio_io_policy.conf
This will download from your smartphone to your computer the current audio configuration files and save them under "saved_audio_policy_configuration.xml" and "saved_audio_io_policy.conf" in your current directory.
3) Now we will upload configurations files that i've tuned myself, in first case for my personal use.
What changes I've made from the OEM configuration ?
PRIMARY_OUTPUT was in 16 bits @ 48kHz => changed to 24bits @ 192 Khz
RAW_OUTPUT was in 16 bits @ 48 Khz => changed to 24 bits @ 192 Khz
DEEP_BUFFER was in 24bits @ 48 Khz => changed to 24bits @ 192 Khz
Wired Headset, Wired Headphones and Line comes from 16 bits @ 48 Khz, have all been tuned to 24 bits @ 192 Khz
Moreover, i have not touched the integrated speakers because they will not profit to go into 24 bits mode or with an higher sampling rate, and you will get more energy saving by let them as they currently are.
Click to expand...
Click to collapse
If you check the configuration, you will see at points that I tuned this : samplingRates="48000, 96000,192000"
EDIT 22-04-2021 - Few hours after the first release :
I have done this to let Android choose by it's own the sampling rate, because i have seen some sort of clipping on LINE output with OGG (vorbis) files (I assume it will be the same with destructive formats, such as MP3, but it's at least with OGG files) at max volume with very loud musics, i thinks if you set strict resampling at 96 or 192Khz, due to fast algorithms in Android Audio, it will generate some sort of distortion and, if your music is loud enough (and you are at the max volume), it will go over 0dB and clip. So I've maintained sampling rate at 48Khz, and it seems to be well, but if you have some clipping, please tell me in your reply, i will investigate further.
The clipping was effectively done by a resampling mismatches with two configurations files :
audio_policy_configuration.xml (the one that I modified originally)
audio_io_policy.conf
Sampling rates mismatches in audio_io_policy.conf because I left them to the OEM configuration, now it's fixed.
Click to expand...
Click to collapse
You can get my configuration file in the files attached to this post, unzip the files in the current directory where ADB running, then send them to your device :
Code:
adb push ./audio_policy_configuration.xml /vendor/etc/audio/audio_policy_configuration.xml
adb push ./audio_io_policy.conf /vendor/etc/audio_io_policy.conf
This command will overwrite your current configuration files, once again, please be sure to have saved OEM configuration file on your PC !
4) Reboot your phone, and enjoy ! Now you can check with Sample Rate Checker the configuration, you will see something like this (it can be slithly different depending on what is plugged to your phone when you're start the app, in my case i have plugged my phone to an amplifier, so LINE_ANALOG has appears):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you can see, AudioManager is in 192Khz mode, BUILTIN_EARPIECE correspond to the front top speaker usesed for private communications, and BUILTINT_SPEAKER is the bottom speaker, both of them have remain untouched.
The most interesting is LINE_ANALOG, corresponding to the phone plugged to a LINE output (a high impedance receiver, such as an amplifier), you can see the different Sample Rates supported, up to 192Khz, and Encodings is ENCODING_PCM_FLOAT corresponding to 24 bits (you can compare it with BUILTIN_EARPIECE and BUILTIN_SPEAKER that they are in 16bits mode).
EDIT : i can't attach the file to my post, anyway i sent it to mediafire and there is the download link
Download the Audio Configuration files tuned for HI-RES
If you have any comments, any remarks or want help, do not hesitate to ask.
22/04/2021 - Few hours after the first post :
I have discovered that the mysterious clipping isn't present when i plug/unplug the phone for few seconds, before appearing.
After some research, try and retries, I've found the problem : the file audio_io_policy.conf
In this file is listed all outputs present in the audio_policy_configuration.xml, but i found that all outputs have a fixed 48 kHz sample rate, which don't match with the concatenated ones in the tuned file.
Concretely, internally the sample rates don't matches, and streams (over)sampled above 48 KHz are some sort of clipped.
So I have concatenated samples also in audio_io_policy.conf, and now it works well with all types of musics.
The first post will be edited with modifications that you need to do with the file audio_io_policy.conf
06/13/2021 :
Xiaomi released an update (MIUI V12.0.1.0 - R****M) which introduce Android 11.
My mod is still perfectly working with this update and Android 11 without any modifications !
So, you can still follow this tutorial to enhance your device audio quality
_xenoxis_ said:
... (deleted)
EDIT : i can't attach the file to my post, anyway i sent it to mediafire and there is the download link
Download the Audio Configuration files tuned for HI-RES
If you have any comments, any remarks or want help, do not hesitate to ask.
Click to expand...
Click to collapse
Your audio_policy_configuration.xml has '<globalConfiguration speaker_drc_enabled="true"/>', and this means DRC (Dynamic Range Control) has been enabled on your all audio outputs. This is the reason the THD+N of your device is larger than that of usual hifi devices. Try replace the true with false in your configuration.xml file.
If you like, see maximizing the audio quality of bluetooth.
zyhk said:
Your audio_policy_configuration.xml has '<globalConfiguration speaker_drc_enabled="true"/>', and this means DRC (Dynamic Range Control) has been enabled on your all audio outputs. This is the reason the THD+N of your device is larger than that of usual hifi devices. Try replace the true with false in your configuration.xml file.
If you like, see maximizing the audio quality of bluetooth.
Click to expand...
Click to collapse
Thanks for your reply, i tried on my device but i don't know if I can hear a difference between before and now or if is it a placebo effect.
Android's audio configuration are poorly documented, what does exactly DRC ?
Thanks again for this tips, it will be added in the mod
The sample rate of AudioManager always 192kHZ, not fit the song dynamically.
Even we ignored energy saving(96kHZ, 48kHZ, etc), but how to handle 44.1kHZ case?
SRC still exist in this case right?
RlTd said:
The sample rate of AudioManager always 192kHZ, not fit the song dynamically.
Even we ignored energy saving(96kHZ, 48kHZ, etc), but how to handle 44.1kHZ case?
SRC still exist in this case right?
Click to expand...
Click to collapse
Yes it doesn't fit the song dynamically (at least them which are lossy formatted songs), but this is the android default behaviour, and instead of putting anything in 48kHz (which can be bad for all musics sampled over 48kHz), with my mod it resampling everything at 192Khz, which can avoid frequencies repliement (cf Shannon-Nyquist's theorem) and can be benefit for the DAC's internal logic and post-treatments.
Anyway, some music players on Android define the "passthrough" flag on lossless formats which tell to Android to not upsample.
In 24bits float, upsampling is very precise, and there's be no distortions audible (if there distorsion, it will happen only close to the noise floor, which is inaudible anyway), so you can consider your 44.1Khz to be EXACTLY the same if they are upsampling to 192Khz.
If it was 16bits, I will not tell you the same, in 16bits, the noise floor is at 96Khz, and there's much more conversions errors in Integer than floats, and much more in 16bits than 24 bits, so in this case, it can be destructive.
_xenoxis_ said:
Yes it doesn't fit the song dynamically (at least them which are lossy formatted songs), but this is the android default behaviour, and instead of putting anything in 48kHz (which can be bad for all musics sampled over 48kHz), with my mod it resampling everything at 192Khz, which can avoid frequencies repliement (cf Shannon-Nyquist's theorem) and can be benefit for the DAC's internal logic and post-treatments.
Anyway, some music players on Android define the "passthrough" flag on lossless formats which tell to Android to not upsample.
In 24bits float, upsampling is very precise, and there's be no distortions audible (if there distorsion, it will happen only close to the noise floor, which is inaudible anyway), so you can consider your 44.1Khz to be EXACTLY the same if they are upsampling to 192Khz.
If it was 16bits, I will not tell you the same, in 16bits, the noise floor is at 96Khz, and there's much more conversions errors in Integer than floats, and much more in 16bits than 24 bits, so in this case, it can be destructive.
Click to expand...
Click to collapse
Thanks!
Actually I am using Apple Music beta version which supporting lossless(even hi-res) resource. What can I do to "passthrough" upsample of Android? I saw a module called AINUR NARSIL in Magisk, is that work?
Two most common lossless formats in Apple Music are 16bit_44.1kHZ and 24bit_96kHZ. As you said, 16bit may cause serious problems? BTW, what's the difference between AUDIO_FORMAT_PCM_24_BIT_PACKED and AUDIO_FORMAT_PCM_24_BIT?
If 192kHZ works fine, how about 384?
RlTd said:
Thanks!
Actually I am using Apple Music beta version which supporting hi-res resource. What can I do to "passthrough" upsample of Android? I saw a module called AINUR NARSIL in Magisk, is that work?
Click to expand...
Click to collapse
You can't force to use the passthrough flag, it only depend on the music player implementation, how it use the Android's Audio layer. Apple Music can decode hi-res resources, but it not guaranteed that it use the passthrough flag behind. Anyway with my mod, even it doesn't use the passthrought flag, it will be upscaled to 192Khz which is sufficient for every hi-res listening.
Remember that the passthrough flag only tell to the Android Audio layer to not resampling the audio, which can be bad with music with a low sampling rate (as 44.1Khz or even 48Khz), cause there's no margin for audio processing in the DAC or high frequencies already in the audio source file.
I don't know about if the AINUR NARSIL mod can force the passthrough, the better is to test it yourself i would say
RlTd said:
Two most common lossless formats in Apple Music are 16bit_44.1kHZ and 24bit_96kHZ. As you said, 16bit may cause serious problems? BTW, what's the difference between AUDIO_FORMAT_PCM_24_BIT_PACKED and AUDIO_FORMAT_PCM_24_BIT?
Click to expand...
Click to collapse
Yes 16 bits may cause interpolations errors only if the destination rate isn't a multiple of the original rate and only if Android make the upsampling by maintaining the output level if the destination sampling rate is a multiple of the original one. This is a bit technical, and I don't know what Android decide and do, but in the worst case, yes, 16 bits integer sound makes more interpolation errors cause 16 bits is less precise than 24 bits float and makes more rounding errors.
For your last question, AUDIO_FORMAT_PCM_24BIT doesn't exist.
According to https://android.googlesource.com/platform/hardware/interfaces/+/master/audio/common/4.0/types.hal :
Code:
/* Subformats */
PCM_SUB_16_BIT = 0x1, // PCM signed 16 bits
PCM_SUB_8_BIT = 0x2, // PCM unsigned 8 bits
PCM_SUB_32_BIT = 0x3, // PCM signed .31 fixed point
PCM_SUB_8_24_BIT = 0x4, // PCM signed 8.23 fixed point
PCM_SUB_FLOAT = 0x5, // PCM single-precision float pt
PCM_SUB_24_BIT_PACKED = 0x6, // PCM signed .23 fix pt (3 bytes)
So there's just two different version of representing 24bits data.
You should take a look here, you'll probably learn some tips on how Android handle audio data
_xenoxis_ said:
You can't force to use the passthrough flag, it only depend on the music player implementation, how it use the Android's Audio layer. Apple Music can decode hi-res resources, but it not guaranteed that it use the passthrough flag behind. Anyway with my mod, even it doesn't use the passthrought flag, it will be upscaled to 192Khz which is sufficient for every hi-res listening.
Remember that the passthrough flag only tell to the Android Audio layer to not resampling the audio, which can be bad with music with a low sampling rate (as 44.1Khz or even 48Khz), cause there's no margin for audio processing in the DAC or high frequencies already in the audio source file.
I don't know about if the AINUR NARSIL mod can force the passthrough, the better is to test it yourself i would say
Yes 16 bits may cause interpolations errors only if the destination rate isn't a multiple of the original rate and only if Android make the upsampling by maintaining the output level if the destination sampling rate is a multiple of the original one. This is a bit technical, and I don't know what Android decide and do, but in the worst case, yes, 16 bits integer sound makes more interpolation errors cause 16 bits is less precise than 24 bits float and makes more rounding errors.
For your last question, AUDIO_FORMAT_PCM_24BIT doesn't exist.
According to https://android.googlesource.com/platform/hardware/interfaces/+/master/audio/common/4.0/types.hal :
Code:
/* Subformats */
PCM_SUB_16_BIT = 0x1, // PCM signed 16 bits
PCM_SUB_8_BIT = 0x2, // PCM unsigned 8 bits
PCM_SUB_32_BIT = 0x3, // PCM signed .31 fixed point
PCM_SUB_8_24_BIT = 0x4, // PCM signed 8.23 fixed point
PCM_SUB_FLOAT = 0x5, // PCM single-precision float pt
PCM_SUB_24_BIT_PACKED = 0x6, // PCM signed .23 fix pt (3 bytes)
So there's just two different version of representing 24bits data.
Click to expand...
Click to collapse
Much to learn.
One more question: your Sample Rate Checker showed that "LINE_ANALOG Encodings" is AUDIO_FORMAT_PCM_FLOAT. I got same result with my earphone. Our related setting should be AUDIO_FORMAT_PCM_24_BIT_PACKED. Thus i am confusing about that. Do you know why?
Here is my log and its screenshots. Some FLOAT words also appeared in it. Looks like Qualcomm handle audio by FLOAT format. I don't know if they have similar reason.
RlTd said:
One more question: your Sample Rate Checker showed that "LINE_ANALOG Encodings" is AUDIO_FORMAT_PCM_FLOAT. I got same result with my earphone. Our related setting should be AUDIO_FORMAT_PCM_24_BIT_PACKED. Thus i am confusing about that. Do you know why?
Here is my log and its screenshots. Some FLOAT words also appeared in it. Looks like Qualcomm handle audio by FLOAT format. I don't know if they have similar reason.
Click to expand...
Click to collapse
AUDIO_FORMAT_PCM_24_BIT_PACKED is the sub-format which is the float format in Android (as showed in my last reply), it contain only factional part and no integer part.
AUDIO_FORMAT_PCM_FLOAT is just a short alias which refer to it.
So, AUDIO_FORMAT_PCM_24_BIT_PACKED is strictly equal to AUDIO_FORMAT_PCM_FLOAT.
Apparently on your device, is it already setup to handle hifi audio in the record processing as well as the output, everything is in 24bits (float) @ 384KHz, which is very nice !
Which device is it ?
_xenoxis_ said:
AUDIO_FORMAT_PCM_24_BIT_PACKED is the sub-format which is the float format in Android (as showed in my last reply), it contain only factional part and no integer part.
AUDIO_FORMAT_PCM_FLOAT is just a short alias which refer to it.
So, AUDIO_FORMAT_PCM_24_BIT_PACKED is strictly equal to AUDIO_FORMAT_PCM_FLOAT.
Apparently on your device, is it already setup to handle hifi audio in the record processing as well as the output, everything is in 24bits (float) @ 384KHz, which is very nice !
Which device is it ?
Click to expand...
Click to collapse
Xiaomi mix2s with snapdragon 845.
Its integrated audio codec DSP is WCD9341, which has better dynamic range than WCD9385(snapdragon 888).
WCD9341 | Qualcomm
www.qualcomm.com
I carry it everyday as a "hi-fi" player.
RlTd said:
Xiaomi mix2s with snapdragon 845.
Its integrated audio codec DSP is WCD9341, which has better dynamic range than WCD9385(snapdragon 888).
WCD9341 | Qualcomm
www.qualcomm.com
I carry it everyday as a "hi-fi" player.
Click to expand...
Click to collapse
I can see the THD+N (Total Harmonics Distortions + Noise) is at -109dB for the WCD9341 and at -108 for the WWCD9385, which is exactly the same (you can't hear the difference, i dare anyone to tell me otherwise).
Don't refer to the "Playback Dynamic Range", which don't represent what is it outputted (you have to add the noise and the harmonics distortions).
You're very right to use it as a everyday hifi player ! I'm very surprise that Xiaomi has think to set the DAC in a hi-res mode by default. I'm wondering why they haven't do the same for their new devices .
_xenoxis_ said:
You're very right to use it as a everyday hifi player ! I'm very surprise that Xiaomi has think to set the DAC in a hi-res mode by default. I'm wondering why they haven't do the same for their new devices .
Click to expand...
Click to collapse
Actually I also changed configs as your mod and turn more items else to 24bit/384kHZ to ensure hi-res works. However, i don't know which features are essential for me.
RlTd said:
Actually I also changed configs as your mod and turn more items else to 24bit/384kHZ to ensure hi-res works. However, i don't know which features are essential for me.
View attachment 5361457
View attachment 5361459
View attachment 5361461
View attachment 5361463
Click to expand...
Click to collapse
"hifi_playback" is just an unused output which isn't routed to anything, so don't mind about it.
About your sampling rate change to 384kHz, this will not gonna set it to 384Khz cause you don't change the file "audio_io_policy.conf" where is the i/o configuration (currently, your configuration can cause some volume saturation as it done the first time I tried my mod on my device).
You need to set 384KHz as well in this file.
Moreover, is it useless to set the USB output over to 192Khz, I don't know a device in USB which can handle 384KHz audio on a USB connection.
However, I don't think there's a reel benefit to set the DAC to 384KHz, I mean the maximum sampling rate in PCM hi-res file is 192Khz (still rare actually) and I never seen anything beyond this value. Typically a hi-res file is in [email protected]
So what i'm trying to say, is that a change from [email protected] to [email protected] is beneficial, for many reasons (16-->24 bits, integer mode to float, increasing sampling rate), but passing from 192KHz to 384KHz is, in my opinion, completely useless.
Moreover, a value that high can increase the risk of causing some jitter (which normally can't happen even at 384Khz, but theoretically the risk increase).
And finally, you'll consume more power for nothing.
_xenoxis_ said:
"hifi_playback" is just an unused output which isn't routed to anything, so don't mind about it.
About your sampling rate change to 384kHz, this will not gonna set it to 384Khz cause you don't change the file "audio_io_policy.conf" where is the i/o configuration (currently, your configuration can cause some volume saturation as it done the first time I tried my mod on my device).
You need to set 384KHz as well in this file.
Moreover, is it useless to set the USB output over to 192Khz, I don't know a device in USB which can handle 384KHz audio on a USB connection.
However, I don't think there's a reel benefit to set the DAC to 384KHz, I mean the maximum sampling rate in PCM hi-res file is 192Khz (still rare actually) and I never seen anything beyond this value. Typically a hi-res file is in [email protected]
So what i'm trying to say, is that a change from [email protected] to [email protected] is beneficial, for many reasons (16-->24 bits, integer mode to float, increasing sampling rate), but passing from 192KHz to 384KHz is, in my opinion, completely useless.
Moreover, a value that high can increase the risk of causing some jitter (which normally can't happen even at 384Khz, but theoretically the risk increase).
And finally, you'll consume more power for nothing.
Click to expand...
Click to collapse
My system is MIUI11. A file called "audio_output_policy.conf" in same place which has the same content as a part of your audio_io_policy.conf. I've edited it and other file called "audio_policy.xml" in case.
Jitter looks getting higher in log but I don't know if I can hear it apparently.
Even I removed all energy-cost-optimizing-strategy on my music app to enhance stability of performance with 384kHZ. The battery cost is still acceptable.
Indeed, it makes me feel little bit weird when adopting 384kHz. All I do this is considering SRC from 44.1kHZ. Higher sampling may cause more reasonable curve in analog signal. However, it depends on algorithm and may cause other problems like harmonic wave and jitter. So it's an experiment and a trade-off. I will go back to 192kHZ if got nothing on 44.1kHZ files after comparing.
_xenoxis_ said:
"hifi_playback" is just an unused output which isn't routed to anything, so don't mind about it.
About your sampling rate change to 384kHz, this will not gonna set it to 384Khz cause you don't change the file "audio_io_policy.conf" where is the i/o configuration (currently, your configuration can cause some volume saturation as it done the first time I tried my mod on my device).
You need to set 384KHz as well in this file.
Moreover, is it useless to set the USB output over to 192Khz, I don't know a device in USB which can handle 384KHz audio on a USB connection.
Click to expand...
Click to collapse
I'm making a USB Sample Rate Changer script like bluetooth LDAC and usb-samplerate-unlocker (up to 386kHz and even 768kHz). If you like, see my github USB Sample Rate Changer and usb-samplerate-unlocker.
Update 08/07/2021 :
Hello guys, i have made a magisk module with this mod, it's currently on submission stage and it will be, normally, fully available in the magisk module repository (the "market").
With this magisk module, the mod will be systemless and will no require tricks to hard-modifying files on the device !
I'll keep you informed about this !
Great work.
I need to do the same in my K20 pro (Raphaelin), for the apple music lossless to use the inbuilt hifi dac