Hi Folks,
Finally got things working using GCC-3.4.3. The alsa module snd-usb-audio will not under any circumstances compile with GCC-4.0.2. Also, on kernel versions <= 2.6.14, the following patch (I will upload this to the patches section immediately) is needed in order for the modules in the generic drivers section (snd-virmidi is one of these) to compile cleanly. Anyone who needs these drivers will need to compile alsa from the alsa-drivers-1.0.10 package , unless they can figure out a way to apply the patch to the kernel sources (I suppose that you would just go into the alsa-drivers section of the kernel sources and apply the patch there instead, but I haven't tried that and have spent ridiculous amounts of time recompiling the kernel lately, so I'm not going to just yet).
To be honest, I think that the blfs policy regarding the alsa-drivers should be to compile them from packages rather that compiling them directly into the kernel. This probably seems retrograde so I'll give my reasons:

1.   It's easier and safer to patch a single package than to patch the linux kernel.
2.   All of the alsa packages should be synced to avoid compatibility problems.
3.   Most people who use soft-synths need the snd-virmidi module. The snd-seq-dummy module works in some case but is notoriously unreliable and a lot of applications (Muse, Csound, for eg.) refuse to use it. It is needed for applications that don't show up in the alsa-sequencer list (again, Csound is one of these). This module is just a case in point - there are probably others which currently have problems, and there will certainly be others in the future, as alsa development continues to stampede ahead of  kernel versions. The patch is  for kernel versions <= 2.6.14, so presumably alsa development is being done on the 2.6.15 bleeding edge.
4.   It's just one extra page and all the neces sary information is here.
 
When compiling the kernel, one should turn on CONFIG_SOUND=y (or m, although as the blfs policy is to minimise kernel modularity let's say yes here). Turn off OSS and ALSA. From the alsa-drivers-1.0.10 directory:

patch -Np1 -i ../alsa-driver-1.0.10-platform_device_compat_<=2.6.14-1.patch &&
./configure --with-sequencer=yes --with-oss=yes --with-cards=your,cards,comma,separated &&
make

if compilation is clean:
make install
 
Here is the patch:

Subject: [PATCH] Fix platform_driver emulation for kernels <= 2.6.14

The platform_driver_register() substitute in alsa-driver-1.0.10 sets
drv->driver.probe and drv->driver.remove functions without checking for
non-NULL drv->probe and drv->remove; snd_platform_driver_probe() and
snd_platform_driver_remove() also do not check for NULL in those fields.
However, snd_generic_driver has NULL ->probe and ->remove functions,
therefore attempts to use it on kernels <= 2.6.14 lead to oopses.

This patch changes platform_driver_register() provided by alsa-driver
for old kernels to match the implementation in post-2.6.14 kernels,
which checks for NULL ->probe and ->remove functions.

Signed-off-by: Sergey Vlasov <[EMAIL PROTECTED]>

--- alsa-driver-1.0.10/include/platform_device_compat.h.alt-platform_device_compat    2005-11-14 17:42:27 +0300
+++ alsa-driver-1.0.10/include/platform_device_compat.h    2005-12-03 23:01:26 +0300
@@ -61,8 +61,10 @@
 static inline int platform_driver_register(struct platform_driver *drv)
 {
     drv->driver.bus = &platform_bus_type;
-    drv->driver.probe = snd_platform_driver_probe;
-    drv->driver.remove = snd_platform_driver_remove;
+    if (drv->probe)
+        drv->driver.probe = snd_platform_driver_probe;
+    if (drv->remove)
+        drv->driver.remove = snd_platform_driver_remove;
     if (drv->suspend)
         drv->driver.suspend = snd_platform_driver_suspend;
     if (drv->resume)

Hope that this saves some hassle,
Jonathan


Find your next car at Yahoo! Canada Autos
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to