77 Commits

Author SHA1 Message Date
02d5796d3a Revert "dolby: Use new method to listen for preference changes"
This reverts commit 2ac524b54c.
2026-01-09 15:04:14 +09:00
Bruno Martins
c0de818eba dolby: Apply Expressive theme
Change-Id: I03c814b97c8401428f2b358d065a99503df9d1cc
2026-01-02 08:32:29 +09:00
Bruno Martins
4609a70e95 dolby: Convert for M3E support
Change-Id: Ib4d1088f5be3fc2b5c2ff90d5cd1b86603551037
2026-01-02 08:32:29 +09:00
Bruno Martins
2ac524b54c dolby: Use new method to listen for preference changes
Usage of addOnSwitchChangeListener(OnCheckedChangeListener) is
deprecated. The Javadoc explicitly says:

  Use setOnPreferenceChangeListener(OnPreferenceChangeListener) instead.

Change-Id: I71e0e3f86ff339a312cac1e09106f6d5d15b7e43
Signed-off-by: basamaryan <basam.aryan@gmail.com>
2026-01-02 08:32:29 +09:00
f42bd8b0b0 dolby: Move to PreferenceFragmentCompat
PreferenceFragment was deprecated in API level 28.

https://developer.android.com/jetpack/androidx/releases/preference#1.1.0

Change-Id: Ie8a4b04bd588afbbbc5882349ddbc05f988f80bf
Signed-off-by: AnierinB <anierin@evolution-x.org>
Signed-off-by: basamaryan <basam.aryan@gmail.com>
2026-01-02 08:32:29 +09:00
3e5a418ec2 Revert "dolby: Implement DSPVolumeSynchronizer"
* DSPVolumeSynchronizer is already in Evolution-X-Devices/hardware/xiaomi

