Skip to content

agm: service: fix param_list truncation in ACDB tunnel tag-data path - #129

Open
qti-princeraichura wants to merge 1 commit into
AudioReach:masterfrom
qti-princeraichura:fix-param_list-truncation
Open

qti-princeraichura wants to merge 1 commit into
AudioReach:masterfrom
qti-princeraichura:fix-param_list-truncation

Conversation

@qti-princeraichura

@qti-princeraichura qti-princeraichura commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Commits included:
agm: service: fix param_list truncation in ACDB tunnel tag-data path

CRs-Fixed: 4637358

@qti-princeraichura
qti-princeraichura requested review from a team August 12, 2026 11:42
In graph_get_tckv_data_from_acdb(), param_list holds a list of 32-bit
words [module_instance_id, num_params, param_id] passed to
gsl_get/set_*_data_from_acdb(). It is allocated as
PARAM_LIST_MAX_IDX * sizeof(uint32_t) but was declared uint8_t*, so
the indexed writes truncate each 32-bit field to its low byte. ACDB
is then queried with a corrupt module_instance_id (e.g. 0x0026016e
instead of 0x416e), returns "module instance not found", and the
call fails, breaking Generic Effects Framework reads over the ACDB
tunnel.

Declare param_list as uint32_t* so the fields are written full width.
The (uint8_t *)param_list casts already present at the call sites keep
the gsl API type (uint8_t *) and the GCC 14.2 build clean.

