// SPDX-License-Identifier: GPL-2.0-or-later /* * Support for Digigram AlpX PCI-e boards * * Copyright (c) 2024 Digigram Digital (info@digigram.com) */ #include #include /* Defined an exported symbol to allow dependency use */ const char* SND_ALPX_XDMA_DEP(void) { return "snd_alpx_xdma support"; } EXPORT_SYMBOL(SND_ALPX_XDMA_DEP); /* * Use the in-kernel driver if enabled and recent enough. Otherwise, use the * mainline kernel driver backported locally and improved with cyclic transfers * support (6.7 code) */ #if IS_ENABLED(CONFIG_XILINX_XDMA) && (KERNEL_VERSION(6, 7, 0) <= LINUX_VERSION_CODE) /* EMPTY MODULE !!! */ #include "alpx_version.h" #warning "Use Kernel's XDMA" /* MODULE meta required for build only */ MODULE_DESCRIPTION("AlpX XDMA support module placeholder"); MODULE_AUTHOR("Digigram Digital"); MODULE_VERSION("ALPX_MODULE_VERSION"); MODULE_LICENSE("GPL"); #else /* Need our module BUT with the right version !! */ #if KERNEL_VERSION(6, 3, 0) > LINUX_VERSION_CODE #warning 6.2 #include "core/generic/6.2/xilinx/xdma.c" #elif KERNEL_VERSION(6, 7, 0) > LINUX_VERSION_CODE #warning 6.3 #include "core/generic/6.3/xilinx/xdma.c" #endif #endif /* IS_ENABLED(CONFIG_XILINX_XDMA) && (KERNEL_VERSION(6, 7, 0) >= LINUX_VERSION_CODE) */