请问一个alsa在ml上的编译问题.
alsa 1.0.10的 core 里出现一个CONFIG_CREATE_WORKQUEUE_FLAGS for Aurox distro
代码是 acore/misc.inc
#ifdef CONFIG_CREATE_WORKQUEUE_FLAGS
#include <linux/workqueue.h>
struct workqueue_struct *snd_compat_create_workqueue2(const char *name)
{
return create_workqueue(name, 0);
}
#endif
请问是什么东西干吗用的
在我机子上这里编译通不过 ( `create_workqueue' undeclared (first use in this function)
我用的是2.6.9这个老内核
------------------------------------------
In file included from /home/czy/tmp/alsa/alsa-driver-1.0.10/acore/misc.c:77:
/home/czy/tmp/alsa/alsa-driver-1.0.10/acore/misc.inc:494:33: macro "create_workqueue" passed 2 arguments, but takes just 1
In file included from /home/czy/tmp/alsa/alsa-driver-1.0.10/acore/misc.c:77:
/home/czy/tmp/alsa/alsa-driver-1.0.10/acore/misc.inc: In function `snd_compat_create_workqueue2':
/home/czy/tmp/alsa/alsa-driver-1.0.10/acore/misc.inc:494: error: `create_workqueue' undeclared (first use in this function)
/home/czy/tmp/alsa/alsa-driver-1.0.10/acore/misc.inc:494: error: (Each undeclared identifier is reported only once
/home/czy/tmp/alsa/alsa-driver-1.0.10/acore/misc.inc:494: error: for each function it appears in.)
make: *** 错误 1
make: *** 错误 2
make: *** 错误 2 include/adriver.h里有这样的定义
#ifdef CONFIG_CREATE_WORKQUEUE_FLAGS
#include <linux/workqueue.h>
#undef create_workqueue
struct workqueue_struct *snd_compat_create_workqueue2(const char *name);
#define create_workqueue(name) snd_compat_create_workqueue2(name)
#endif
是说 create_workqueue 这个函数多了一个 参数??
我把misc.inc 里的改成这样?? 这样编译是通得过的
-----------------------------------------------
#ifdef CONFIG_CREATE_WORKQUEUE_FLAGS
#include <linux/workqueue.h>
struct workqueue_struct *snd_compat_create_workqueue2(const char *name)
{
return create_workqueue(name);
}
#endif
--------------------------------------------------------- alsa 这种驱动,是依赖内核的。
尤其是 2.6.11 (好象是)以后 Kernel 修改了很多接口的定义。
页:
[1]