PhilippeBekaert / snd-hdspe

New linux driver and tools for RME HDSPe sound cards and extension modules
GNU General Public License v3.0
51 stars 18 forks source link

Compilation fails with kernel 5.18/19 #10

Open VennStone opened 2 years ago

VennStone commented 2 years ago

I was tinkering with Debian testing (kernel 5.18) this afternoon and ran across this. Same thing with a self compiled 5.19 + RT patchset.

No plans on switching from Debian 11 anytime soon but though it worth a mention.

That said, the rev1.4 AIO Pro in the studio has been running great on Debian 11 for the past month.

In file included from /home/jackbox/Downloads/snd-hdspe/sound/pci/hdsp/hdspe/hdspe_core.c:38:
/home/jackbox/Downloads/snd-hdspe/sound/pci/hdsp/hdspe/hdspe_core.h:1271:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1271 | extern const char* const hdspe_clock_source_name(struct hdspe* hdspe, int i);
      |        ^~~~~

/home/jackbox/Downloads/snd-hdspe/sound/pci/hdsp/hdspe/hdspe_core.h:1273:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1273 | extern const char* const hdspe_freq_name(enum hdspe_freq f);
      |        ^~~~~

/home/jackbox/Downloads/snd-hdspe/sound/pci/hdsp/hdspe/hdspe_core.c: In function ‘snd_hdspe_create’:
/home/jackbox/Downloads/snd-hdspe/sound/pci/hdsp/hdspe/hdspe_core.c:425:15: error: implicit declaration of function ‘pci_set_dma_mask’ [-Werror=implicit-function-declaration]
  425 |         err = pci_set_dma_mask(pci, DMA_BIT_MASK(32));
      |               ^~~~~~~~~~~~~~~~

/home/jackbox/Downloads/snd-hdspe/sound/pci/hdsp/hdspe/hdspe_core.c:427:23: error: implicit declaration of function ‘pci_set_consistent_dma_mask’ [-Werror=implicit-function-declaration]
  427 |                 err = pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Schroedingers-Cat commented 2 years ago

Looks like some deprecated functions have been removed from the Kernel headers. I've created https://github.com/PhilippeBekaert/snd-hdspe/pull/12 to add compatibility with newer kernels. It's working fine on my system with a HDSPe MADI.