LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 08-23-2013, 07:33 PM   #1
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,457
Blog Entries: 14

Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
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
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,245

Rep: Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299
Thanks, ReaperX7. I'll look up this post again when Slackware 14.1 is out.
 
Old 08-26-2013, 06:31 PM   #3
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,457
Blog Entries: 14

Original Poster
Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
Much welcome Dugan.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 03:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration