Hexagon audio addon Elite framework: Custom ADSP Modul cannot be loaded
Issue description on example capi_v2_gain and capi_v2_decimate.
Running capi_v2_gain results in error
QDSP6/Error [ adsp_amdb.cpp 816] AMDB_GET: Failed to get module (0, 0x11111300, 0x0)
QDSP6/Fatal [ pp_topo_handler.cpp 2248] PCCBE PP Failure in module loading, module 0x11111300 failed to load
Following additional tests done:
- capi_v2_decimate example code resulting in equivalent failure as capi_v2_gain
- use RX GAIN (existing module in the original acdb) works as expected
- capi_v2_gain / capi_v2_decimate load at boot time resulting in same failure as on demand
- signer.py -t 0xXXXXXXXX instead of -s MTR37M140094 same failure
- example/calculator using ADSP target working fine
Any idea why is Qualcomm demo example failing?
What must I do to get hexagon audio extension examples working with current tool chain?
Setup:
Qualcomm QCM2290 / Thundercomm TurboX CM2290 Development Kit
Hexagon_SDK/5.2.0.0
Audio addon 1.0.0
Toolchain toolv85_v66
QACT 7.4.22
Test procedure:
1) Create and upload *.so
source $HEXAGON_SDK_ROOT/setup_sdk_env.source
export HEXAGON_TOOLS_ROOT=$DEFAULT_HEXAGON_TOOLS_ROOT
$HEXAGON_SDK_ROOT/utils/scripts/signer.py -s MTR37M140094 -d 0
cd $HEXAGON_SDK_ROOT/addons/audio/elite/examples/capi_v2_gain
make tree V=hexagon_Debug_dynamic_toolv85_v66 VERBOSE=1
adb push hexagon_Debug_toolv85_v66/ship/*.so /vendor/lib/rfsa/adsp/
2) ACDB update with custom topologies and modules
Since in QACT 7.4.22 Parameter Designer cannot be found, audio_gain_calib.xml created
../../tools/h2xml/bin/h2xml -conf ../../tools/h2xml/bin/config_adsp.xml -I ../../incs/audio_gain_calib.h -o .
With short content of AVS file audio_gain_calib.xml:
MODULE name="GAIN_V2_MODULE" id="0x11111300" displayName="AUDIO GAIN" description="Gain in the audio preprocessor path. This module supports the following#[#] parameter IDs GAIN_PARAM_MOD_ENABLE GAIN_PARAM_MASTER_GAIN "
PARAMETER name="GAIN_PARAM_MOD_ENABLE" pid="0x11111301" maxSize="0x4" description="Enables or disables a module."
PARAMETER name="GAIN_PARAM_MASTER_GAIN" pid="0x11111302" maxSize="0x4" description="Gain algorithm. Fixed size for this parameter Version 0 - 4#...
3) Open QACT and connect to device
"Store as" in custom folder:
IDP_Scuba_*_cal.acdb
IDP_Scuba_workspaceFile.qwsp
4) Close device and "Open acdb file on Disc" (IDP_Scuba_workspaceFile.qwsp)
5) Import AVS "audio_gain_calib.xml" using "Module Discovery Wizard"
6) Ad Module using ADSP Module Manager
Module Name: "capi_v2_gain_rx_1"
Interface: "CAPI_V2"
Type: "Generic"
ID1: "0x11111300"
ID2: "0x00000000"
.so File: "capi_v2_gain.so"
Tag1: "capi_v2_gain"
Load Module: On demand
Required (checked)
Processor: ADSP
7) Edit Topology: AUDIO_RX_STEREO_COPP_MBDRV_V4_MFC; Target Topology media player "Music" using headset (GENERAL_PLAYBACK),
Insert custom AUDIO GAIN module an connect it, AUDIO MIC GAIN <- AUDIO GAIN <- AUDIO PBE.
"Store as" in "custom" folder to update
IDP_Scuba_*_cal.acdb
IDP_Scuba_workspaceFile.qwsp
And to create
"adsp_avs_config.acdb"
8) Adb root, remount push content of "custom" into "/vendor/etc/acdbdata/IDP/bengal-scubaidp-snd-card", adb reboot
9) Play music on handset (OK)
10) Plug in headset results in Issue "Failure in module loading" (More details later in post)
QDSP6/Fatal [ pp_topo_handler.cpp 2248] PCCBE PP Failure in module loading, module 0x11111300 failed to load
QDSP6/Fatal [ pp.cpp 583] P%hX PP Failed to initialize Topology!
----------Device Info ----------
Version
Compilation Date = Aug 25 2021
Compilation Time = 14:58:12
Release Date = Mar 01 2021
Release Time = 13:00:00
Version Directory = kamorta.
Station Class Mark = 0
Mobile CAI Revision = Reserved
Mobile Model = 255
Mobile Firmware Revision = 100
Slot Cycle Index = 0
MSM Revision = 0x8501
Build info
BOOT.XF.4.1-00219-KAMORTALAZ-1
TZ.XF.5.1-00917-1
RKQ1.210218.002:6709
MPSS.HA.1.0-00608-KAMORTA_GEN_PACK-2
ADSP.VT.5.4.1-00354-KAMORTA-1
VIDEO.VE.6.0-00041-PROD-1
---------- QXDM Log with Fatal error ----------
QDSP6/Low [AudioStreamMgr_AprIf.cpp 421] AudioStreamMgr:Port=0x101: ISR status 0x0, Basic Ack: 0x1320d , [0x0,0]
QDSP6/High [ AudDevMgr_AprIf.cpp 81] ADM_AprCallBackFct: At 0x4081002 APRCMD 0x1036A ADM rcvd payload size 28
QDSP6/High [ AudDevMgr.cpp 1033] ADM: rcvd APR msg [opcode, dst port] = [0x0001036a, 0x1002]
QDSP6/High [ AudDevMgr.cpp 3876] ADM processing ADM_CMD_DEVICE_OPEN_V8
QDSP6/High [qurt_elite_thread.cpp 200] THRD CREATE: Thread=0x15703c Name(Hex)= 41, 44, 4d, 48, 6c, 70, 72, 30
QDSP6/Low [qurt_elite_queue.cpp 163] Q CREATE: Q=0xb0848e20 NumItems=4
QDSP6/High [ AudDevMgr.cpp 5079] ADM: ADM_CMD_DEVICE_OPEN, dev_num_ch = 2 channel mapping (4 channel maps per value) 0x201,0x0,0x0,0x0,0x0,0x0,0x0,0x0
QDSP6/High [ AudDevMgr_mmpm.cpp 253] Sending ADM MMPM_Request_Ext
QDSP6/High [ AudDevMgr.cpp 4418] ADM: device_perf_mode is [1] & afe_frame_size is [48] & COPP Buffer Num Frames is [1]
QDSP6/High [ AudDevMgr.cpp 4431] ADM: As part of Rx ADM_CMD_DEVICE_OPEN, issuing CREATE_COPP cmd, topologyID: 0x11000003, sampling rate 48000
QDSP6/Error [ AudDevMgr.cpp 9216] ADM: AudPP_CreateSvc EP_ID2 :0xffff and echo_cancel = 0
QDSP6/High [ pp.cpp 358] PP Creating
QDSP6/High [ pp.cpp 3737] P0 PP Service type type = 0x1
QDSP6/High [ pp_set_config.cpp 96] P0 PP Setting buffering out mode = 0x0 in mode 0x0
QDSP6/High [ pp_set_config.cpp 130] P0 PP Setting input sync mode = 0x0.
QDSP6/High [ pp_set_config.cpp 113] P0 PP Setting delivery mode = 0x0.
QDSP6/Low [qurt_elite_queue.cpp 98] Q CREATE: Q=0xb08494b0 NumItems=64
QDSP6/Low [qurt_elite_queue.cpp 98] Q CREATE: Q=0xb0849720 NumItems=32
QDSP6/Low [qurt_elite_queue.cpp 98] Q CREATE: Q=0xb0849890 NumItems=8
QDSP6/Low [qurt_elite_queue.cpp 98] Q CREATE: Q=0xb0849940 NumItems=64
QDSP6/Error [EliteCmnTopology_db.cpp 1343] elite_cmn_topo_db_is_module_present: an active topo_id 11000003 was found with provided bitmask 1. but mod_id 10775 was not found.
QDSP6/Error [EliteCmnTopology_db.cpp 1343] elite_cmn_topo_db_is_module_present: an active topo_id 11000003 was found with provided bitmask 1. but mod_id 1077b was not found.
QDSP6/High [ pp_utils.cpp 704] PCCBE : Sucessfully opened AVtimer driver with result: 0
QDSP6/Error [ pp.cpp 3564] PCCBE PP Topology 11000003 is not present in legacy database
QDSP6/High [EliteCmnTopology_db.cpp 972] elite_cmn_topo_db_get_topology: an active topo_id 11000003 was found with provided bitmask 1. actual_size: 76, handle: 132, node @0xB0842C64, new_ref_count: 2
QDSP6/High [ pp_topo_handler.cpp 2210] P%hX PP Initializing topology begin
QDSP6/High [ adsp_amdb.cpp 1722] AMDB_GET: get modules called (num_modules : 7)
QDSP6/High [ adsp_amdb.cpp 812] AMDB_GET: Module (0, 0x1031f, 0x0) from entry-type 0x30, is_static 1, to_be_loaded 0, interface 2
QDSP6/High [ adsp_amdb.cpp 812] AMDB_GET: Module (0, 0x10943, 0x0) from entry-type 0x30, is_static 1, to_be_loaded 0, interface 2
QDSP6/High [ adsp_amdb.cpp 812] AMDB_GET: Module (0, 0x10c2a, 0x0) from entry-type 0x30, is_static 1, to_be_loaded 0, interface 2
QDSP6/Error [ adsp_amdb.cpp 816] AMDB_GET: Failed to get module (0, 0x11111300, 0x0)
QDSP6/High [ adsp_amdb.cpp 812] AMDB_GET: Module (0, 0x10c35, 0x0) from entry-type 0x30, is_static 1, to_be_loaded 0, interface 2
QDSP6/High [ adsp_amdb.cpp 812] AMDB_GET: Module (0, 0x10719, 0x0) from entry-type 0x30, is_static 1, to_be_loaded 0, interface 2
QDSP6/High [ adsp_amdb.cpp 812] AMDB_GET: Module (0, 0x10912, 0x0) from entry-type 0x30, is_static 1, to_be_loaded 0, interface 2
QDSP6/Fatal [ pp_topo_handler.cpp 2248] PCCBE PP Failure in module loading, module 0x11111300 failed to load
QDSP6/High [ pp_topo_handler.cpp 4907] P%hX PP Topology Destroy End, now freeing Topology.
QDSP6/High [ pp_topo_handler.cpp 2447] P%hX PP Initializing topology End
QDSP6/High [EliteCmnTopology_db.cpp 1163] elite_cmn_topo_db_release_topology: release successful. handle: 132, topo_id: 11000003, new ref_count: 1
QDSP6/Fatal [ pp.cpp 583] P%hX PP Failed to initialize Topology!
QDSP6/High [ pp_utils.cpp 671] PCCBE PP topo(11000003): profiler 0 no samples gathered!
QDSP6/High [ pp_utils.cpp 671] PCCBE PP topo(11000003): profiler 1 no samples gathered!
QDSP6/High [ pp_utils.cpp 671] PCCBE PP topo(11000003): profiler 2 no samples gathered!
QDSP6/High [ pp.cpp 958] P%hX PP Destroy Svc End
QDSP6/Error [ AudDevMgr.cpp 9219] ADM: AudPP_CreateSvc cmd failed, result = 1
QDSP6/Error [ AudDevMgr.cpp 4452] ADM: CREATE COPP cmd failed, result = 1
QDSP6/High [ AudDevMgr.cpp 504] token generated = 0x0
QDSP6/Medium [ AudDevMgr.cpp 9497] ADM: Exiting Helper Thread
Any comments? I have same issue