This reverts commit 23662b74ac.
2025-12-05 14:15:55 +00:00
Pranav Vashi
a87374584b dolby: Update layout to material expressive design
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-09-16 14:52:27 +09:00
swiitchOFF
823cb93c6e dolby: Update readme 2025-08-29 09:47:11 +05:30
someone5678
298cc0e0a2 dolby: Create missing dolby related directory 2025-08-29 09:36:28 +05:30
swiitchOFF
9bb5037bc0 dolby: Patch vendor.dolby.media.c2@1.0-service with libshim_dolby
08-25 13:26:29.598  1006  1006 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 1006 (vendor.dolby.me), pid 1006 (vendor.dolby.me)
08-25 13:26:29.731  3084  3084 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-25 13:26:29.731  3084  3084 F DEBUG   : crDroid Version: '11.8'
08-25 13:26:29.731  3084  3084 F DEBUG   : Build fingerprint: 'Xiaomi/vili/vili:14/UKQ1.231207.002/V816.0.10.0.UKDMIXM:user/release-keys'
08-25 13:26:29.731  3084  3084 F DEBUG   : Revision: '0'
08-25 13:26:29.731  3084  3084 F DEBUG   : ABI: 'arm64'
08-25 13:26:29.731  3084  3084 F DEBUG   : Timestamp: 2025-08-25 13:26:29.665897496+0530
08-25 13:26:29.731  3084  3084 F DEBUG   : Process uptime: 10s
08-25 13:26:29.731  3084  3084 F DEBUG   : Cmdline: /vendor/bin/hw/vendor.dolby.media.c2@1.0-service
08-25 13:26:29.731  3084  3084 F DEBUG   : pid: 1006, tid: 1006, name: vendor.dolby.me  >>> /vendor/bin/hw/vendor.dolby.media.c2@1.0-service <<<
08-25 13:26:29.731  3084  3084 F DEBUG   : uid: 1046
08-25 13:26:29.731  3084  3084 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
08-25 13:26:29.731  3084  3084 F DEBUG   : Cause: null pointer dereference
08-25 13:26:29.731  3084  3084 F DEBUG   :     x0  b400006f05b52fc0  x1  0000007fc905ed10  x2  0000006f45b59a90  x3  0000007fc905ecd8
08-25 13:26:29.731  3084  3084 F DEBUG   :     x4  0000000000000028  x5  0200006ef5b52470  x6  0000000000000000  x7  0000000000000000
08-25 13:26:29.731  3084  3084 F DEBUG   :     x8  00000000ffffffff  x9  00000000eff00000  x10 0000006fe69e4fa4  x11 0000000012b97fad
08-25 13:26:29.731  3084  3084 F DEBUG   :     x12 0000000000028003  x13 b400006ef5b528e0  x14 0000000000000024  x15 000000000000005f
08-25 13:26:29.731  3084  3084 F DEBUG   :     x16 0000006fe5ebd230  x17 0000006fede1ca84  x18 0000006fef730000  x19 0000000000000000
08-25 13:26:29.731  3084  3084 F DEBUG   :     x20 b400006f05b52eb0  x21 0000006d55852090  x22 0000006fef2fff00  x23 0000000000000000
08-25 13:26:29.731  3084  3084 F DEBUG   :     x24 0000006fef2fff00  x25 b400006d55b59140  x26 0000000000000001  x27 0000000000000000
08-25 13:26:29.731  3084  3084 F DEBUG   :     x28 0000000000000000  x29 0000007fc905ece0
08-25 13:26:29.731  3084  3084 F DEBUG   :     lr  0000006fe5e915f4  sp  0000007fc905ece0  pc  0000006fede1caa0  pst 0000000080001000
08-25 13:26:29.731  3084  3084 F DEBUG   : 7 total frames
08-25 13:26:29.731  3084  3084 F DEBUG   : backtrace:
08-25 13:26:29.731  3084  3084 F DEBUG   :       #00 pc 0000000000010aa0  /vendor/lib64/libutils.so (android::RefBase::decStrong(void const*) const+28) (BuildId: 2fd112063e39cb6f651b185f9e6234f2)
08-25 13:26:29.731  3084  3084 F DEBUG   :       #01 pc 00000000000515f0  /vendor/lib64/android.hardware.media.c2@1.0.so (android::hardware::media::c2::V1_0::BnHwComponentStore::_hidl_createInterface(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+376) (BuildId: f0d25f49428387d313920490e7ec7c8c)
08-25 13:26:29.731  3084  3084 F DEBUG   :       #02 pc 00000000000525f0  /vendor/lib64/android.hardware.media.c2@1.0.so (android::hardware::media::c2::V1_0::BnHwComponentStore::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+1004) (BuildId: f0d25f49428387d313920490e7ec7c8c)
08-25 13:26:29.731  3084  3084 F DEBUG   :       #03 pc 000000000008ab7c  /vendor/lib64/libhidlbase.so (android::hardware::BHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+92) (BuildId: 1d845c84de7e27fc2c78f04ee8f4aae0)
08-25 13:26:29.731  3084  3084 F DEBUG   :       #04 pc 0000000000042eac  /vendor/lib64/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+1344) (BuildId: 1d845c84de7e27fc2c78f04ee8f4aae0)
08-25 13:26:29.731  3084  3084 F DEBUG   :       #05 pc 000000000000124c  /vendor/bin/hw/vendor.dolby.media.c2@1.0-service (main+500) (BuildId: 394e52c5b5064b9f64c91bd2d615f078)
08-25 13:26:29.731  3084  3084 F DEBUG   :       #06 pc 0000000000055160  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+116) (BuildId: b310372d5ddccd24fca9f3a465bff80c)

Co-Authored-By: ZiadTamer <ziadtamer150@gmail.com>
Signed-off-by: swiitchOFF <120115258+swiitchOFF@users.noreply.github.com>
2025-08-25 16:31:42 +05:30
swiitchOFF
0c9ddc4349 dolby: configs: Enable ac4
* Sony Dolby Atmos have working ac4 on Tidal/Hotstar
2025-08-22 13:27:38 +05:30
Pranav Vashi
9034fe64c9 dolby: Fix compilation error in TooltipIconButton
Fixes: TooltipIconButton.kt:30:44: error: unresolved reference: rememberPlainTooltipPositionProvider

Change-Id: I7554622a406f4a56dc8471a39cbd4ad73c0daede
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-05-27 15:16:47 +05:30
Bruno Martins
ff98f55a64 dolby: Migrate MainSwitchBar and Switch to Material3
This follows Settings style updates for Android U.

