Skip to content

audioreach-driver: fix gpr callback break after const ABI update#55

Merged
quic-aditrath merged 1 commit intoAudioReach:masterfrom
aiyapate:backward_comptibility_workaround
Mar 9, 2026
Merged

audioreach-driver: fix gpr callback break after const ABI update#55
quic-aditrath merged 1 commit intoAudioReach:masterfrom
aiyapate:backward_comptibility_workaround

Conversation

@aiyapate
Copy link
Copy Markdown
Contributor

@aiyapate aiyapate commented Mar 6, 2026

Upstream changed the gpr_port_cb typedef in latest kernel to use 'const struct gpr_resp_pkt *'. Older kernels still use the mutable form. The audioreach-driver callbacks matched the old prototype and failed to compile against newer kernels.

Introduce ar_kcompat.h and a wrapper macro that generates a kernel-facing callback with the correct prototype for the detected kernel version. The real implementation is moved to a const-correct core function.

The driver no longer modifies the incoming GPR packet and instead updates a local copy when needed. This keeps the driver ABI-safe across all supported kernel versions.

@aiyapate aiyapate requested review from a team March 6, 2026 16:12
@aiyapate aiyapate force-pushed the backward_comptibility_workaround branch from b78f089 to 7c2e3d3 Compare March 6, 2026 16:19
@aiyapate aiyapate force-pushed the backward_comptibility_workaround branch 3 times, most recently from c15f715 to 229c904 Compare March 8, 2026 16:14
@aiyapate aiyapate force-pushed the backward_comptibility_workaround branch 2 times, most recently from 2c48fd1 to e87e0d7 Compare March 9, 2026 07:16
@aiyapate aiyapate force-pushed the backward_comptibility_workaround branch from e87e0d7 to bf3676f Compare March 9, 2026 08:52
Upstream changed the gpr_port_cb typedef in latest kernel to use
'const struct gpr_resp_pkt *'. Older kernels still use the
mutable form. The audioreach-driver callbacks matched the old
prototype and failed to compile against newer kernels.

Introduce ar_kcompat.h and a wrapper macro that generates a
kernel-facing callback with the correct prototype for the
detected kernel version. The real implementation is moved to
a const-correct core function.

The driver no longer modifies the incoming GPR packet and
instead updates a local copy when needed. This keeps the
driver ABI-safe across all supported kernel versions.

Signed-off-by: Aiyaz Patel <aiyapate@qti.qualcomm.com>
@aiyapate aiyapate force-pushed the backward_comptibility_workaround branch from bf3676f to 8c27790 Compare March 9, 2026 09:04
@quic-aditrath quic-aditrath merged commit bcf17af into AudioReach:master Mar 9, 2026
11 of 12 checks passed
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.

5 participants