-
Notifications
You must be signed in to change notification settings - Fork 30
Silent load failure on Unisoc UIS8581A / sp9863a audio HAL (Android 10) #131
Description
Device Information
Device: ATOTO A6G2A7PF automotive head unit
Chipset: Unisoc UIS8581A (sp9863a)
Android 10 / API 29 / 32-bit userspace
V4A RE version: 0.6.1 Magisk module
Root: Magisk (boot image patch, A-only device)
Issue
After installing the V4A RE Magisk module, the driver is silently rejected by audioflinger with zero error output. The app reports "No Driver Found."
What works correctly
Module installs cleanly with no bootloop
libv4a_re.so present in /vendor/lib/soundfx/ and /vendor/lib64/soundfx/
audio_effects.conf and audio_effects.xml both patched correctly with correct UUID 90380da3-8536-4744-a6a3-5731970e640f
JamesDSP (libjamesdsp.so) loads and works fine on this same HAL
All standard AOSP effects load fine (bundle, reverb, visualizer, downmix)
dumpsys media.audio_flinger (relevant excerpt)
Libraries NOT loaded:
Libraries loaded:
Library jdsp
path: /vendor/lib/soundfx/libjamesdsp.so
JamesDSP v4.01 / James Fung
UUID: f27317f4-c984-4de6-9a90-545759495bf2
...
Library audio_pre_processing
Library dynamics_processing
Library loudness_enhancer
Library downmix
Library visualizer
Library reverb
libv4a_re appears under "Libraries NOT loaded" with no error message logged at any log level.
Audio HAL stack
/vendor/lib/hw/audio.primary.sp9863a.so
/vendor/lib/hw/android.hardware.audio.effect@5.0-impl.so
/vendor/lib/libsprdaudiohalv5.so
/vendor/lib/libsprdaudiohalv5@5.0.so
Root cause analysis
Comparing exported symbols between libv4a_re.so and libjamesdsp.so using readelf -s:
JamesDSP exports exactly one global symbol:
AELI (section 16 - standard data segment)
V4A RE exports AELI plus hundreds of C++ mangled symbols with default visibility:
AELI (section 21 - different segment)
- _ZN5ViPERC2Ev, _ZN12ViperContext... (hundreds of internal symbols)
Both libraries have AELI present, but V4A RE's AELI lands in a different ELF section than JamesDSP's. The Unisoc sp9863a HAL appears to do stricter ELF section validation than the AOSP reference HAL, silently rejecting the library when AELI is not in the expected segment.
Suspected fix
Recompile libv4a_re.so with:
-fvisibility=hidden to hide internal C++ symbols
-fvisibility-inlines-hidden
Linker script adjustment to place AELI in the correct ELF section matching JamesDSP's layout
Target: arm-linux-androideabi, API 29, NDK r21
Attached
libv4a_re.so pulled directly from /vendor/lib/soundfx/ on device
libjamesdsp.so pulled directly from /vendor/lib/soundfx/ on device
These can be used for direct readelf comparison.