Signed-off-by: Prince Raichura <praichur@qti.qualcomm.com>
@qti-princeraichura
qti-princeraichura force-pushed the fix-param_list-truncation branch from a9b1b69 to 25db136 Compare August 13, 2026 05:31
ffrancis123 pushed a commit to ffrancis123/audioreach-graphmgr that referenced this pull request Sep 3, 2026
graph_get_tckv_data_from_acdb() builds param_list as a list of 32-bit
words [module_instance_id, num_params, param_id] that is handed to
gsl_get/set_*_data_from_acdb(). The GCC 14.2 typecast cleanup
(Change-Id I5af6858005c8a148a76a47677dc32a837e55031b, "agm: service:
fix typecasting issues for GCC 14.2") changed its declaration from
uint32_t* to uint8_t*, which truncates each 32-bit field to its low
byte. The ACDB query is then built with a corrupt module_instance_id
(e.g. 0x0026016e instead of 0x416e), ACDB reports "module instance not
found", and the call fails with -68.

This breaks GEF (Generic Effects Framework) effect reads over the ACDB
tunnel: the catf equalizer test aborts with an uncaught
HALTestSUTException (pal_gef_rw_param failed, returned -68).

Restore param_list to uint32_t* so the fields are written full-width.
The (uint8_t *)param_list casts already present at the gsl_*_from_acdb
call sites keep the GCC 14.2 typecast fix intact.

Tested on hamoa_la (COMPUTE.LA.1.0): the CATF QAL test
pcm_playback_pcm_offload_equalizer_acdb_on_2ch_16bit_48khz_on_spkr.xml
now returns Result=pass; previously it crashed with SIGABRT.

Compilation verified with GCC 14.2 via the upstream AudioReach PR for
the same change (GitHub CI build matrix green):
AudioReach#129

CRs-Fixed: 4637358
Signed-off-by: ffrancis <ffrancis@qti.qualcomm.com>
ffrancis123 pushed a commit to ffrancis123/audioreach-graphmgr that referenced this pull request Sep 3, 2026
graph_get_tckv_data_from_acdb() builds param_list as a list of 32-bit
words [module_instance_id, num_params, param_id] that is handed to
gsl_get/set_*_data_from_acdb(). The GCC 14.2 typecast cleanup
( "agm: service:
fix typecasting issues for GCC 14.2") changed its declaration from
uint32_t* to uint8_t*, which truncates each 32-bit field to its low
byte. The ACDB query is then built with a corrupt module_instance_id
(e.g. 0x0026016e instead of 0x416e), ACDB reports "module instance not
found", and the call fails with -68.

This breaks GEF (Generic Effects Framework) effect reads over the ACDB
tunnel: the catf equalizer test aborts with an uncaught
HALTestSUTException (pal_gef_rw_param failed, returned -68).

Restore param_list to uint32_t* so the fields are written full-width.
The (uint8_t *)param_list casts already present at the gsl_*_from_acdb
call sites keep the GCC 14.2 typecast fix intact.

Tested on hamoa_la (COMPUTE.LA.1.0): the CATF QAL test
pcm_playback_pcm_offload_equalizer_acdb_on_2ch_16bit_48khz_on_spkr.xml
now returns Result=pass; previously it crashed with SIGABRT.

Compilation verified with GCC 14.2 via the upstream AudioReach PR for
the same change (GitHub CI build matrix green):
AudioReach#129

CRs-Fixed: 4637358
Signed-off-by: ffrancis <ffrancis@qti.qualcomm.com>
ffrancis123 pushed a commit to ffrancis123/audioreach-graphmgr that referenced this pull request Sep 3, 2026
graph_get_tckv_data_from_acdb() builds param_list as a list of 32-bit
words [module_instance_id, num_params, param_id] that is handed to
gsl_get/set_*_data_from_acdb(). The GCC 14.2 typecast cleanup
("agm: service:
fix typecasting issues for GCC 14.2") changed its declaration from
uint32_t* to uint8_t*, which truncates each 32-bit field to its low
byte. The ACDB query is then built with a corrupt module_instance_id
(e.g. 0x0026016e instead of 0x416e), ACDB reports "module instance not
found", and the call fails with -68.

This breaks GEF (Generic Effects Framework) effect reads over the ACDB
tunnel: the catf equalizer test aborts with an uncaught
HALTestSUTException (pal_gef_rw_param failed, returned -68).

Restore param_list to uint32_t* so the fields are written full-width.
The (uint8_t *)param_list casts already present at the gsl_*_from_acdb
call sites keep the GCC 14.2 typecast fix intact.

Tested on hamoa_la (COMPUTE.LA.1.0): the CATF QAL test
pcm_playback_pcm_offload_equalizer_acdb_on_2ch_16bit_48khz_on_spkr.xml
now returns Result=pass; previously it crashed with SIGABRT.

Compilation verified with GCC 14.2 via the upstream AudioReach PR for
the same change (GitHub CI build matrix green):
AudioReach#129

Signed-off-by: ffrancis <ffrancis@qti.qualcomm.com>
quic-aditrath pushed a commit that referenced this pull request Sep 12, 2026
graph_get_tckv_data_from_acdb() builds param_list as a list of 32-bit
words [module_instance_id, num_params, param_id] that is handed to
gsl_get/set_*_data_from_acdb(). The GCC 14.2 typecast cleanup
("agm: service:
fix typecasting issues for GCC 14.2") changed its declaration from
uint32_t* to uint8_t*, which truncates each 32-bit field to its low
byte. The ACDB query is then built with a corrupt module_instance_id
(e.g. 0x0026016e instead of 0x416e), ACDB reports "module instance not
found", and the call fails with -68.

This breaks GEF (Generic Effects Framework) effect reads over the ACDB
tunnel: the catf equalizer test aborts with an uncaught
HALTestSUTException (pal_gef_rw_param failed, returned -68).

Restore param_list to uint32_t* so the fields are written full-width.
The (uint8_t *)param_list casts already present at the gsl_*_from_acdb
call sites keep the GCC 14.2 typecast fix intact.

Tested on hamoa_la (COMPUTE.LA.1.0): the CATF QAL test
pcm_playback_pcm_offload_equalizer_acdb_on_2ch_16bit_48khz_on_spkr.xml
now returns Result=pass; previously it crashed with SIGABRT.

Compilation verified with GCC 14.2 via the upstream AudioReach PR for
the same change (GitHub CI build matrix green):
#129

Signed-off-by: Aditya Rathi <aditrath@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant