[MOD] [GUIDE] [ROOT] Enable HI-RES (24bits and over 48kHz sampling) on Xiaomi Redmi Note 9's family - Android Software/Hacking General [Developers Only]

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

Related

Raphael Video Encoding Thread

NOTE: USE OF THIS THREAD AND INFO ASSUMES YOU HAVE LEGAL AUTHORITY TO USE / ENCODE ALL SOURCE MATERIALS. I AM A US CITIZEN AND A SOLDIER, AND HENCE FALL UNDER JURISDICTION OF MANY ORGANIZATIONS, TO INCLUDE THE FEDERAL CENSORSHIP CLUB (FCC) AND THE DOUCHEBAGS MOLESTING CONSUMERS ACT. NO QUESTIONS WILL BE FIELDED REGARDING RIPPING, DOWNLOADING, OR PIRATING OF SOURCE MEDIA, REGARDLESS OF THE INQUIRER'S NATIONALITY. - Fathead, P.I.
This thread will be about video encoding, with the end product being the Raphael. My current Device, Radio and ROM are in my sig and updated for reference.
The premise of this guide: Using freely available (NON-WAREZ) CODEC and software, the user will be able to create video with audio playable on a HTC Touch Pro. The video will be of a watchable quality and small in file size.
Some of you may be familiar with my work on SEGA Dreamcast with GypPlay, DC-Divx, DC-VCD standard, and XDP (X-Rips, Inc. Dreampassport, English translation of DP 2 and above)
- Fathead, P.I.
----- START OF THEOREY -----
If you're like me, the first thing you asked yourself after buying your Fuse was "HOLY ****! I can run 4x the storage on this thing that my old Wizard could!" Yes, 16 GB of Micro-SD goodness is freakin' sweet. But how to use it? You can only listen to so much music per week, even with Napster To Go. You can only play so many games. (I'm further reduced due to lack of a usable joy pad for Pocket Nester.) Why not throw some movies on this joker?
----- VIDEO FORMAT -----
The first thing most people want to know is "What resolution and format should I use?" I am a longtime fan of Divx. I have used it to successfully create video content for low end devices, specifically the SEGA Dreamcast. Creating or downsampling content for a mobile phone gives us a considerable edge over bigger-screen counterparts. Before we jump into the configuration of settings and knob-dicking with software, let's figure out just what kind of video we want to produce.
FRAME RATE
Most content you find will come in one of 3 frame rates:
30 FPS (VHS / NTSC Broadcast / DVD / Blu-Ray(?) )
25 FPS (PAL)
23.976 FPS (Actual frame rate used to record cinema and produce much media)
The first thing you need to realize is that many things initially encoded in 30 FPS can be converted back to 23.976 FPS with no loss of fluidity or data. If your source is a webcam, skip the scaling to 23.976 and drop down to frame decimation. If your source is film, you're in luck. The other frames are just dummy frames that waste a little data. Deleting those frames frees up more video data to better express the picture information in the other 23.976 frames. This trick allows you to:
A. Use a lower bitrate (and hence smaller file) for the same picture OR
B. Get a better picture at the current bitrate
To figure out the frame rate, load up your file in V-Dub and go to File - File Information. The Data Rate box in the Video Stream area will tell you current bit rate, while frame size will give you resolution and frame rate. If you have a 23.976 FPS source, continue. If you have a 30 FPS source that you think should be 23.976 FPS (Film, etc) :
1. Load up the file in V-Dub.
2. Go to the Video drop down menu. Select Frame Rate (CTL+R is shortcut)
3. Change the Frame Rate on the source to 23.976 FPS.
If you continue to have audio sync issues with this method, leave the file at 30 FPS and continue.
Now we are going to look at frame decimation. Frame decimation drops every X frame while keeping the audio sync'd. The end result is a file X the frame rate of the source. While this is noticeable on large screens, on the Touch Pro / Diamond Screens (and probably even the HD), it shouldn't be an issue at all. You can play with this option. It is more noticeable on film, but I cannot see a difference at all on animated sources.
I use the decimate by 2 option in VDub. Video -> Frame Rate (CTL+R shortcut) and select Decimate video frame rate by 2. Our output video is now half the frame rate of our source. The end result is we can:
A. Get a better picture with the current video bit rate OR
B. Lower the video bit rate to get the same picture in a smaller size.
I use option B. Another big advantage here is that the device is trying to decode half the frames. A general rule about audio and video playback: The lower the bit rate you ask the device to handle, the less work it has to do to decode and display the video, and less battery power will be used.
RESOLUTION
Most content you will find is around 640 x 480. DVD sources usually come around 720x480. Blu-Ray would be above that, but possibly scaled down. We are going to watch this movie on a 3 inch screen. Guess what that means? If we never found a video about 320x240, or comparable widescreen resolution, It wouldn't matter. At all. Stepping up to 640x480 is just going to quadruple the amount of pixels we are trying to express on a limited budget.
A handy tool I use in V-Dub is the 2:1 reduction filter (high quality). To kick kit on, go to Video -> Filters (CTL+F). Click add, and it should be the first filter you can choose. This cuts your resolution by half. As a rule of thumb, If I've got a source that's around 640x480 (or 16:9 equiv) or higher, I hit it with the 2:1. You'll find oddball sources like 480 x 360, you can give it a shot, but it might not be worth it. Again, lower resolution means less pixels to express both in bit rate and in reproduction (playback).
Pausing here again, tired as hell.
THE SOFTWARE I USE
Video Editing / Audio and Video Compression and Mux - Virtual Dub. Totally free. I usually refer to this as VDub.
Home
Download
Audio Compression CODEC - LAME MP3 - Free and versatile.
Home
Compiled Binaries
Use the ACM Binary here for Windows and Virtual Dub
Video Compression CODEC / PC and SP/PPC Player - Divx - Decoder, player, mobile player, and MOST of the Encoder are FREE. DO NOT POST ABOUT CRACKING THIS.
Home / CODEC and PC Player
MOBILE (PPC and SP) Player
One more for good measure...
Okay, replies and requests, go!
Am I correct in thinking that videos should be encoded in 640 x 480 ?
*RESERVED*
cucusoft
i use Cucusoft Ultimate DVD + Video Converter Suite
mpeg-4
video bitrate 600kbit/s
framerate, depends from 23.976 to 25 (not important)
videosize 480x368
format 4:3
audio aac
128kb/s
samplerate 48000k
2 chanels stereo
it works fine, no framedrops
played with coreplayer 1.25 build 4506
I just use the standard 700mb divx movie in .avi
I use the free divx player V0.91
Smaller would be sweeter.
Taking a break for a bit, added some new material. Internets in the hotel are barely functional.
I'll be focusing on getting files down to smaller levels. The theorey should give you enough information to start dramatically cutting your file sizes. I've been moving my Boondocks DVD over to Divx 6.8 movies. Averaging 40 megs per episode.
I have been using spb mobile dvd for a few years now. It is very easy to use can convert straight from a dvd or a video file and supports vga res.
Will have to check that one out, have been thinking about backing up my DVD's to mobile, will be traveling about 26 - 30 weeks out of the year and need some boredom killers.
Gonna score some sleep and SEGA time, later all.
Added some new info, taking a pre breakfast nap.
i use slysoft clonedvdmobile. output at vga res and filesize around 700mb seems to run fine for me...although its not free, its well worth the money
Brendo said:
i use slysoft clonedvdmobile. output at vga res and filesize around 700mb seems to run fine for me...although its not free, its well worth the money
Click to expand...
Click to collapse
This is a great bit of software. It also utilises all 4 cores on my Q6600. Another fantastic program is DvDFab which can transcode DVD to Divx/Xvid/MP4 etc on the fly, or dump the Video TS to your HD.
Going to have to check all this out. Have many a DVD that needs ripped. Wonder if any of those have a frame decimation feature. I like my 30 - 40 meg per episode cartoons.
Based on some comments in other threads, I've tried a couple of freeware programs to try to encode in the format that works so well with WMP (MP4, H.264, 640x368, 1000 Kbps, AAC @ 96Kbps): DVD Decrypter + SUPER for one and AutoMKV for the other. However, I haven't been fully successful with either, so I'm hoping that someone who uses these tools can clue me in on the appropriate settings and procedures for encoding.
The combination of DVD Decrypter and SUPER creates very nice movies for playback on the Fuze. Unfortunately, DVD Decrypter keeps the VOB structure from the DVD and SUPER follows suit, which means that a movie will be broken into several pieces at arbitrary points: unsatisfactory, to say the least. The SUPER support forum mentions a way to join inputs into a single output, but following what I understood those instructions to say did not, in fact, result in a combined file.
AutoMKV is very convenient, as it is a single program (or at least UI) to both rip and encode. Unfortunately, I haven't found the settings that generate output that is comparable to the SUPER output -- WMP won't play any of the files I've managed to create so far.
Anybody use these successfully and can share how they do it? TIA.
amerisoft, works very well for me so far, except an occasional blank screen
Just wanted to add...
I don't bother encoding video anymore. Sure, a full-blown 50 minute xvid show might be 400meg. However, the touch pro does not have any issue playing such files back.
Makes life much easier!
I'd agree. I've loaded up a couple of 700MB XVIDs and had no problem playing them.
For some reason, my Sprint Touch Pro has issues playing back even reasonable quality video. For instance, 640x480 video at 1200k (MP4) is a little choppy in WMP, and almost -everything- is extremely choppy in TCPMP, no matter how it's encoded, including 350MB 45-minute XVid TV shows.
AndyCR said:
For some reason, my Sprint Touch Pro has issues playing back even reasonable quality video. For instance, 640x480 video at 1200k (MP4) is a little choppy in WMP, and almost -everything- is extremely choppy in TCPMP, no matter how it's encoded, including 350MB 45-minute XVid TV shows.
Click to expand...
Click to collapse
As I understand it, it's a driver issue. (This is what I've gathered across numerous postings here; someone please correct me if I've gotten something wrong.) The Qualcomm chipset in the TP/Fuze has an efficient driver called Qtv, but Qualcomm charges for a license. WMP appears to incorporate the driver, so it's able to handle moderately challenging videos. 1200 Kbps might be a little more than it's capable of displaying smoothly, but people have reported that 1000 Kbps plays well. On my one trial with DVD Decrypter + SUPER, that was the case for me, too -- full resolution and smooth motion for a video ripped from a DVD with the specs I reported in my earlier message in this thread.
TCPMP, on the other hand, does not include the Qtv driver, so in order to get smooth playback you have to reduce the size, resolution, or frame rate.
Coreplayer has a reverse-engineered partial driver for Qtv. As a result, it falls between TCPMP and WP in capabilities. It is claimed that version 3.0 of Coreplayer will have full Qtv support.

[AUDIO] [MOD] ViPER4Android Audio Effects -FX 2.2.1.1/ HIFI Merged (20/Aug/2013)

Here is the audio effects that i ever feel the greatest.
It is
ViPER4Android [V4A]​
Here is official page http://forum.xda-developers.com/showthread.php?t=2191223
{
"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"
}
Version: FX version 2.2.1. 1/ XHiFi Merged
Operating environment: Android 2.3 / 4.0 / 4.1 / 4.2 / 4.3
★ Android 4.3 Support ★
ViPER4Android supports Android 2.3 Ginger bread, 4.0 Ice Cream Sandwich and 4.1 upto 4.3 Jelly bean firmwares.
★ NEW Channel Pan ★
Controls left/right channel output. Its not very useful unless your headphone is imbalance or faulty one side. It will be a cure for you.
★ NEW Differential Surround / Haas Effect ★
This is an old feature which ViPER520 had removed from FX in early days.
But after many users requesting it, ViPER520 bring it back to FX
More info on Haas Effect: http://www.mixcoach.com/creating-dep...haas-effect-2/
★ NEW ViPER Fidelity Control ★
★ ViPER Bass ★
With 2 bass mode, you can have greater bass experience than before! This requires a little bit better headphone.
★ ViPER Clarity ★
With the latest Clarity mode selection, you can balance up heavy bass with high clarity audio that you can never imagine before!
★ NEW Headphone Surround Engine+ ★
★ NEW Cure Tech+ ★:
With normal audio system, listening for more than three hours will feel fatigue, dizzy, tinnitus, irritated and other symptoms. This is a normal reaction, heavy bass and high volume could cause permanent damage to the human auditory system, but other phenomena can restore through resting.
Viper as a listening experience professional will not ignore this problem. Therefore put a lot of effort to study how to make a "Healing" sound technology, just a small success. But thinking on how to let users experience it.
★ NEW In-App Installation ★:
With this in-app installation, users just have to follow the instructions when first run V4A app and the app will install everything for you.
In order to use this feature successfully, full Busybox must be installed.
★ NEW Compatible Mode (Only in 4.x) ★:
Compatible Mode supports large variety of music players and the players' own EQ/sound effects (system-provided/third party)
Therefore, you don't have to select V4A in Sound Settings > Music Effects, choose anything other than V4A. Just run V4A app and the effects will be working with anything else.
1. In option, switch to Compatible Mode. Reboot, done.
2. In Sound Settings > Music Effects, choose other than V4A.
3. Run V4A app and configure the settings then the effects will work together with the one you chose in Sound Settings.
★ NEW Safe Mode (Only in 4.x) ★:
If V4A dont work on many players, try switching to Safe Mode to work with almost any music player.
1. In option, switch to Safe Mode. Reboot, done.
Bugs/Issues:
1. Driver status in FX Compatible Mode always NO. Driver status will show YES in normal mode.
Latest Version Changelogs
FX version: v2.2.1.1
1.Add differential surround (Haas effect).
2.Add channel pan setting.
3.More settings for field surround.
4.Support android 4.3.
FX version: v2.2.1.0
1.Added XHiFi Clarity mode.
2.V4A XHiFi stopped development.
For your information:
XHIFI Hi Clarity = FX Viper Clarity > XHiFi Clarity Mode.
XHIFI Lo Contour = FX Viper Bass > Natural Bass Mode.
FX version: v2.2.0.9
1.Add fidelity control system.
2.Optimize Headphone Surround Engine+ for VFP platform.
3.Fix some bugs.
4.Add update check.
FX version: v2.2.0.8
1.Add Headphone Surround Engine+.
2.Fix some bugs.
XHiFi version: v2.1.0.2
1.Support speaker effects.
2.Fix some bugs.
Click to expand...
Click to collapse
DOWNLOADS
FX version v2.2.1.1 : http://www.mediafire.com/download/7t1c73wsz4qiygu/ViPER4Android_FX_2211_en.zip
XHiFi version v2.1.0.2 : http://d-h.st/4WM
Sony Xperia New S.Enhance IR Samples Rev2: http://forum.xda-developers.com/showthread.php?p=41320703
Creative ZEN X-Fi IR Samples: http://forum.xda-developers.com/show....php?t=2308239
IRSamples for Convolver(Updated 15Apr) : http://www.mediafire.com/download/9am1sogfq9lm31d/en_IRSamples_331+IR.zip
For more IR samples, visit V4A IR Sample Index Thread with Official Mirror, all new IR samples were uploaded here : IRSamples
HighDefinition Impulse Responses Samples (IRS) - (stereo, 24bit, bitrate: 2823 kb/s, 44100 Hz, 2 channels)
BBE 1-5
Unofficial V4A Tool by a vipersaudio member - Fix FX not working for many players below 4.3:
http://d-h.st/c4Z
Click to expand...
Click to collapse
INSTALLATION
Require Rooted,BusyBox
Which to install? FX or XHiFi or Both?
A: FX has many audio effects, where as XHiFi restores audio quality. If you like many effects(reverb, bass, surround) then choose FX, if you like clear audio/vocal and you have a good headset, choose XHiFi. You can also install both, more CPU usage, that's all.
[FX/XHiFi version]
1. Extract zip
2.Choose correct android version & Install ViPER4Android.apk
2. Run app, when prompt, choose Yes to "install/update".
3. Choose correct CPU Type. (Instructions include in your downloaded zip)
4. Reboot device.
Option1. Choose V4A(either fx or xhifi) in sound settings > music effects (Don't worry, both fx and xhifi wil run together)
Option2. Dont touch sound settings, open up both(fx and xhifi), in option, switch to FX Compatible Mode, reboot.
Update To Latest Version
1. Download latest FX and XHIFI apks
2. Copy to system/app to overwrite // OR // Install like normal and replace previous version.
3. Open up FX and XHIFI, Choose "Install/Update"
4. Reboot, done.
UNINSTALLATION
1. In both FX and XHiFi app, go option and choose uninstall driver.
2. After that, uninstall the apk itself.
3. Reboot.
Click to expand...
Click to collapse
For IR Samples (Impulse Response)
1.Download it and extract to sdcard/Vi4PERAndroid/kernel (if folder does not there,jump to step 2 and then step 1)
2.Open Vi4PERAndroid,check box "impulse response"
3.Select desire samples
Changed Driver List (Corrected 20/May)
For Galaxy S Advance,Choose Cortex A9/15 with NEON
NEW FX 2208+
ZTE U880 or same CPU(PXA920), choose "Without VFP (PXA920)" (Convolver and Surround+ disabled)
Tegra2, ARM or any CPU with freq equal/less than 800MHz, choose "With VFP"
All Qualcomm/Snapdragon of freq higher than 800MHz, regardless of cores, choose "CortexA8 with NEON"
All other Dual-core,Quad-core,Octa-core, choose "CortexA9/15 with NEON"
NEW XHIFI 2101+
ZTE U880 or same CPU(PXA920), choose "Without VFP (PXA920)"
Tegra2, ARM, choose "With VFP"
ALL others, choose "CortexAx with NEON"
Click to expand...
Click to collapse
★★★For those having problems with effects in compatible mode even after rebooting. Try this:
1.Open up /system/build.prop (If you can't find this line, you have to solve in other way)
2.Change the line Ipa.decode=true to lpa.decode=false
Trouble Shooting
When V4A is not working for you. (Really No effect for all options, NOT BY CHECKING driver status)
0. MAKE SURE YOU HAVE CHOSE THE CORRECT DRIVER. Refer OP.
1. MAKE SURE YOU HAVE BUSYBOX INSTALLED
2. Uninstall, reboot. Reinstall, Choose correct driver, reboot.
3. Don't use compatible mode yet, go to sound settings>music effects> and choose v4a(either fx or xhifi). Test.
4. If not working, switch to compatible mode, reboot, go to sound settings>music effects> and select previous effect. Test.
5. If not working, activate safe mode, reboot. Test.
Click to expand...
Click to collapse
CREDIT
ViPER520(creator) and zhuhang
FX & XHiFi Settings Explained & Recommended Value
FX Settings
V4A FX version mainly for rendering audio effects, by controlling various parameters to achieve the purpose of audio effect adjustment.
<Headset>
1. Master Power. This option defines whether to enable V4A headset sound effects, also known as main switch.
2. Playback Gain Control :
It is mainly used to dynamically control the audio volume, to amplify or to attenuate.
(1) Enable checkbox : Whether the effect is enabled.
(2) Select Effect Strength : Effect Strength is the speed of amplification or attenuation, the stronger the faster the speed and the higher the final volume, the weaker the slower the speed, the closer to the original volume. Recommended medium.
(3) Max Gain : When the volume of the note is too small, in order to uplevel the sound, there may be very large magnification. The higher the value, the louder the volume. But too large will also amplify the noise within the song. Recommended 4 times.
(4) Max Output : This value defines the maximum volume of the PlaybackAGC sound in decibel value, the greater the value the greater the volume, 0 db is the maximum. In order to make the sound softer recommended -1.9 dB.
3. FIR Equalizer
511-order 10 bands FIR linear equalizer.
(1) Enable checkbox : Whether the effect is enabled.
(2) Select Preset : Here you can select default equalizer presets. When choosing custom, it will follow the user-defined lines drawn.
(3) Linear Equalizer graphic : Will pop up when you touch the graphic equalizer, you can manually adjust the levels of amplification and attenuation of the 10 bands.
4. Convolver
When an impulse response(IR) sample is loaded, music will show the same characteristics of the loaded sample, for example equalizer, surround, reverberation, tube etc.
Make sure SD Card has /ViPER4Android/Kernel/ folder, IR samples will be located there. If folder not exists, you can download latest V4A FX and extract SDCard_V4A.zip.
(1) Enable checkbox : Whether the effect is enabled.
(2) Impulse Response : Here you can select and load IR Samples inside /ViPER4Android/Kernel/ folder.
5. Field Surround
It is mainly used to create sound field surround effects. The sound field can be understood as mono field or stereo field.
(1) Enable checkbox : Whether the effect is enabled.
(2) Select Field Surround Strength : This value defines the strength of the field surround effects. The stronger, the stereo effect will be more obvious, the sound will come from left and right sides. Recommended medium.
(3) Select Mid Image Strength :This value defines the central vocal intensity. More strongman sound more clear, the weaker the more ethereal sound.
6. Reverberation
It uses mathematical methods to simulate the environmental feeling sensation. Example a song can be felt playing inside the auditorium, living room, bathroom, and so on.
(1) Enable checkbox : Whether the effect is enabled.
(2) Room Size : This value defines the virtual environment area size. The larger the value, the sound is wider and more echoes.
(3) Sound Field : This value defines the width of the room above, in meters. Assumed that the above room size is 100 square meters, here to set a width of 14 meters, then the length of the room will be 7.14 m.
Therefore, the room size and width defines the aspect ratio of the virtual environment.
The larger the value, the sound coming from both sides will felt more obvious.
(4) Damping Factor : This value defines the humidity of air in the above virtual environment, the moisture vapor in the air will easily absorb the echoes.
So the bigger this value, the less echoes heard.
(5) Wet Signal : This value defines the volume of the simulated environment effect.
(6) Dry Signal : This value defines the volume of the original sound.
For environments with low air humidity such as living room, auditorium and other indoor environment, you can use room size and sound field to define the area of ​​the virtual environment, water vapor content values ​​from 0 to 20, the reverb signal values ​​20 to 50, the proportion of the original signal to take value of about 50.
For environments with high air humidity such as bathroom and other indoor environment that contains a lot of moisture, you can use room size and sound field to define the area of ​​the virtual environment, water vapor content values ​​of 50 to 100, the reverb signal values ​​40 to 80, the proportion of the original signal value of about 50.
7. Dynamic System
It handles the dynamic range of the sound. In other words the bass, treble, and limiting.
(1) Enable checkbox : Whether the effect is enabled.
(2) Select Listening Device : This value defines the headset type connected to the audio jack. If you cannot get the right device for good bass tone, then select Common earphone. Common earphone is a common choice. Recommend Common earphone.
(3) Select Dynamic Bass : This value defines the average dynamic bass, the greater the stronger bass. Recommend 33%.
(4) Tube Simulator(6N1J) :This option defines whether to enable tube simulator effect. V4A tube simulator uses a simplified mathematical simulation of tube effect.
If turned on, will greatly reduce high-frequency odd harmonic distortions, while increases even-order harmonic distortions of tube simulator.
8. Master Gate(Limiter)
This option is V4A output limiter, its used to prevent overloud clipping distortion.
(1) Ouput Gain : This value defines the main output volume. Its something like a volume control.
(2) Limit Threshold : This value defines the limits of waveform amplitude by the limitor, 0 dB is the maximum value.
The smaller the value, the easier to experience audio frequency compression(the smaller the volume), will lose sound details, but can effectively control the final output volume. Recommend 0 db.
<Phone Speaker>
1. Master Power : This option defines whether to enable V4A speaker sound effects, also known as main switch
2. FIR Equalizer : Same as headset equalizer.
3. Convolver : Same as headset convolver.
4. Reverberation : Same as headset reverberation
5. Extra Loud
eXtra-Loud further amplifies the sound, but is controlled to protect the speaker, will not overload.
(1) Enable checkbox : Whether the effect is enabled.
(2) Select Effect Strength : Effect Strength is the speed of amplification or attenuation, the stronger the faster the speed and the higher the final volume, the weaker the slower the speed, the closer to the original volume. Recommended medium.
(3) Max Gain : When the volume of the note is too small, in order to uplevel the sound, there may be very large magnification. The higher the value, the louder the volume. Recommend infinity.
(4) Max Output : This value defines the maximum volume of the EL sound in decibel value, the greater the value the greater the volume, 0 db is the maximum. Recommend 0db.
6. Master Gate(Limiter)
Same as headset limiter.
XHiFi Settings
V4A XHiFi version mainly for restoring audio quality and details.
1. Master Power
This option defines whether to enable V4A headset/bluetooth sound effects, also known as main switch.
2. Playback Gain Control : Same as FX version's PlaybackAGC.
3. FIR Equalizer : 2047-order 10 bands, quality much better than FX version. Method of adjusting same as FX version.
4. Audio Reconstruction
It is XHiFi's core feature, it does the detailing and treble restoring for lossy mp3 audio files. (Currently in adjustment phase, different device may have different experience.)
(1) Enable checkbox : Whether the effect is enabled.
(2) Hi Clarity : This value defines the detailing and treble restoration percentage, the larger the value, the more details of the sound and stronger treble.
For low-end/common earphones, this is not recommended as you may experience high frequency shrills.
For better earphones such as Monster,Philips,Zombie,Sennheiser, recommended value = 30 ~ 50.
For high-end headphones, value depands on headphone cable length. Start with value = 40, value +10 for every 80cm cable length.
For preamp/amp connect to phone. Start with value = 60, value +10 for every 80cm cable length.
For tube amplifier, directly use value = 100.
(3) Lo Contour : The value defines the percentage of bass contour reconstruction over total band. The larger the value, the stronger the bass, but midrange and details will slightly lost.
For earphones recommend value = 50 ~ 70.
For headphones recommend value = 20 ~ 30.
5. Master Gate(Limiter)
This option is V4A output limiter, its used to prevent overloud clipping distortion.
(1) Ouput Gain : This value defines the main output volume. Its something like a volume control.
(2) Limit Threshold : This value defines the limits of waveform amplitude by the limitor, 0 dB is the maximum value.
The smaller the value, the easier to experience audio frequency compression(the smaller the volume), will lose sound details, but can effectively control the final output volume. Recommend 0 db.
Recommended FX Settings (will differ with official post)
<Headset>
1. Master Power: ✔
2. Playback Gain Control
(1) Enable checkbox: ✔
(2) Select Effect Strength: Slight//Moderate
(3) Max Gain: 4x//8x
(4) Max Output: -1.9dB
3. FIR Equalizer
(1) Enable checkbox: ✔
(2) Select Preset: Acoustic
4. Convolver
(1) Enable checkbox: ✔
(2) Impulse Response: PopEQ // DBX 160SL Blue - Medium Ratio // JoeMeek SC2 Impulse
5. Field Surround
(1) Enable checkbox: ✘
(2) Select Field Surround Strength: Extreme
(3) Select Mid Image Strength: Extreme
6.Headphone Surround +
(1) VHS+ : ✘
(2) Select Effect Quality: Normal
7. Reverberation
(1) Enable checkbox: ✘
(2) Room Size: 25m2
(3) Sound Field: 5m
(4) Damping Factor: 0 Percent
(5) Wet Signal: 0 Percent
(6) Dry Signal: 50 Percent
8. Dynamic System
(1) Enable checkbox: ✔
(2) Select Listening Device: Common Earphone(v2)
(3) Select Dynamic Bass: 30 Percent
(4) Tube Simulator(6N1J): ✘
9.Auditory System Protection
(1) Cure Tech+ : ✔
(2) Select Binaural Level : Slight
10. Master Gate(Limiter)
(1) Ouput Gain: 0dB
(2) Limit Threshold: 0dB
<Phone Speaker>
1. Master Power: ✔
2. FIR Equalizer
(1) Enable checkbox: ✔
(2) Select Preset: Acoustic
3. Convolver
(1) Enable checkbox: ✔
(2) Impulse Response: Studer +1dB Updated
4. Reverberation
(1) Enable checkbox: ✘
(2) Room Size: 25m2
(3) Sound Field: 5m
(4) Damping Factor: 0 Percent
(5) Wet Signal: 0 Percent
(6) Dry Signal: 50 Percent
5. Extra Loud
(1) Enable checkbox: ✔
(2) Select Effect Strength: Slight
(3) Max Gain: 4x
(4) Max Output: 0dB
6. Master Gate(Limiter)
(1) Output Gain: 0dB
(2) Limit Threshold: 0dB
Recommended XHIFI Settings
1. Master Power: ✔
2. Playback Gain Control
(1) Enable checkbox: ✔
(2) Select Effect Strength: Slight
(3) Max Gain: 4x
(4) Max Output: -1.9dB
3. FIR Equalizer
(1) Enable checkbox: ✘
(2) Select Preset: Acoustic
4. Audio Reconstruction
(1) Enable checkbox: ✔
(2) Hi Clarity: 80
(3) Lo Contour: 70
5. Master Gate(Limiter)
(1) Output Gain: 0dB
(2) Limit Threshold: 0dB
Click to expand...
Click to collapse
Development Progress (Updated 5-Jun-2013)
FX version: v2.2.0.9 (Estimated date: )
1. Optimise Surround Engine+ for VFP CPUs.
XHiFi version: v2.1.0.3 (Estimated date: )
-
TODO List:
1. ViPER4Android driver auto install/update [Done]
2. Increase compatibility for Android 4.x [Done]
3. EQ user-defined slot [Deprecated, use Sound Effect Profile]
4. Sound Effect Profile [Done]
5. XHiFi support Tegra2 [Done]
6. Convolver support ARMv5TE CPU [Done]
7. Improve Convolver process [Done]
8. Convolver support IR Sample of any length [Done]
9. FX Field Surround Upgraded [Done]
10. FX Virtual Headphone Technology added [Done]
11. Fix the sound delay caused by convolver. [Done]
12. Import IR samples from external storage. [WIP]
13. Optimize audio reconstruction module. [Done]
14. Upgrade the bass effect of audio reconstruction module. [Done]
15. Use RootTools to install driver. [Done]
16. Cure Tech+[Done]
17. Add Natural Bass to FX [WIP]
18. Add clarity settings [WIP]
19. Combine FX and XHIFI [WIP]
20. Add Effect Calibration to suit one's ear [WIP]
Effect Calibration:
Every human's auditory systems are not the same, some people experience Left-Right asymmetries, while some with high-frequency phobia. Each individual has a different concept of the sound field. Therefore "Hearing Calibration" was introduced.
Through a simple calibration wizard, V4A system benchmark will be adjusted according to the calibrating result. "Hearing Calibration" feature will make sure every V4A user experience its ultimate effects up to par.
Of course, due to huge "Hearing Calibration" variety, its impossible to cook all the features at once, allow ViPER520 to experiment slowly, as the first edition could only achieve Left-Right symmetric and high frequency calibration.
Click to expand...
Click to collapse
V4A FX GUI Design (Not ready)
thanks:good:
What improvements make this more precise?
Is this better than AC!D Sound Engine?
Sent from my phone, because I'm away from my PC right now
Sami Kabir said:
Is this better than AC!D Sound Engine?
Sent from my phone, because I'm away from my PC right now
Click to expand...
Click to collapse
I've tried both and AC!D sounds better for me.
Sami Kabir said:
Is this better than AC!D Sound Engine?
Sent from my phone, because I'm away from my PC right now
Click to expand...
Click to collapse
For me "YES". I tried almost all song engines such as Acid,DSP,Awesome Beat,Pure Audio& this.I love this more.
Try using different convolvers
I'm sorry for such silly question
But what is IRSamples?
Do i need them?
fongandy said:
I'm sorry for such silly question
But what is IRSamples?
Do i need them?
Click to expand...
Click to collapse
It is Impulse Response.It is optional
1.Download it and extract to sdcard/Vi4PERAndroid/kernel (if folder does not there,jump to step 2 and then step 1)
2.Open Vi4PERAndroid,check box "impulse response"
3.Select desire samples
hermeshhn said:
thanks:good:
Click to expand...
Click to collapse
Please press "THANKS":smile:
Grady22 said:
What improvements make this more precise?
Click to expand...
Click to collapse
OP updated for detail
More IR Samples added:good:
Yeah ! I'm using this mod really cool ! Best working with Google Play Music.. choose setting -> equlizer to viper4android
edit -> I faced some problem with that I think this help to others.
When Activate Mod Sound not wotking with poweramp and some apps (Headset also). for get sound back need to disable Viper4android .
quality sound but need more fixes i think.
Yes,that's right dude
Rom : Umbrella Corporation V2
Kernel : CoCoE 6.2
4cylturbo scripts + CrossBreeder
imcoolsj said:
Yeah ! I'm using this mod really cool ! Best working with Google Play Music.. choose setting -> equlizer to viper4android
edit -> I faced some problem with that I think this help to others.
When Activate Mod Sound not wotking with poweramp and some apps (Headset also). for get sound back need to disable Viper4android .
quality sound but need more fixes i think.
Click to expand...
Click to collapse
To use Viper4android with Poweramp, you must :
- go to settings (of Poweramp)
- go to Audio Engine
- go to Advanced Tweaks
- uncheck "Direct Volume Control"
Envoyé depuis mon GT-I9070 avec Tapatalk
Letin69 said:
To use Viper4android with Poweramp, you must :
- go to settings (of Poweramp)
- go to Audio Engine
- go to Advanced Tweaks
- uncheck "Direct Volume Control"
Envoyé depuis mon GT-I9070 avec Tapatalk
Click to expand...
Click to collapse
yep but i also got ringing problem aswell
Edit - ok working nicely no problem.. I dont know wht happen
imcoolsj said:
yep but i also got ringing problem aswell
Click to expand...
Click to collapse
I never get any problems since the 1st time i used.
WOW! View count nearly 1,000 in my first post. Thank you all
anyone using jetaudio try this out yet?
FX Version 2.2.0.9 update :laugh:
What audio driver un first start i need install ?
Enviado desde mi GT-I9070 usando Tapatalk 4 Beta

Audio output sampling and bit rate??

Does anyone know the audio output in this device, I am using power amp media player and need to know if our device supports higher sampling and bit rate, if so how to enable it.
It supports up to 192 kHz - but - it forces the USB-C audio path to 96 kHz no matter what. Don't let the numbers fool you, if you're an audiophile you're going to be disappointed, everything sounds like mud.
The only app that the operating system is not stepping on is USB Audio Player Pro - it bypasses the operating system and provides a bit perfect path from the audio file to the USB output.
If you have an external DAC/amp and good headphones you're going to find bit-perfect 44.1 kHz sounds far better than any up-sampling.
Far better.
(I have no affiliation with USB Audio Player Pro or the company or people behind it. I just like music to sound like it's supposed to, within the technology limits given during production.)
Hi, I am planning to get an external DAC for my Honor View 10 but I read contradictory posts in several forums. With the stock EMUI, does USB audio really work?

Improve Bluetooth audio quality on headphones without aptX or LDAC

The test is over. I'm no longer accepting libraries to patch.
SBC XQ Feature is available in LineageOS 15.1 build created on or after the 31st of March 2019, or a 16.0 build created on or after the 13th of May 2019.
Many note low sound quality and lack of high frequencies when using the standard SBC Bluetooth codec, which is supported by all headphones and other Bluetooth devices. A common recommendation to get better sound quality is to buy devices and headphones with aptX or LDAC codecs supported. These codecs require licensing fees, so devices with them are more expensive.
It turns out that the low quality of SBC is caused by artificial limitations of all current Bluetooth stacks and headphones' configuration, and this limitation can be circumvented on any existing devices.
Everyone interested in Bluetooth audio, please take part in high-bitrate SBC compatibility testing on various headphones, receivers, stereo systems, or automotive head units.
If the vast majority of devices work with high bitrates, I will make a patch for Android and send it to AOSP and third-party ROMs, and high quality Bluetooth audio will be available to everyone on any headphones and smartphones, regardless of codecs with licensing fees.
Short technical information about SBC codec
SBC has lots of different parameters that are negotiated during the connection setup phase:
Audio channel type and number: Joint Stereo, Stereo, Dual Channel, Mono;
Number of frequency bands: 4 or 8;
Number of audio blocks in one packet: 4, 8, 12, 16;
Quantization bit allocation algorithm: Loudness, SNR;
Maximum and minimum bit pool used in quantization process: usually 2-53.
The decoder is required to support any combination of these parameters. Encoder may implement only a part of them.
Existing Bluetooth stacks usually negotiate the following profile: Joint Stereo, 8 bands, 16 blocks, Loudness, bitpool 2..53. This profile encodes 44.1 kHz audio with a bitrate of 328 kbps.
Bitpool parameter directly affects the bitrate within the same profile: the higher it is, the higher the bitrate, and hence the quality.
However, the bitpool parameter is not bound to a specific profile. The bitrate is also significantly affected by other parameters: audio channel type, number of frequency bands, number of audio blocks. You can increase the bitrate indirectly by negotiating non-standard profiles, without changing the bitpool.
{
"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"
}
For example, Dual Channel encodes channels separately, using the entire bitpool for each channel. Forcing the device to use Dual Channel instead of Joint Stereo will get us almost doubled bitrate at the same maximum bitpool, 617 kbps.
To me it feels that bitpool should be an internal variable. It is an A2DP specification design fault that bitpool value is not bound to other codec parameters and only defined as a global value.
These fixed Bitpool and Bitrate values originate from recommended values for high-quality audio. But the recommendation is not an excuse to limit the profile to these values.
A2DP specification v1.2, which was active from 2007 to 2015, requires all decoders to work correctly with bitrates up to 512 kbps:
The decoder of the SNK shall support all possible bitpool values ​​that do not result in the excess of the maximum bit rate. This profile limits the available maximum bit rate to 320kb/s for mono, and 512kb/s for two-channel modes.
Click to expand...
Click to collapse
In the new version of the specification there is no bitrate limitation. It is assumed that modern headphones released after 2015 with EDR can support bitrates up to 730 kbps.
For some reason, all currently tested Bluetooth stacks (Linux (PulseAudio), Android, Blackberry and macOS) have artificial restrictions of maximum bitpool parameter, which directly affects the maximum bitrate. But this is not the biggest problem, almost all headphones also limit the maximum bitpool value to 53.
As I've already seen in my tests, most devices work fine on a modified Bluetooth stack with a bitrate of 507 kbps, without interrupts and crackling. But such a bitrate will never be negotiated under normal conditions, with stock Bluetooth stacks.
How to test on a PC
High bitrate SBC headphone compatibility test is the easiest to perform on the PC with a Bluetooth adapter. I've prepared Ubuntu image with a modified Bluetooth stack, which can be run as in a virtual machine (by connecting Bluetooth adapter as a USB device inside the virtual machine, it also works with the adapters built into the laptops) or by booting from the USB flash drive. This image uses the following profile: Dual Channel, 8 bands, 16 blocks, Loudness, bitpool 2..41, 44.1 kHz, which provides 485 kbps bitrate.
See the attachment in the end of this post.
Running in a VM
Download Virtualbox and Virtualbox Extension Pack: https://www.virtualbox.org/wiki/Downloads;
Install Virtualbox, start it;
Install Extension Pack using File → Preferences → Extensions;
Create new virtual machine: Linux, Ubuntu (64-bit), 1024 RAM. Do not create a HDD.
Navigate to virtual machine settings, in Storage choose Controller: IDE, Empty, press CD icon → Choose virtual optical disk file;
Select downloaded bluetooth-dualchannel-test-ubuntu-18.04.1-desktop-amd64.iso;
Save and close settings window, start virtual machine;
Right-click USB cable icon in the bottom right, select your Bluetooth adapter;
Running on a PC
The image supports BIOS/CSM and UEFI booting.
Burn the image to a USB flash drive using Etcher: https://etcher.io/. This operation will delete all existing files on a USB drive.
Turn off the PC;
Insert USB flash drive, turn on the PC and press boot order button (usually Esc or F12);
Select your USB flash drive.
Performing the test
(optional but recommended) Double click on "Btsnoop Dump" script on the desktop. It will start Bluetooth data capture for later analysis. Do not close terminal window.
Switch the headphones to pairing mode;
Click to the arrow in top right corner, select Bluetooth icon → Bluetooth Settings;
Choose your headphones, wait until pairing is complete and close the window;
Set Ubuntu volume to about 2/3. Also decrease volume using headset buttons as it could be very loud after pairing.
Open "music" folder, play "testrecord1.flac";
(optional but recommended) Close player, close terminal window. This will stop data capture.
(optional but recommended) Open Firefox browser, upload data dump (btsnoop_hci.btsnoop on the desktop) to https://btcodecs.valdikss.org.ru/
You can listen to other music in the music folder, or upload your own;
Post in this topic your headphone model and test results.
There should be no cracklings, audio interruption or other sound distortion in the headphones. If you hear a good high-quality sound, that means your headphones support audio with a bit rate of 485 kbps.
If you upload data to the server, please carefully follow the algorithm above. Especially, if you power off the headphones or disconnect after pairing, it's important to connect to the headphones manually from the bluetooth settings, do not allow auto connection!
How to test on Android device
In order to test from Android smartphone or tablet you need to use modified Bluetooth stack, which requires root privilege.
For regular users
Use PC method if possible.
Create backup before overwriting bluetooth library. Some patched libraries are attached to this post.
Unrestricted/unlimited versions negotiate Dual Channel mode and disable bitrate restriction (617-660 kbit/s will be used). Versions with 482 or 486 prefix negotiate 474-485 kbit/s.
For ROM developers (Android 5-7)
Patchset which increases maximum Bitpool value and adds Bluetooth Dual Channel option is available using the following link:
LineageOS 14.1 (Android 7.1.2)
The following information is outdated and is kept only for historical reasons:
Code:
[b]These modifications are designed only for test and should not be applied to the main ROM repository![/b]
[b]If you're a ROM developer, please provide flashable modified bluetooth library if possible![/b]
These modifications should be applied to stock Android bluetooth stacks Bluedroid (Android 5) and Fluoride (Android 6-7). Qualcomm-modified stack is not supported.
[b]1. Replace Joint Stereo with Dual Channel in standard SBC configuration[/b]
[url="https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/master/btif/co/bta_av_co.c#99"][i]android/platform/external/bluetooth/bluedroid/btif/co/bta_av_co.c:99[/i][/url]
[code]const tA2D_SBC_CIE btif_av_sbc_default_config =
{
BTIF_AV_SBC_DEFAULT_SAMP_FREQ, /* samp_freq */
A2D_SBC_IE_CH_MD_JOINT, /* ch_mode */
A2D_SBC_IE_BLOCKS_16, /* block_len */
A2D_SBC_IE_SUBBAND_8, /* num_subbands */
A2D_SBC_IE_ALLOC_MD_L, /* alloc_mthd */
BTA_AV_CO_SBC_MAX_BITPOOL, /* max_bitpool */
A2D_SBC_IE_MIN_BITPOOL /* min_bitpool */
};
Replace A2D_SBC_IE_CH_MD_JOINT with A2D_SBC_IE_CH_MD_DUAL.
2. Increase Dual Channel priority
android/platform/external/bluetooth/bluedroid/btif/co/bta_av_co.c:411
Code:
if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_JOINT)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_JOINT;
else if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_STEREO)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_STEREO;
else if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_DUAL)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_DUAL;
else if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_MONO)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_MONO;
Move if with A2D_SBC_IE_CH_MD_DUAL to the top.
3. Disable or increase bitrate restriction
Android bluetooth stack has not only bitpool limit, but also bitrate limit, 328 kbit/s. If the headphones support, for example, bitpool 53 for 48 kHz, Android will decrease the bitpool down to fit into 328 kbit/s limit. This will happen AFTER codec negotiation, on the encoding stage, do not take into account bitpool value in Bluetooth SetCapabilities packet.
android/platform/external/bluetooth/bluedroid/btif/src/btif_media_task.c:172
Code:
#define DEFAULT_SBC_BITRATE 328
Replace with 512.
4. (for experiments only) Disable MTU limit.
This is required for bitrates higher than ~580 kbit/s.
btif/src/btif_media_task.c:174
Code:
/* 2DH5 payload size of 679 bytes - (4 bytes L2CAP Header + 12 bytes AVDTP Header) */
#define MAX_2MBPS_AVDTP_MTU 663
[/code]
For ROM developers (Android 8-9)
Patchset which increases maximum Bitpool value and adds Bluetooth Dual Channel option is available using the following links:
LineageOS 15.1 (Android 8.1)
LineageOS 16.0 (Android 9)
AOSP Master (what will eventually become Android 9.1/10)
If you're a ROM developer, please provide flashable modified bluetooth library if possible!
The following information is outdated and is kept only for historical reasons:
1. Add Dual Channel support into A2DP SBC Source
/platform/system/bt/stack/a2dp/a2dp_sbc.cc:55
Code:
/* SBC SRC codec capabilities */
static const tA2DP_SBC_CIE a2dp_sbc_caps = {
A2DP_SBC_IE_SAMP_FREQ_44, /* samp_freq */
(A2DP_SBC_IE_CH_MD_MONO | A2DP_SBC_IE_CH_MD_JOINT), /* ch_mode */
(A2DP_SBC_IE_BLOCKS_16 | A2DP_SBC_IE_BLOCKS_12 | A2DP_SBC_IE_BLOCKS_8 |
A2DP_SBC_IE_BLOCKS_4), /* block_len */
A2DP_SBC_IE_SUBBAND_8, /* num_subbands */
A2DP_SBC_IE_ALLOC_MD_L, /* alloc_method */
A2DP_SBC_IE_MIN_BITPOOL, /* min_bitpool */
A2DP_SBC_MAX_BITPOOL, /* max_bitpool */
BTAV_A2DP_CODEC_BITS_PER_SAMPLE_16 /* bits_per_sample */
};
add A2DP_SBC_IE_CH_MD_DUAL in ch_mode.
2. Replace Joint Stereo with Dual Channel in default config
/platform/system/bt/stack/a2dp/a2dp_sbc.cc:82
Code:
/* Default SBC codec configuration */
const tA2DP_SBC_CIE a2dp_sbc_default_config = {
A2DP_SBC_IE_SAMP_FREQ_44, /* samp_freq */
A2DP_SBC_IE_CH_MD_JOINT, /* ch_mode */
A2DP_SBC_IE_BLOCKS_16, /* block_len */
A2DP_SBC_IE_SUBBAND_8, /* num_subbands */
A2DP_SBC_IE_ALLOC_MD_L, /* alloc_method */
A2DP_SBC_IE_MIN_BITPOOL, /* min_bitpool */
A2DP_SBC_MAX_BITPOOL, /* max_bitpool */
BTAV_A2DP_CODEC_BITS_PER_SAMPLE_16 /* bits_per_sample */
};
Replace A2DP_SBC_IE_CH_MD_JOINT with A2DP_SBC_IE_CH_MD_DUAL.
3. Increase Dual Channel priority
/platform/system/bt/stack/a2dp/a2dp_sbc.cc:1155
Code:
static bool select_best_channel_mode(uint8_t ch_mode, tA2DP_SBC_CIE* p_result,
btav_a2dp_codec_config_t* p_codec_config) {
if (ch_mode & A2DP_SBC_IE_CH_MD_JOINT) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_JOINT;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_STEREO;
return true;
}
if (ch_mode & A2DP_SBC_IE_CH_MD_STEREO) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_STEREO;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_STEREO;
return true;
}
if (ch_mode & A2DP_SBC_IE_CH_MD_DUAL) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_DUAL;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_STEREO;
return true;
}
if (ch_mode & A2DP_SBC_IE_CH_MD_MONO) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_MONO;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_MONO;
return true;
}
return false;
}
Move if with A2DP_SBC_IE_CH_MD_DUAL to the top.
4. Increase bitrate limit
/platform/system/bt/stack/a2dp/a2dp_sbc_encoder.cc:42
Code:
#define A2DP_SBC_DEFAULT_BITRATE 328
Replace with 512.
5. (for experiments only) Disable MTU limit
This is required for bitrates higher than ~580 kbit/s.
/platform/system/bt/stack/a2dp/a2dp_sbc_encoder.cc:47
Code:
#define MAX_2MBPS_AVDTP_MTU 663
[/code]
For advanced users and ROM developers (Android 5-7 binary patch)
Please refer to this post in Russian (use Google Translate): https://4pda.ru/forum/index.php?s=&showtopic=914135&view=findpost&p=76169677
How to capture Bluetooth data dump on Android
Turn off Bluetooth;
In Developer Settings, enable the "Enable Bluetooth HCI snoop log" switch;
Turn on Bluetooth, connect to your headset using Bluetooth menu (this is important! Do not allow auto connection!);
Play short audio sample;
Open developer settings, disable the "Enable Bluetooth HCI snoop log" switch;
There should be /storage/emulated/0/btsnoop_hci.log or /data/misc/bluetooth/logs/btsnoop_hci.log created. If it's missing, open /etc/bluetooth/bt_stack.conf with a text editor and see the path in BtSnoopFileName option.
Upload btsnoop_hci.log to https://btcodecs.valdikss.org.ru/;
Post in this topic your headphone model and test results.
There should be no cracklings, audio interruption or other sound distortion in the headphones. If you hear a good high-quality sound with the patched library, that means your headphones support audio with a bit rate of 512 kbps.
If you upload data to the server, please carefully follow the algorithm above. Especially, if you power off the headphones or disconnect after pairing, it's important to connect to the headphones manually from the bluetooth settings, do not allow auto connection!
Some of the files attached below have no MTU limit patched. Unlocked/unrestricted versions most probably will introduce cracklings.
Tested devices
Devices which support at least 512 kbit/s SBC
1MORE iBFree
JBL Everest 310
JBL Everest 700
JBL T110BT
JBL E55BT
JBL T460BT
JBL Endurance SPRINT (Claim to not support Dual Channel, but work if forced. Does not conform to A2DP specification.)
Skullcandy HESH 3
SoundPEATS Q30
Sony WH-H900N
Sony WI-C400
Sony MDR-1ABT
Sony MDR-ZX770BT
Sony MDR-ZX770BN
Sony MDR-XB650BT
Sony MDR-XB950B1
Sony SBH50
SVEN AP-B570MV
Syllable G600
Bluedio A/Air (Claim to not support Dual Channel, but work if forced. Does not conform to A2DP specification.)
Bluedio T4s (Bitpool max 39. Claim to not support Dual Channel, but work if forced, 462 kbit/s. Does not conform to A2DP specification.)
Bluedio T5 (Claim to not support Dual Channel, but work if forced. Does not conform to A2DP specification.)
Bluedio T6 (Claim to not support Dual Channel, but work if forced. Does not conform to A2DP specification. Adopt Max 97220 chipset.)
Marshall Major II Bluetooth
Overdrive RealForce D1
DEXP BT-210
DEXP BT-220
DEXP BT-250
DEXP BT-260
DEXP BT-280
Edifier W288BT
Edifier W830BT
Nomi BT 211
LeEco Le Sports BT
Xiaomi MI Portable Bluetooth Speaker
Xiaomi Square Box Bluetooth Speaker 2
Sennheiser HD 4.40BT
AKG K845BT
Beyerdynamic Amiron Wireless
Bowers & Wilkins PX
Bowers & Wilkins Zeppelin Wireless
House of Marley Liberate XLBT
Harman Kardon Onyx Studio 4
Harman Kardon Aura Studio 2
QCY QY8
Panasonic RP-BT10
Jaybird X3
Logitech BT Adapter
TP-Link HA100
Xiaomi Mi Bluetooth Audio Receiver
Overfly Portable Bluetooth Receiver
KZ Wireless Bluetooth Module
Excelvan B7
Hagibis X2
Pioneer SE-E7BT
Automotive DAC Lusya bluetooth 4.0 with AK4490, NE5532
Noname automotive head unit (CSR8645 chip)
Sony DSX-A400BT automotive head unit
Devices which support SBC higher than 512 kbit/s
JBL Everest 310 (617-660 kbps)
JBL T110BT (576 kbps)
JBL Endurance SPRINT (573 kbps)
SoundPEATS Q30
DEXP BT-210 (617 kbps)
DEXP BT-220 (617 kbps)
DEXP BT-260 (617 kbps)
DEXP BT-280 (617 kbps)
Sony WI-C400 (576 kbps)
Sony MDR-ZX770BT (617-660 kbps)
Sony MDR-ZX770BN
Marshall Major II Bluetooth (617-660 kbps)
Overdrive RealForce D1 (730 kbps, dual channel, 4 subbands)
Jaybird X3
QCY QY8 (617 kbps)
Edifier W288BT (617 kbps)
Panasonic RP-BT10 (596 kbps)
LeEco Le Sports BT (617 kbps)
Nomi BT 211 (617 kbps)
Xiaomi Mi Bluetooth Audio Receiver (576 kbps)
Overfly Portable Bluetooth Receiver (617 kbps)
Automotive DAC Lusya bluetooth 4.0 with AK4490, NE5532 (576 kbps)
Devices which don't work with higher bitrates or Dual Channel
Harper HB-202 (cracklings; Beken BK3256 chip)
Sony Ericsson MW600 (high frequency distortion, cracklings; device from 2009)
Sony SBH52 (too slow to handle packet rate)
BlitzWolf BW-F2 (no sound)
Overfly mini Bluetooth receiver (no sound)
Why this is important: SBC 328k and 485k vs aptX
Contrary to popular belief of aptX sound quality, in some cases it can produce worse audio quality than SBC with a standard 328k bitrate.
SBC dynamically allocates quantization bits for frequency bands, acting on a "bottom-to-top" basis. If the whole bitrate was used for the lower and middle frequencies, the upper frequencies are "cut off" (silenced).
aptX quantizes frequency bands with the same number of bits constantly, which makes it a constant bitrate codec: 352 kbps for 44.1 kHz, 384 kbps for 48 kHz. It can't "transfer bits" to frequencies that are mostly needed in them. Unlike SBC, aptX will not "cut" frequencies, but will add quantization noise to them, reducing the dynamic range of audio, and sometimes introducing crackles. SBC, on the contrary, "eats the details" - discards the quietest areas.
On average, compared to SBC 328k, aptX makes less distortion in music with a wide frequency range, but on music with a narrow frequency range and a wide dynamic range SBC 328k sometimes wins.
Let us consider a special case, a piano recording. Here's a spectrogram:
The most energy lies in the 0-4 kHz frequencies, and lasts up to 10 kHz.
The spectrogram of the file aptX file looks like this:
Here is SBC 328k:
It can be seen that the SBC 328k periodically completely cut off the range above 16 kHz, and used all available bitrates for ranges below this value. However, aptX introduced more distortions into the frequency spectrum audible by the human ear, which can be seen on the subtracted original spectrogram from the aptX spectrogram (the brighter, the more distortion):
While the SBC 328k has introduced less distortion the signal in the range from 0 to 10 kHz, and the rest has been сut:
Bitrate 485k for SBC was enough to save the entire frequency range, without cutting off the bands.
SBC 485k on this audio sample is much better than aptX in the range of 0-15 kHz, and with a smaller but still noticeable difference - at 15-22 kHz (the darker, the less distortion):
Switching to a high-bitrate SBC, you will get a sound superior to aptX most of the time, on any headphones.
Bro. The concepts sound amazing.
I have Le Max 2 (Oreo). I have attached Bluetooth .so files.
If you patch I will try on Sony Bluetooth system and share with my friends patched files to see how much it works.
Thanks.
rohit3192 said:
Bro. The concepts sound amazing.
I have Le Max 2 (Oreo). I have attached Bluetooth .so files.
If you patch I will try on Sony Bluetooth system and share with my friends patched files to see how much it works.
Thanks.
Click to expand...
Click to collapse
For some reason I can't download your file, always get 404 not found. Another person with LeEco LeMax 2 (x820) contacted me and I made a patch, but only for 32-bit library. Since your archive is >2 MB, I suppose it contains 32 and 64 bit libraries. Please write your exact OS version and build number.
Would you mind to try? Backup your files first, replace 32-bit library with the file from the archive and rename 64-bit library, so it won't be used, and follow the instructions in the second post to capture the dump and upload it to btcodecs.
OK .
I try. Allow me some time.
Yes both libs were in one file. Now sending you separate libs.
rohit3192 said:
OK .
I try. Allow me some time.
Yes both libs were in one file. Now sending you separate libs.
Click to expand...
Click to collapse
Try these.
I have replaced file in /system/lib with permission.
And renamed /lib64 file as instructed.
Bluetooth switch doing nothing.
After renaming lib64 to original name the Bluetooth switch works and connects.
Build no attached.
rohit3192 said:
I have replaced file in /system/lib with permission.
And renamed /lib64 file as instructed.
Bluetooth switch doing nothing.
After renaming lib64 to original name the Bluetooth switch works and connects.
Build no attached.
Click to expand...
Click to collapse
Please try the latest archive. It includes patched 64 bit libraries.
The new patched 64bit file worked.
Tried 486 one only.
Here is Bluetooth log. (Upload was too slow at given link so sending GD link)
Post edited: thanks @ValdikSS a lot.
rohit3192 said:
Here is Bluetooth log. (Upload was too slow at given link so sending GD link)
Click to expand...
Click to collapse
Yes, it worked, the bitrate is 485 kbit/s. Did you hear any cracklings or interruptions?
The audio you played is of low quality. That's probably an MP3 ~160-192 kbit/s?
There is no crackling. Yes mp3 was of low quality that I tested.
Yet sound seems improved. I will need more time to get proper impression. I will post later here.
Also I have spread the word in few telegram channels.
Thanks
@op here you have my lib from Huawei P9 Android 7.0
Can you check and modded to test. I be test on my LG HBS910 with aptx
https://mega.nz/#!G3gR3RrC!yNysYtkk1DhlBk-ec87bIP56aupCwKvfiWM1k32Qy7k
chudy_85 said:
@op here you have my lib from Huawei P9 Android 7.0
Can you check and modded to test. I be test on my LG HBS910 with aptx
Click to expand...
Click to collapse
Patched version has been added to the second post.
This sound enhancement is only for SBC codec, it won't do anything with aptX. You should disable aptX to test patched version.
Hello
I have 1more ibfree sport headphone that supports AAC HD codec only with apple devices as company has mentioned in their site. (https://india.1more.com/collections...ore-ibfree-sport-bluetooth-earphones-with-mic)
As in your post you have mentioned 1more ibfree, that support aptx codec .
My headphone is newer version of ibfree series.
So the problem is in developer setting I can't change to AAC from SBC codec.
It stays to SBC only so I think I can get help from here from you.
So here the link to those .so files
https://mega.nz/#F!tj5AlahL!yCrNHYB-ft-zaJl2uc7kig
Phone - Le Max2 Lineage Oreo 8.1
AdityaDharewa said:
Hello
So the problem is in developer setting I can't change to AAC from SBC codec.
It stays to SBC only so I think I can get help from here from you.
Phone - Le Max2 Lineage Oreo 8.1
Click to expand...
Click to collapse
Please capture a dump and upload it to https://btcodecs.valdikss.org.ru, you'll see all codec information which the device supports.
And by the way, patched libraries for Le Max2 Oreo are already in the second post, give them a try.
ValdikSS said:
For regular users
Send me your bluetooth stack libraries: /system/lib/hw/bluetooth.default.so and /system/lib64/hw/bluetooth.default.so (if it exists).
Click to expand...
Click to collapse
Hmmm those files don't exist on my device (Pixel 2 XL, Pie 9.0 stock OS)
LeifAlbor said:
Hmmm those files don't exist on my device (Pixel 2 XL, Pie 9.0 stock OS)
Click to expand...
Click to collapse
/system/lib/libbluetooth.so and /system/lib64/libbluetooth.so for Android 9.
ValdikSS said:
/system/lib/libbluetooth.so and /system/lib64/libbluetooth.so for Android 9.
Click to expand...
Click to collapse
Done

Can You Screen Mirror/Cast With Dolby Digital Output (5.1)?

It has been a bit frustrating trying to find an answer to something that I would think would be a common question (or not common since people with real surround systems are rare). Anyway, is it possible to output 5.1 surround sound (Dolby Digital Plus, DTS, etc) to an external device like a TV? If you can't mirror cast/screen cast that, is their a way to get that kind of audio output from some kind of usb-c to hdmi cord/adapter?
If the answer is no to both, and that it's impossible to do at all, why would such a seemingly basic thing never come to be supported?
The only possible way to retain full resolution is using the C port and keep the signal in the digital realm (minimum output should be 24/96 khz) to a quality reciever.
Normally Dolby, DTS, HDCD, etc is then decoded by the reciever and brought into the analog realm.
BT LDAC is the best bluetooth option available for this device, but this will degrade the image.
It lacks the bandwidth to fully support 24 bit/48 khz and higher resolutions.
A degraded image will be especially noticeable with a stereo image or more channels on a room sound system. They lower the resolution, the more of sound stage you lose. Mp3 have about none, CDs better, HDCDs much better, 24 bit and higher, best.
blackhawk said:
The only possible way to retain full resolution is using the C port and keep the signal in the digital realm (minimum output should be 24/96 khz) to a quality reciever.
Normally Dolby, DTS, HDCD, etc is then decoded by the reciever and brought into the analog realm.
BT LDAC is the best bluetooth option available for this device, but this will degrade the image.
It lacks the bandwidth to fully support 24 bit/48 khz and higher resolutions.
A degraded image will be especially noticeable with a stereo image or more channels on a room sound system. They lower the resolution, the more of sound stage you lose. Mp3 have about none, CDs better, HDCDs much better, 24 bit and higher, best.
Click to expand...
Click to collapse
Alright, so, I bought one of these https://www.amazon.com/dp/B07G2GJFF3/ref=cm_sw_r_cp_apa_fabc_KNVWFbWRMZRWP?_encoding=UTF8&psc=1 hooked it up to my TCL 75Q825 TV, and I was able to get a 4K 30fps connection. My TV has an HDMI ARC channel I use to bitstream audio to my Integra DHC-80.3 reciever so that I get Dolby Digital Plus and DTS output from my Smart TV app's shows and movies, but the Note 20 Ultra will only play 2.1 channels.
So if I directly connected the hdmi adapter to the reciever, and fed the video and audio through there to the TV, would I get the 5.1 channel sound? Or am I misunderstanding what you said and basically you can't really do it?
I'm actually going to be returning the hdmi adapter because I found out that there are better adapters that will allow me to have 4K 60fps from my ultra, but honestly, if I can't get HDR out of it and surround sound, I probably will forget the whole thing.
I'm not for sure what the 20 is outputting in the digital realm. It would need to preserve the digital DTS encryption for it to work. Same for Dolby 5.1
I doubt it will glean these though.
However as long as it outputs 24bit/48khz in the digital realm it will preserve the HDCD encoding subtext (my only interest at this point).
Sorry I never had use for this. The C port digital is how the get the highest possible resolution throughput from it.
The hardware/firmware/software must support formats like Dolby 5.1 or DTS.
Does Sammy even support Dolby 5.1 let alone DTS on this?
Sammy been pretty backward in this respect so I doubt it.
Best I can tell it doesn't.
https://www.samsung.com/us/support/answer/ANS00080318/
blackhawk said:
The only possible way to retain full resolution is using the C port and keep the signal in the digital realm (minimum output should be 24/96 khz) to a quality reciever.
Normally Dolby, DTS, HDCD, etc is then decoded by the reciever and brought into the analog realm.
BT LDAC is the best bluetooth option available for this device, but this will degrade the image.
It lacks the bandwidth to fully support 24 bit/48 khz and higher resolutions.
A degraded image will be especially noticeable with a stereo image or more channels on a room sound system. They lower the resolution, the more of sound stage you lose. Mp3 have about none, CDs better, HDCDs much better, 24 bit and higher, best.
Click to expand...
Click to collapse
blackhawk said:
I'm not for sure what the 20 is outputting in the digital realm. It would need to preserve the digital DTS encryption for it to work. Same for Dolby 5.1
I doubt it will glean these though.
However as long as it outputs 24bit/48khz in the digital realm it will preserve the HDCD encoding subtext (my only interest at this point).
Sorry I never had use for this. The C port digital is how the get the highest possible resolution throughput from it.
The hardware/firmware/software must support formats like Dolby 5.1 or DTS.
Does Sammy even support Dolby 5.1 let alone DTS on this?
Sammy been pretty backward in this respect so I doubt it.
Best I can tell it doesn't.
https://www.samsung.com/us/support/answer/ANS00080318/
Click to expand...
Click to collapse
Alright so this is what confused me about the audio capabilities https://www.samsung.com/us/smartphones/galaxy-note20-5g/specs/ just use find in page and put "Dolby" and you should find the sentence that throws me off. Makes it sound like it can at least decode those formats? From my perspective the whole thing just seems odd, I mean to give a piece of hardware those kind of capabilities, and then not be able to output that to something that could really make use of it, makes those capabilities a bit pointless. But to be fair, I do have a usb-c to aux adapter that allows 32 bit audio to pass from the phone to some high end equipment and I rather like it, just wish there was a way to bitstream that audio so as to have a solid surround sound playback.
dece870717 said:
Alright so this is what confused me about the audio capabilities https://www.samsung.com/us/smartphones/galaxy-note20-5g/specs/ just use find in page and put "Dolby" and you should find the sentence that throws me off. Makes it sound like it can at least decode those formats? From my perspective the whole thing just seems odd, I mean to give a piece of hardware those kind of capabilities, and then not be able to output that to something that could really make use of it, makes those capabilities a bit pointless. But to be fair, I do have a usb-c to aux adapter that allows 32 bit audio to pass from the phone to some high end equipment and I rather like it, just wish there was a way to bitstream that audio so as to have a solid surround sound playback.
Click to expand...
Click to collapse
If you go into the reciever in the digital realm and get a Dolby or DTS indicator light up you got your answer.
Don't think you'll see this but it be cool if you did
By the way for HDCDs you don't need a decoder; a reciever with high resolution DAC(s) will glean 90+% of the subtext and yield around a 22 bit image.
You must stay in the digital realm going in though to preserve that encoding.
Many CDs are HDCDs but not marked as such.
Example: B52's Time Capsule album is an HDCD.
blackhawk said:
If you go into the reciever in the digital realm and get a Dolby or DTS indicator light up you got your answer.
Don't think you'll see this but it be cool if you did
By the way for HDCDs you don't need a decoder; a reciever with high resolution DAC(s) will glean 90+% of the subtext and yield around a 22 bit image.
You must stay in the digital realm going in though to preserve that encoding.
Many CDs are HDCDs but not marked as such.
Example: B52's Time Capsule album is an HDCD.
Click to expand...
Click to collapse
Ok so I tried plugging in the hdmi from the adapter directly into the receiver, when I look at the audio information display from the receiver on that input, it shows as 2ch PCM audio as what's being received, tried different apps on my phone that I thought maybe support Dolby Digital Plus (Vudu, Anywhere Movies, and tried MX Player Pro with a couple movie trailers that contain and able to select Dolby Digital audio) but to no avail. And as I thought about it, I forgot something basic that I should have immediately remembered, I won't be able to get actual Dolby Digital Plus or DTS audio coming through to the receiver unless the phone and/or app allowed/had an option of bitstreaming audio. I was hoping though, that at the very least, the phone could send out 5.1 PCM audio. So either the phone just hasn't been given that ability or I need a certain adapter that would allow it.
It would be really awesome if they made the screen mirroring and/or USB-C outputs of a phone more customizable, like being able to adjust video resolution output, color format, bit depth, and of course audio options with bitstreaming and/or speaker channel options.
Make sure the phone's UHQ Upscaler is enabled/active after hook it up.
blackhawk said:
Make sure the phone's UHQ Upscaler is enabled/active after hook it up.
Click to expand...
Click to collapse
I'll try that when I get home, assuming that option becomes selectable, from what I read that option is for use with headphones, I guess I'll find out if that USB-C connection with the adapter allows it to be enabled. I assume it might, I'm sure my USB-C to aux cord would allow its enablement as that connection would be for headphones as well.
I guess this frustration is what I get for being part of that very tiny minority of audio/video "weirdos", lol. What I see as basic options that should be available considering the hardware capabilities of a device, most phone engineers will never think about.
At one point I had a Denon flagship 7.1 reciever driving all identical THX bookshelf speakers with two 400 watt subwoofers on the mains in a stereo configuration.
Excuse me while I kiss the sky
So... now I have this silly Note 10+
And yes Sammy's engineers have dropped the ball with sound so many times their faces are imprinted on the tarmac. Feel the wuv.
blackhawk said:
Make sure the phone's UHQ Upscaler is enabled/active after hook it up.
Click to expand...
Click to collapse
Was able to and enabled the UHQ Upscaler, checked my receivers audio display info, and what it did was change the sampling rate from 44kHz (or I think it was 48kHz) to 192kHz. It's possible that it also raised the audio bit depth, but my receiver didn't display that info.
Yeah best thing that could be done would be Samsung adding a bitstreaming capability, if it had that, a speaker channel option would be less of an issue, since bitstreaming would carry the speaker channel information built into the audio codec that is bitstreamed.
I would think something like that could be implemented through software alone, as whatever source is sending the audio doesn't need to decode it or anything, it just has to be sent untouched.
dece870717 said:
Alright so this is what confused me about the audio capabilities https://www.samsung.com/us/smartphones/galaxy-note20-5g/specs/ just use find in page and put "Dolby" and you should find the sentence that throws me off. Makes it sound like it can at least decode those formats? From my perspective the whole thing just seems odd, I mean to give a piece of hardware those kind of capabilities, and then not be able to output that to something that could really make use of it, makes those capabilities a bit pointless. But to be fair, I do have a usb-c to aux adapter that allows 32 bit audio to pass from the phone to some high end equipment and I rather like it, just wish there was a way to bitstream that audio so as to have a solid surround sound playback.
Click to expand...
Click to collapse
dece870717 said:
Was able to and enabled the UHQ Upscaler, checked my receivers audio display info, and what it did was change the sampling rate from 44kHz (or I think it was 48kHz) to 192kHz. It's possible that it also raised the audio bit depth, but my receiver didn't display that info.
Yeah best thing that could be done would be Samsung adding a bitstreaming capability, if it had that, a speaker channel option would be less of an issue, since bitstreaming would carry the speaker channel information built into the audio codec that is bitstreamed.
I would think something like that could be implemented through software alone, as whatever source is sending the audio doesn't need to decode it or anything, it just has to be sent untouched.
Click to expand...
Click to collapse
Excellent. It may support up to 32 bit certainly 24 bit.
Never looked into that as my music database is .wav and HDCD files. As long as I have 24 bit throughput they're good to go.
I know I wasn't able to rip DTS audio files to hard drive but since I only had one album at the time I dropped the issue.
The only reason I know as much as I do about HDCDs is Tony Harding at Denon* was kind and generous enough in 2004 to fully explain the technology and how to save/decode them. I have over 200 gb of .wav files on my 10+, my whole CD collection in my hand.
That's pretty cool.
Some of the high end audio sites would be good places to find answers. There are definitely people there that know.
*Denon gives near unconditional product support including hardware and firmware. They are on the bleeding edge of high end home audio.
Dollar for dollar they give you the most bang for the buck.
Their flagship receivers rival those costing thousands more including standalone audiophile products.
There devices always exceed their written specs and they support them for life.
Denon has even have issued hardware/firmware upgrades for their flagship recievers which is unheard of at this price point. They've been a industry innovator for over a century.
Rub up against them and you'll be pleasantly surprised.

Categories

Resources