Skip to content

audioreach-driver: Guard MODULE_IMPORT_NS(DMA_BUF) for kernel < 6.13#64

Merged
quic-aditrath merged 1 commit into
AudioReach:masterfrom
quic-aditrath:ar_kernel_6.6_fix
Jul 2, 2026
Merged

audioreach-driver: Guard MODULE_IMPORT_NS(DMA_BUF) for kernel < 6.13#64
quic-aditrath merged 1 commit into
AudioReach:masterfrom
quic-aditrath:ar_kernel_6.6_fix

Conversation

@quic-aditrath

@quic-aditrath quic-aditrath commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The MODULE_IMPORT_NS macro changed its argument syntax in kernel 6.13. Before 6.13 it takes an unquoted token (MODULE_IMPORT_NS(DMA_BUF)); from 6.13 onwards it requires a quoted string
(MODULE_IMPORT_NS("DMA_BUF")). Building audioreach_driver against a pre-6.13 kernel with the quoted form causes a modpost failure because the namespace import is not recognised, and the build rejects the module.

Add AR_MODULE_IMPORT_NS to ar_kcompat.h, selecting the correct form at compile time via LINUX_VERSION_CODE. Replace the bare MODULE_IMPORT_NS("DMA_BUF") in q6apm_audio_mem.c, with AR_MODULE_IMPORT_NS(DMA_BUF).

Kernel change reference:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cdd30ebb1b9f36159d66f088b61aee264e649d7a

@quic-aditrath quic-aditrath requested review from a team June 30, 2026 09:00
The MODULE_IMPORT_NS macro changed its argument syntax in kernel 6.13.
Before 6.13 it takes an unquoted token (MODULE_IMPORT_NS(DMA_BUF));
from 6.13 onwards it requires a quoted string
(MODULE_IMPORT_NS("DMA_BUF")). Building audioreach_driver against a
pre-6.13 kernel with the quoted form causes a modpost failure because
the namespace import is not recognised, and the build rejects the
module.

Add AR_MODULE_IMPORT_NS to ar_kcompat.h, selecting the correct form
at compile time via LINUX_VERSION_CODE. Replace the bare
MODULE_IMPORT_NS("DMA_BUF") in q6apm_audio_mem.c, with
AR_MODULE_IMPORT_NS(DMA_BUF).

Signed-off-by: Aditya Rathi <aditrath@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 a532b21 into AudioReach:master Jul 2, 2026
13 of 14 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.

4 participants