Page 1 of 1
snd_card_create(...) is depricated in 3.16
Posted:
Fri Sep 05, 2014 11:40 pm
by Stoian Ivanov
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"
Re: snd_card_create(...) is depricated in 3.16
Posted:
Wed Nov 12, 2014 1:22 am
by phillipseamore
+1
Re: snd_card_create(...) is depricated in 3.16
Posted:
Wed Nov 12, 2014 11:59 am
by Paul Parsons
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.
Re: snd_card_create(...) is depricated in 3.16
Posted:
Sun Nov 16, 2014 11:11 pm
by phillipseamore
This appears to be fixed in Desktop Video 10.3
This is not fixed.
Re: snd_card_create(...) is depricated in 3.16
Posted:
Fri Nov 21, 2014 10:52 am
by michaelkasch
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
Re: snd_card_create(...) is depricated in 3.16
Posted:
Fri Feb 13, 2015 1:44 am
by phillipseamore
Bumping
Re: snd_card_create(...) is depricated in 3.16
Posted:
Mon Feb 23, 2015 1:01 am
by Yoshan Atukorale
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.