Change-Id: Id6d3e7f193b6ef9fa6419d164265062328eb9170
2025-05-27 14:52:43 +05:30
Abhay Singh Gill
d520bfc991 dolby: DolbyManager: Add custom profile
Signed-off-by: Abhay Singh Gill <abhaygill017@gmail.com>
2025-05-27 14:52:37 +05:30
Abhay Singh Gill
898b66db90 dolby: DolbyManager: Add icons for dolby profiles
Also nuke voice profile and fixup some strings.

Signed-off-by: Abhay Singh Gill <abhaygill017@gmail.com>
2025-05-27 14:52:32 +05:30
Abhay Singh Gill
ba30d4f198 dolby: DolbyManager: Make bass enhancer available on speakers as well
Signed-off-by: Abhay Singh Gill <abhaygill017@gmail.com>
2025-05-27 14:52:24 +05:30
Sarthak Roy
756f07541f dolby: DolbyManager: Fix building in Android 15
Change-Id: Ie4e312bce0232c7a55ed2c29c8442f886f5aabd9
2025-05-27 14:52:16 +05:30
Adithya R
8d1f1dec6f dolby: DolbyManager: Add intelligent equalizer setting
Move preference-related classes to a new package while we're at it,
to reduce code clutter.
Also fix graphical equlizer

Change-Id: I2430e8ab9b6758503ce1777ec985a3e400b55b8e
2025-05-27 14:52:05 +05:30
Aditya R
708d38f721 dolby: Switch to DolbyManager
Based on existing dirac implementation and observing stock
sound effects app and daxservice.

History -
- Allow bass enhancer to use in speaker also
- Remove deprecated PlainTooltipBox
- Fix build with kotlinc 1.9.0
- Add launcher icon
- Introduce graphical equalizer
- Do not set volume leveler amount
- Restore all settings upon bootup
- Rewrite in Kotlin
- Restore dolby profile on audio changes
- Guard debug logging
- Implement profile-specific Dolby settings
- Remove play/pause hack while toggling Dolby
- Set proper summary for dolby settings
- Always refresh playback if status changed
- Introduce Dolby Atmos

Co-authored-by: Henrique Silva <jhenrique09.mcz@hotmail.com>
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Co-authored-by: Fabian Leutenegger <fabian.leutenegger@bluewin.ch>
Co-authored-by: basamaryan <basam.aryan@gmail.com>
Co-authored-by: Ghosuto <clash.raja10@gmail.com>
2025-05-27 14:51:19 +05:30
swiitchOFF
5d570a07fe dolby: Kill XiaomiDolby 2025-05-27 14:46:27 +05:30
swiitchOFF
7a34fbab8f dolby: Update readme 2025-05-12 20:12:05 +05:30
swiitchOFF
80dde88580 dolby: configs: Rework on dax-default 2025-05-03 21:45:59 +05:30
Adithya R
b78ed962c9 dolby: Properly update profile preference summary
When profile is changed to known from unknown, the preference didn't
get updated.

Change-Id: Ic5e41f8c853187272d00178c7de02551f16350f9
2025-05-01 08:36:58 +05:30
Adithya R
0aa344b92c dolby: Add support for Custom profile
This appears to be present in all devices' dolby configurations.

Change-Id: I651a5f0f64144bbda6de863989043f9daf40b213
2025-05-01 08:36:29 +05:30
Adithya R
21b1b920de dolby: Make sure to persist value after toggling QS tile
Toggling the switch pref automatically sets the shared pref for us, but
toggling the QS tile does no such thing so we gotta do it ourselves.

Change-Id: Iac881ed654bf4eb76b111fc87667f16476d11522
2025-05-01 08:35:42 +05:30
Fabian Leutenegger
97abb34497 dolby: Update EqualizerScreen background color for 15
Switch to MaterialTheme settingsBackground for EqualizerScreen background color

Change-Id: I546e3528814276eb857a650cb6c173d914550fb5
2025-05-01 08:35:36 +05:30
swiitchOFF
f102f6b9b0 Revert "dolby: DolbyManager: Fix building in Android 15"
This reverts commit efb871f672.
2025-05-01 08:35:03 +05:30
swiitchOFF
caedc60497 dolby: Update readme 2025-04-30 11:11:25 +05:30
Pranav Vashi
97387bcbb5 dolby: Fix compilation error in TooltipIconButton
Fixes: TooltipIconButton.kt:30:44: error: unresolved reference: rememberPlainTooltipPositionProvider

Change-Id: I7554622a406f4a56dc8471a39cbd4ad73c0daede
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-04-30 11:07:24 +05:30
swiitchOFF
e33ef72395 dolby: Enable ELF checks for libspatialaudio 2025-03-30 23:22:04 +05:30
New Author Name
6cc96db8d4 dolby: Link dolby blobs against v33 libstagefright_foundation
* fixes crashes and absurdly high CPU usage while using dolby

Co-authored-by: Woomymy <woomy@woomy.be>
2025-03-30 23:21:30 +05:30
swiitchOFF
6a92f5625e dolby: Enable elf checks
* Properly link dolby libs against v33 libstagefright_foundation
2025-03-26 06:29:52 +05:30
New Author Name
5bddfe4ab8 dolby: configs: Kang dax-default from https://github.com/reiryuki/Dolby-Atmos-Sony-Xperia-5-V-Magisk-Module 2025-03-25 20:01:31 +05:30
New Author Name
a6202e7f90 dolby: Switch to Sony Dolby Atmos
* Based on c2 audio decoders

Co-Authored-By: Saku <saku-bruh@proton.me>
Co-Authored-By: ahnet-69 <syedmusicrealise@gmail.com>
Co-Authored-By: HELLBOY017 <abhaygill017@gmail.com>
Signed-off-by: swiitchOFF <120115258+swiitchOFF@users.noreply.github.com>
2025-03-12 18:44:06 +05:30
New Author Name
00d74c76bc dolby: Apply NLSound 4.1
Ref:
https://github.com/Briclyaz/NLSound_module_QCom

Applied with slight modification:
sed -i 's/<mi-dv-leveler-steering-enable value="true"/<mi-dv-leveler-steering-enable value="false"/g' dax-default.xml
sed -i 's/<mi-ieq-steering-enable value="true"/<mi-ieq-steering-enable value="false"/g' dax-default.xml
sed -i 's/<mi-surround-compressor-steering-enable value="true"/<mi-surround-compressor-steering-enable value="false"/g' dax-default.xml
sed -i 's/<mi-adaptive-virtualizer-steering-enable value="true"/<mi-adaptive-virtualizer-steering-enable value="false"/g' dax-default.xml
sed -i 's/<reverb-suppression-enable value="true"/<reverb-suppression-enable value="false"/g' dax-default.xml
sed -i 's/<mi-dialog-enhancer-steering-enable value="true"/<mi-dialog-enhancer-steering-enable value="false"/g' dax-default.xml
sed -i 's/<dialog-enhancer-enable value="true"/<dialog-enhancer-enable value="false"/g' dax-default.xml
sed -i 's/<mi-virtualizer-binaural-steering-enable value="true"/<mi-virtualizer-binaural-steering-enable value="false"/g' dax-default.xml
sed -i 's/<peak-value value=".*"/<peak-value value="256"/g' dax-default.xml
sed -i 's/<surround-decoder-enable value="true"/<surround-decoder-enable value="false"/g' dax-default.xml
sed -i 's/<hearing-protection-enable value="true"/<hearing-protection-enable value="false"/g' dax-default.xml
sed -i 's/<volume-leveler-enable value="true"/<volume-leveler-enable value="false"/g' dax-default.xml
sed -i 's/<height-filter-mode value=".*"/<height-filter-mode value="0"/g' dax-default.xml
sed -i 's/<volume-leveler-compressor-enable value="true"/<volume-leveler-compressor-enable value="false"/g' dax-default.xml
sed -i 's/<complex-equalizer-enable value="true"/<complex-equalizer-enable value="false"/g' dax-default.xml
sed -i 's/<regulator-enable value="true"/<volume-leveler-enable value="false"/g' dax-default.xml
sed -i 's/<regulator-speaker-dist-enable value="true"/<regulator-speaker-dist-enable value="false"/g' dax-default.xml
sed -i 's/<regulator-sibilance-suppress-enable value="true"/<regulator-sibilance-suppress-enable value="false"/g' dax-default.xml
sed -i 's/bass-mbdrc-enable value="true"/bass-mbdrc-enable value="false"/g' dax-default.xml
sed -i 's/threshold_low=".*" threshold_high=".*"/threshold_low="0" threshold_high="0"/g' dax-default.xml
sed -i 's/isolated_band="true"/isolated_band="false"/g' dax-default.xml
sed -i '/endpoint_type="headphone"/,/<\/tuning>/s/<audio-optimizer-enable value="true"/<audio-optimizer-enable value="false"/g' dax-default.xml
sed -i '/<output-mode>/,/<\/output-mode>/d' dax-default.xml
sed -i '/<mix_matrix>/,/<\/output-mode>/d' dax-default.xml

