LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-23-2013, 07:33 PM   #1
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Exclamation Patches for OSSv4 and Slackware kernels 3.8 or later


Source: http://www.opensound.com/forum/viewf...e6da274046e470

Kernels after 3.8.x changed something in how OSSv4 works with newer kernels:

The following patches were collected from 4Front's Linux forums for your usage in Slackware if needed and for fixing the SlackBuilds post-installation of the OSS 4.2.2008 package.

(Should also work for 4.2.2007 also)

Code:
--- setup/Linux/oss/build/pci_wrapper.inc	2009-08-27 05:19:07.000000000 +0300
+++ setup/Linux/oss/build/pci_wrapper.inc	2013-02-08 13:56:10.519794975 +0200
@@ -17,7 +17,11 @@
 static dev_map_t dev_map[MAX_INSTANCE];
 static int n_devmap = 0;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
 static int __devinit
+#else
+static int
+#endif
 osspci_probe (struct pci_dev *pcidev, const struct pci_device_id *pciid)
 {
   oss_device_t *osdev;
@@ -65,7 +69,11 @@
   return 0;
 }
 
-static void __devexit
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+static int __devexit
+#else
+static int
+#endif
 osspci_remove (struct pci_dev *pcidev)
 {
   int i;
@@ -80,10 +88,11 @@
 	pci_disable_device (dev_map[i].pcidev);
 	osdev_delete (osdev);
 
-	return;
+	return 0;
       }
 
   printk (KERN_ALERT DRIVER_NICK ": Can't find the PCI device to detach\n");
+  return -EIO;
 }
 
 void
Code:
--- setup/Linux/oss/build/osscore.c   2012-05-22 00:23:41.000000000 +0200
+++ newCore.c   2013-06-02 01:00:16.187019464 +0200
@@ -276,28 +276,59 @@
   return strlen (tmp);
}

+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
static struct file_operations oss_proc_operations = {
   .read = oss_read_devfiles,
};
+#else
+static struct file_operations fops = {
+ .owner = THIS_MODULE,
+ .read = oss_read_devfiles,
+};
+#endif
+
 static void
init_proc_fs (void)
{
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+
   if ((oss_proc_root =
-       create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
+         create_proc_entry ("opensound", 0700 | S_IFDIR, NULL)) == NULL)
+     {
+         oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
+         return;
+     }
+
+  if ((oss_proc_devfiles =
+        create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
+     {
+         oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
+         return;
+     }
+
+  oss_proc_devfiles->proc_fops = &oss_proc_operations;
+
+#else
+
+  if ((oss_proc_root =
+         proc_mkdir ("opensound", NULL)) == NULL )
     {
-      oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
-      return;
+   oss_cmn_err (CE_CONT, "Cannot create /proc/opensound\n");
+   return;
     }

    if ((oss_proc_devfiles =
-       create_proc_entry ("devfiles", 0600, oss_proc_root)) == NULL)
+   proc_create ("devfiles", 0600, oss_proc_root, &fops)) == NULL)
     {
-      oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
-      return;
+   oss_cmn_err (CE_CONT, "Cannot create /proc/opensound/devfiles\n");
+         return;
     }

-  oss_proc_devfiles->proc_fops = &oss_proc_operations;
+#endif
+
}

static void
Code:
--- setup/Linux/oss/build/osscore.c	2012-05-22 00:23:41.000000000 +0200
+++ setup/Linux/oss/build/osscore.c	2013-07-20 21:47:18.294007175 +0200
@@ -953,7 +984,9 @@
   fop->llseek = oss_no_llseek;
   fop->read = tmp_read;
   fop->write = tmp_write;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
   fop->readdir = NULL;		/* tmp_readdir; */
+#endif
   fop->poll = tmp_poll;
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,35)
   fop->ioctl = tmp_ioctl;
Once you've installed the SlackBuild and followed the other instructions to disable ALSA and blacklist the ALSA modules, you'll need to navigate to the directory:

/usr/lib64/oss/build

...and apply said patches to allow the "soundon" script to properly work.

The patches were taken from various sources including ArchLinux's repository so you may need to rework the patches to work with the SlackBuilds or apply them by hand.

Last edited by ReaperX7; 08-23-2013 at 07:40 PM.
 
Old 08-25-2013, 02:49 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,235

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Thanks, ReaperX7. I'll look up this post again when Slackware 14.1 is out.
 
Old 08-26-2013, 06:31 PM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Much welcome Dugan.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Assertion `kernels [x] == kernels [x]' failed with emulator in Slackware 14 Holering Slackware 1 05-10-2013 03:43 PM
Where to submit patches for Slackware? websafe Slackware 6 05-27-2008 03:26 AM
Naming convention of patches (& kernels as well) eg -rc, -mm, -rc-mm etc sudhirkumar Linux - Kernel 6 08-29-2007 05:43 AM
patches for a release version or slackware/slackware-ver.#/patches acummings Slackware 2 07-05-2007 01:05 AM
Installing Slackware Patches Vampirite Slackware 4 11-21-2005 09:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration