lkml.org 
[lkml]   [1998]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.1.102: Sound driver
I finally got the sound driver working on my PC;  however, it took some
hacking of 'drivers/Makefile'. I was compiling the sound driver as a
module (it's a PnP card), and modprobe was complaining about unresolved
symbols. I tracked them down to 'drivers/sound/lowlevel/init.c', and
discovered that the file wasn't being compiled, much less linked into the
kernel.

It appeared that init.c wanted to be compiled into the kernel, not a
module (am I correct?), since init.o was placed in $(obj-y) and
$(export-objs). After tracing the make process several times, I realized
that the regular kernel build wasn't getting into the sound directory and
therefore, never ran make on the lowlevel directory. The cause seemed
to be the following code in 'drivers/Makefile':

38 ifeq ($(CONFIG_SOUND),y)
39 SUB_DIRS += sound
40 else
41 ifeq ($(CONFIG_SOUND),m)
42 MOD_SUB_DIRS += sound
43 endif
44 endif

If CONFIG_SOUND is 'm', and CONFIG_LOWLEVEL_SOUND is 'y', then
SUB_DIRS should contain 'sound' so that drivers/sound/lowlevel/lowlevel.o
gets compiled into the kernel (not as module). I patched the above code
as follows, and had a successfully built kernel and loaded sound module:

38 ifeq ($(CONFIG_SOUND),y)
39 SUB_DIRS += sound
40 else
41 ifeq ($(CONFIG_SOUND),m)
+ 42 ifeq ($(CONFIG_LOWLEVEL_SOUND),y)
+ 43 SUB_DIRS += sound
+ 44 endif
45 MOD_SUB_DIRS += sound
46 endif
47 endif

Another problem I noticed is that CONFIG_LOWLEVEL_SOUND takes the values
[N/m/?] instead of [N/y/?] when CONFIG_SOUND is 'm'. I had to manually
set it to 'y' in order to compile the lowlevel modules because the
'sound/Makefile' doesn't add 'lowlevel' to the $(SUB_DIRS) list otherwise.
Should this be a 'bool' instead of a 'dep_tristate'?

Thanks,

Geoff Hardy
ghardy@biztravel.com



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.080 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site