Change-Id: I7d699d38d602abda322b414bdd718857a0bbaaa8
2025-01-29 03:49:45 +05:30
Alcatraz323
23662b74ac dolby: Implement DSPVolumeSynchronizer
Some Xiaomi devices have a speaker that needs a framework to cooperate
with DSP to synchronize volume so that the DSP can limit bass when the
volume is high to prevent distortion.

Change-Id: I750803d94161e1e7482552d2a39566f42e82fc0a
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-01-23 04:50:45 +05:30
Pranav Vashi
65d7336949 dolby: Exempt installing package in clone or private space
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-01-08 06:13:35 +05:30
New Author Name
0befa6aa8c dolby: Update profiles overlay for moto dolby
Change-Id: Ided92625cb73f530656e86929b3ba70fea1e940d
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-12-27 19:30:37 +05:30
New Author Name
6d89341732 dolby: XiaomiDolby: Make bass enhancer available on speakers as well
Signed-off-by: Abhay Singh Gill <abhaygill017@gmail.com>
2024-12-26 15:22:45 +05:30
swiitchOFF
f5fb608d13 dolby: Feels better
[1]: cleanup and organize
[2]: using patched blobs from here 40faff25cd
2024-12-26 15:22:08 +05:30
swiitchOFF
6cc95d2a09 dolby: Update Credits 2024-12-09 22:12:54 +05:30
New Author Name
048d3bfbe3 dolby: Initialized Spatial Audio
Signed-off-by: userariii <abhattacharjee717@gmail.com>
Signed-off-by: swiitchOFF <120115258+swiitchOFF@users.noreply.github.com>
2024-12-06 12:32:59 +05:30
swiitchOFF
fac9089afd dolby: Sorry LDAC & LHDC
mistake beef2e28a1
2024-12-06 12:32:53 +05:30
swiitchOFF
724f607cb8 dolby: configs: Switch back to CN dax-default
[1]: Also Forcefully disable volume leveler
2024-12-03 05:39:47 +05:30
johnmart19
da758a7873 dolby: configs: Enable bass-enhancer for Headphones, Speakers, and "Other" devices
Original commit:
d6e99e9cd1

Change-Id: If32d0e1c2ddad5d8668c83bfbfcd04c36fa80552
Signed-off-by: someone5678 <nemui3353@gmail.com>
2024-11-25 19:20:34 +05:30
New Author Name
a54c599e2b dolby: configs: Forcefully disable volume leveler
sed -i "/volume-leveler-enable/ s/true/false/g" configs/audio/dax-default.xml

Change-Id: I7ceb29291a9e55036d57975f5a28a149c7fcb435
2024-11-25 17:31:31 +05:30
New Author Name
9c8b952778 dolby: Replace nuwa libs with Moto
* Also Kill nuwa Dolby spatial audio support
2024-11-25 17:31:09 +05:30
New Author Name
9bce0718c3 dolby: overlay: Add empty Dolby specific frameworks overlay 2024-11-24 13:52:15 +05:30
New Author Name
4401819065 dolby: Update readme 2024-11-22 01:05:46 +05:30
New Author Name
6fe60d867d dolby: Update from nuwa V14.0.9.0.UMBEUXM
* Also Import 32-bit blobs
2024-11-22 01:05:32 +05:30