Skip to content

audioreach-driver: use dev_set_dma_coherent() in q6apm probe#66

Merged
quic-aditrath merged 1 commit into
AudioReach:masterfrom
aiyapate:compilation_fix
Jul 15, 2026
Merged

audioreach-driver: use dev_set_dma_coherent() in q6apm probe#66
quic-aditrath merged 1 commit into
AudioReach:masterfrom
aiyapate:compilation_fix

Conversation

@aiyapate

@aiyapate aiyapate commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This PR adds a small compatibility wrapper for DMA coherent handling in audioreach-driver by introducing AR_SET_DMA_COHERENT(dev) in ar_kcompat.h and using it in q6apm_audio_mem_probe(). For kernel >= 7.2.0, it calls dev_set_dma_coherent(dev); for older kernels, it keeps the legacy dev->dma_coherent = true behavior.

The goal is to fix newer-kernel build failures (struct device no longer has direct dma_coherent field access) while preserving compatibility and behavior on older kernels.

@aiyapate
aiyapate requested review from a team July 14, 2026 17:43

@nandamajay nandamajay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Wrap dma_coherent handling behind AR_SET_DMA_COHERENT().

For kernel >= 7.2.0, use dev_set_dma_coherent(dev).
For older kernels, keep dev->dma_coherent = true.

This fixes build failures on newer kernels where struct
device no longer exposes dma_coherent as a direct field
("no member named dma_coherent"), while keeping older
kernel compatibility.

Signed-off-by: Aiyaz Patel <aiyapate@qti.qualcomm.com>

@nandamajay nandamajay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@quic-aditrath
quic-aditrath merged commit 6adfec6 into AudioReach:master Jul 15, 2026
13 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