snd_card_create(...) is depricated in 3.16

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Stoian Ivanov

  • Posts: 1
  • Joined: Fri Sep 05, 2014 11:16 pm

snd_card_create(...) is depricated in 3.16

PostFri Sep 05, 2014 11:40 pm

Hi all,
As snd_card_create(...) is depricated in 3.16 the drivers fail to build. is there a future release planned fixin this issue?

Mmore info and hint how to convert to the new initialization just google "Re: RFC: snd_card_create() function"
Offline

phillipseamore

  • Posts: 30
  • Joined: Sat Sep 08, 2012 7:24 pm

Re: snd_card_create(...) is depricated in 3.16

PostWed Nov 12, 2014 1:22 am

+1
Offline

Paul Parsons

  • Posts: 27
  • Joined: Wed Apr 30, 2014 10:38 pm

Re: snd_card_create(...) is depricated in 3.16

PostWed Nov 12, 2014 11:59 am

Here is a patch I created which allows the Blackmagic driver to be built against Linux 3.16/3.17:
Code: Select all
diff -ru a/usr/src/blackmagic-io-10.2.2a8/bmio_audio.c b/usr/src/blackmagic-io-10.2.2a8/bmio_audio.c
--- a/usr/src/blackmagic-io-10.2.2a8/bmio_audio.c   2014-10-07 23:31:11.000000000 +0100
+++ b/usr/src/blackmagic-io-10.2.2a8/bmio_audio.c   2014-10-25 11:26:59.663613626 +0100
@@ -25,6 +25,7 @@
 ** -LICENSE-END-
 */
 #include <linux/module.h>
+#include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/wait.h>
 #include <linux/version.h>
@@ -374,7 +375,11 @@
    struct snd_card* card;
    int r;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
    r = snd_card_create(-1, "BlackmagicIO", THIS_MODULE, 0, &card);
+#else
+   r = snd_card_new(&aud->drv->pci->pdev->dev, -1, "BlackmagicIO", THIS_MODULE, 0, &card);
+#endif
    if (r < 0)
       return r;
 

Its functionality is completely untested since I don't use the snd_blackmagic-io.ko module.
Offline

phillipseamore

  • Posts: 30
  • Joined: Sat Sep 08, 2012 7:24 pm

Re: snd_card_create(...) is depricated in 3.16

PostSun Nov 16, 2014 11:11 pm

This appears to be fixed in Desktop Video 10.3

This is not fixed.
Last edited by phillipseamore on Mon Dec 22, 2014 9:55 pm, edited 1 time in total.
Offline

michaelkasch

  • Posts: 1
  • Joined: Fri Nov 21, 2014 10:50 am

Re: snd_card_create(...) is depricated in 3.16

PostFri Nov 21, 2014 10:52 am

I cannot confirm this is fixed in 10.3 still get this error with 10.3.1

Code: Select all
cat /var/lib/dkms/blackmagic-io/10.3.1a5/build/make.log
DKMS make.log for blackmagic-io-10.3.1a5 for kernel 3.16.0-4-amd64 (x86_64)
Fr 21. Nov 11:05:10 CET 2014
make -C /lib/modules/3.16.0-4-amd64/build M=/var/lib/dkms/blackmagic-io/10.3.1a5/build
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-amd64'
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
  LD      /var/lib/dkms/blackmagic-io/10.3.1a5/build/built-in.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_client.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_dev.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_driver.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_serial.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_export.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bm_locks.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bm_mm.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bm_pci.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bm_util.o
  CC [M]  /var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_audio.o
/var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_audio.c: In function ‘bmio_audio_init_sound_card’:
/var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_audio.c:377:2: error: implicit declaration of function ‘snd_card_create’ [-Werror=implicit-function-declaration]
  r = snd_card_create(-1, "BlackmagicIO", THIS_MODULE, 0, &card);
  ^
cc1: some warnings being treated as errors
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for target '/var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_audio.o' failed
make[4]: *** [/var/lib/dkms/blackmagic-io/10.3.1a5/build/bmio_audio.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/var/lib/dkms/blackmagic-io/10.3.1a5/build' failed
make[3]: *** [_module_/var/lib/dkms/blackmagic-io/10.3.1a5/build] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:47: recipe for target 'all' failed
make: *** [all] Error 2
Offline

phillipseamore

  • Posts: 30
  • Joined: Sat Sep 08, 2012 7:24 pm

Re: snd_card_create(...) is depricated in 3.16

PostFri Feb 13, 2015 1:44 am

Bumping
Offline

Yoshan Atukorale

Blackmagic Design

  • Posts: 3
  • Joined: Mon Feb 23, 2015 12:30 am

Re: snd_card_create(...) is depricated in 3.16

PostMon Feb 23, 2015 1:01 am

Thank you for your post. This is an issue that we are aware of and it will be fixed in a future release of the Desktop Video driver package.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests