Rep: (204)
* Notarikon , In no way is this characteristic for version 9 of the android



Rep: (204)
* Spider88 , this is the same thing, since the processor works only on 32-bit architecture; without a linker, they are dummies

Post has been editedRoman_city - 25.05.19, 12:50



Rep: (204)
* Spider88 , they don’t work, the only way to open 64bit is through a virtually launched image on 32, but here it’s useless to discuss it



Rep: (204)
* Spider88 what nonsense, add libraries without what controls them)



Rep: (204)
* XxImsxX , 64 on 32 you will not start



Rep: (204)
* maksim2000smotra , not



Rep: (204)
* maksim2000smotra , hp filter, low cut



Rep: (204)
* papadim1002 , mb headphones do not support codec



Rep: (204)
* Billycandle , 255 for old firmware, there is sound because it does not exist. In new versions, the parameter has long been replaced by 4.
Sound problems due to non-support or device not coping



Rep: (204)
Modification and improvement of sound quality android | Modification and improvement of sound quality android

Android: 4.0+

This topic was created to improve and enhance the sound characteristics of android devices, where everything is described in detail from simple actions in build.prop, ending with the introduction of third-party audio libraries into your smartphone.

I will update the topic in the course of time

For all actions, you will need to have root rights

Sampling and audio bitrate
Go to /system/etc/audio_policy.conf
Responsible for the sound from the speaker and headphones
Find the strings
audio_hw_modules {
primary {
outputs {
primary {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE | AUDIO_DEVICE_OUT_ALL_SCO | AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_PRIMARY
}
}


Bluetooth headset settings
Find the strings
a2dp {
outputs {
a2dp {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
}

We change the parameters, the higher the better the sound quality, some of the system may not pull and there will be a cod or the sound will disappear, then set the values ​​below.
Start by raising the bit rate, then increase the frequency of discrimination
For their entry into force, you will need to restart
Responsible for the frequency of the discrimination of audio, change to48000 96000 192000 384000 576000 768000576000,768000 for pc versions of androids
sampling_rates 48000
It happens that the system does not support 24 and works 8_24 instead.
If a weak amplifier is built in, the sound may become very quiet but it will not stutter (it is not possible to raise the volume level, even programmatically)
Responsible for audio bitmap
formats AUDIO_FORMAT_PCM_16_BIT

List of formats, by quality
AUDIO_FORMAT_PCM_16_BIT
AUDIO_FORMAT_PCM_24_BIT
AUDIO_FORMAT_PCM_24_BIT_PACKED
AUDIO_FORMAT_PCM_8_24_BIT
AUDIO_FORMAT_PCM_32_BIT
Configure /system/etc/audio_policy.conf
Optional functions, but in some devices the filter is already inserted and there will be no sound without it.
They may or may not work if there is no sound.
The code is inserted into the function.outputs, right afterprimary
samling_ratesandformatsshould be the same as inprimary(some may have lost sound, then do not install above 16/48)

Audio output flags
AUDIO_OUTPUT_FLAG_PRIMARY (primary audio output, used as standard on most devices)
AUDIO_OUTPUT_FLAG_DEEP_BUFFER (Deep Buffer)
AUDIO_OUTPUT_FLAG_FAST (fast audio output)

Filter, can positively and nadotivno affect the sound (not all will work)
fast {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE
flags AUDIO_OUTPUT_FLAG_FAST
}


Filter flags
AUDIO_OUTPUT_FLAG_FAST
AUDIO_OUTPUT_FLAG_RAW
AUDIO_OUTPUT_FLAG_SLOW
AUDIO_OUTPUT_FLAG_WAV

Deep buffer
If the primary buffer flag is already enabled, then this is not necessary.
deep_buffer {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
}


Compression in the headphone output is better not to use at all, there will be a loss in quality
For a2dp profile it is sometimes useful
compress_offload {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_MONO
formats AUDIO_FORMAT_FLAC
devices AUDIO_DEVICE_OUT_EARPIECE
flags AUDIO_OUTPUT_FLAG_DIRECT
}

The list of audio compression formats from the highest to the lowest quality (this is not the entire list, but the most normal ones) (not all will be supported)
AUDIO_FORMAT_FLAC
AUDIO_FORMAT_ALAC
AUDIO_FORMAT_APE
AUDIO_FORMAT_VORBIS
AUDIO_FORMAT_WMA
AUDIO_FORMAT_WMA_PRO
AUDIO_FORMAT_MP3

Flags for compression
AUDIO_OUTPUT_FLAG_DIRECT (direct audio output)
AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD (compresses the discharge at the output)
AUDIO_OUTPUT_FLAG_NON_BLOCKING (audio output is not blocked)
Connecting 64 bit audio library instead of 32 bit
Make sure that lib64 has a folder and files in soundfx.
Log in /system/etc/audio_effects.conf
And change lib to lib64
/system/etc/audio_effects.conf
bundle {
path /system/lib64/soundfx/libbundlewrapper.so
}
reverb {
path /system/lib64/soundfx/libreverbwrapper.so
}
visualizer {
path /system/lib64/soundfx/libvisualizer.so
}
downmix {
path /system/lib64/soundfx/libdownmix.so
}
loudness_enhancer {
path /system/lib64/soundfx/libldnhncr.so
}
ALSA driver, its installation and configuration
In some devices this library is already installed, you can check in / system / bin alsa_ctl files should be alsa_aplay alsa_amixer (/system/lib/libasound.so sometimes only a library without binaries)
Installation
To run use the codeenter in the terminal
#! / system / bin / sh
mount -o rw, remount / system
mkdir / system / etc / alsa
chmod 0755 / system / etc / alsa
f = / system / etc / alsa / $ (cat /proc/asound/card0/id).state
alsa_ctl -f $ f store
chmod 0644 / system / etc / alsa / *
alsa_ctl -f $ f restore
mount -o ro, remount / system

Expand all files in folders from the archive, and give permission
Edit file permissions
/ bin / alsa_amixer 0755
/ bin / alsa_aplay 0755
/ bin / alsa_ctl 0755
/lib/libasound.so 0644
/ usr / share / alsa // all folders 0755, all files in the alsa 0644 folder

Driver for 32/64 bit processors:Attached filealsa_32bit.zip(405.16 KB)
(Restriction androyd from 4 to 6 above will not work)

Supplement put in / system / lib / hw with rights 0644 (can both positively and negatively affect the sound):Attached filealsa.default.so.zip(12.96 KB)


Ready script to run alsa:Attached filealsa.sh.zip(272 bytes)


# Non-standard
It has a high-quality audio processing algorithm.
Install with replacement, if this library is available in /system/lib/libasound.so, if it is not useless (perhaps there is an effect, but not sure) there should be no alsa binaries in / system / bin, otherwise the sound will disappear from the backup library,make a copy of the original for safety :)
Samsung GS8 + asound library:Attached filealsa_asound_sgs8 + .zip(262.15 KB)

Check ALSA works or not
Enter the code in the terminal
mount -o rw, remount / system
mkdir / system / etc / alsa
chmod 0755 / system / etc / alsa
f = / system / etc / alsa / $ (cat /proc/asound/card0/id).state
alsa_ctl -f $ f store
chmod 0644 / system / etc / alsa / *

The /system/etc/alsa/map_map.state file appears in the folder.
Then enter this command
alsa_ctl -f $ f restore
The sound will disappear for a while after it is turned on again, then the library is connected (if the sound does not appear, connect and disconnect the headphones)

Instructions for setting up ALSA

Third-party (ported) sound libraries
All audio libraries are usually stored in / system / lib (lib64) / soundfx
A list of standard effects with a description:
/libaudiopreprocessing.so
Audio pre-processing - processing of unprocessed sound before applying effects, cleaning bad areas and overloads in a track after alignment and normalizing sound to a specified level.
/libbundlewrapper.so
Low Frequency Amplifier and Normalizer
/libdownmix.so
Convert multichannel sound to dual channel
/libldnhncr.so
Enriching the stereo image of the incoming sound
/libreverbwrapper.so
Reverberation
/libvisualizer.so
Responsible for displaying visualization
Setting and connecting audio libraries
Connecting libraries using the example of a standard bass amplifier, the library is in libraries {up to closing brackets}
1. The line is responsible for the name and opens with a bracket.
2. String library location
3. Closing the function
With the library, there are unique uuid effects (sometimes they are not), added to effects {}
1. String effect name
2. The string name of the library that was written above.
3. String with uuid
4. Closing effect

libraries {

bundle {
path /system/lib64/soundfx/libbundlewrapper.so
}
}
effects {

bassboost {
library bundle
uuid 8631f300-72e2-11df-b57e-0002a5d5c51b
}
}



Standard (improved), superior to most libraries in processing quality
Just put the replacement in / system / lib / soundfxassigning them the right 0644
For 64 bit, check both, the sound is very different
Library list:
/libbundlewrapper.so
/libldnhncr.so
/libreverbwrapper.so
/libdownmix.so

They work on both 32 two and 64 bit processors:Attached filestandard_32bit.zip(83.28 KB)


Libraries put in / system / lib64 / soundfx with replacement
For 64 bit processors:Attached filestandard_64bit.zip(80.33 KB)


Adapted libraries to optimize sound for 32/64 bit processors
Libraries took from 6 androids, but should work on the versions below, since they are universal
IMPORTANT make backup system partition can not guarantee 100% of the libraries (the phone may hang on the eternal animation) , you can go through one by one and watch how the smartphone behaves
Installation: transfer all libraries with replacement to / system / lib and give rights0644
You can simplify the process of editing rights
su# get root
mount -o rw, remount / system# translation of the system partition in the record
chmod 0644 /system/lib/*.so# change of rights

Library list:
/libaudioflinger.so
/libaudioresampler.so
/libaudiospdif.so
/libaudioutils.so
/libeffects.so
/libinput.so
/libinputflinger.so
/libsonic.so
/libsonivox.so
/libsoundtrigger.so
/libspeexresampler.so
/libwebrtc_audio_coding.so
/libwebrtc_audio_preprocessing.so


In general, increases the overall volume, clarity, bass.
Attached fileaudio_engine.zip(1.24 MB)


Samsung Galaxy S8 audio engine port
Beats Libraries
Sound effects port
Codecs from SONY, Samsung and other devices
Useful information
Restart the interface, so as not to wait for a long reboot, the changes also take effect
su
am restart
Sound modifications
useful links


Post has been editedderak1129 - 28.04.19, 04:18
Reason for editing: Making sound at the flagship level.



Rep: (204)
* geptik , problem in / lib / soundfx libraries
Or the wrong audio_effects.xml, which is unlikely



Rep: (204)
* Martin H3 , dpwnmix converts multichannel sound to two channels with uniform distribution to the left and right channel of the signal

Post has been editedRoman_city - 13.04.19, 23:06



Rep: (204)
* shuchvadim , uuid is what the system will pull this lib for

Post has been editedRoman_city - 05.04.19, 01:11



Rep: (204)
* Bond17 3d effect



Rep: (204)
* maksim2000smotra , for 2.3 is not suitable for api 20 libraries



Rep: (204)
* tory_ad , with a pin through av, if without tunnel. You can immediately all false



Rep: (204)
Audio Tweaks build.prop
Post updated

All devices
Unloading
It is a parameter that removes the load from the processor and sends a signal to the DSP on not very powerful phones and I recommend that you turn on the unloading option without a DAC (it’s possible the manufacturers also enabled these options hardvar), thereby equalizing the frequency response (the operations that DSP performs on the sound will be much better than the processor) and the sound will be much nicer than with DSP disabled. Actually, DSP options can also be enabled on devices with a DAC, again the alignment of the frequency response, which significantly affect the sound quality.

# Leave that one enabled, either tunnel or av (recommend tunnel)
# Disabling tunnel coding can improve sound
tunnel.audio.encode = true
#Uploading audio
av.offload.enable = false

# Download audio to video
audio.offload.video = true
# Unload track
audio.offload.track.enable = false

# Multiple audio downloads
# Audio through-feed
audio.offload.multiple.enabled = false
audio.offload.passthrough = false


# Increases audio buffer
audio.offload.buffer.size.kb = 32

Other
# Implementation of the resampler
af.resampler.quality = 4
0 - DEFAULT_QUALITY
1 - LOW_QUALITY
2 - MED_QUALITY
3 - HIGH_QUALITY
4 - VERY_HIGH_QUALITY

# Makes the sound warmer
ro.audio.hifi = true
persist.audio.hifi = false
persist.audio.hifi.volume = 73


# Turns on music through a deep buffer
audio.deep_buffer.media = true

# Client buffer size for fast audio tracks \\ to use together in audio_hal
af.fast_track_multiplier = 1
# Low frame delay buffer size
audio_hal.period_size = 192

# Turn on gaples mod
audio.offload.gapless.enabled = true

QCOM processors
# Sound density
## fluencetype can be "fluence" or "fluencepro" or "none"
ro.qc.sdk.audio.fluencetype = fluence
persist.audio.fluence.voicecall = true
persist.audio.fluence.voicerec = false
persist.audio.fluence.speaker = true


# Parsing audio
# 628925 Decimal sum after removing DTS parser flag
# 628989 Decimal sum after removing AC3 parser flag
# 628991 Decimal sum after removing AIFF parser flag
# 891135 Decimal sum after removing MKV parser flag
# 892159 Decimal sum after removing OGG parser flag
# 908543 Decimal sum after removing MP3 parser flag
# 916735 Decimal sum after removing 3GP and 3G2 parser flag
# 917503 Decimal sum after removing FLAC parser flag
# 185971 is decimal sum of supported parsers in AAL
# 37491 is decimal sum of supported codecs in AAL
#codecs: (PARSER_) AAC AC3 AMR_NB AMR_WB ASF AVI DTS FLV 3GP 3G2 MKV MP2PS MP2TS MP3 OGG QCP WAV FLAC AIFF APE
mm.enable.qcom_parser = 185971
persist.mm.enable.prefetch = true


# 3 typessmd , rome , cherokee The second and third will not work for everyone, if so the bluetooth does not turn on
#system prop for Bluetooth SOC type
qcom.bluetooth.soc = rome
#system prop for wipower support
ro.bluetooth.wipower = true
#Set this true as ROME which is programmed
#as embedded wipower mode by deafult
ro.bluetooth.embРјmode = true


MTK processors
#MTK_AUDIO_BLOUD_CUSTOMPARAMETER, V1-V5
ro.mtk_audio_tuning_tool_ver = V5


Post has been editedRoman_city - 03.03.19, 19:29
Reason for editing: DSP



Rep: (204)
* radiantor , unloading the processor and sending to the DSP



Rep: (204)
* radiantor everywhere

Posted on 03/03/2019, 13:36:

* papadim1002 , yes, from wiki google it added to reduce power consumption



Rep: (204)
* radiantor ,
Audio tunneling takes an encoded sound source and sends it to the DSP to optimize decoding and sound reproduction, if enabled

Post has been editedRoman_city - 03.03.19, 13:29

Full version

Help     rules

Now: 08/16/19, 04:36