oss not working with kernel 4.8 [SOLVED]

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: oss not working with kernel 4.8 [SOLVED]

Postby igorzwx » Sun Jan 08, 2017 8:21 pm

merl wrote:Thanks for your reply, igorzwx!
I downloaded the last version with patch via git, but get same errors...
Maybe, it depends on gcc version? My is 6.3.1 20161221


In any case, the git version does not have the closed source driver for your Lynx soundcard.

merl wrote:Sound Card: Lynx L-22
OS: Fedora Linux 25


You need the closed-source package, but it is outdated.

_http://www.opensound.com/download.cgi
The prebuilt packages available for download on this page are licensed under the 4Front Commercial License. These packages contain drivers which are not licensed under the various Open Source license. The packages come with a 1 year time limited license key and a permanant license key that will entitle you to free support and upgrades can be ordered here _http://www.opensound.com/order.html
Please note that the package you download here contains all the soundcard drivers. The software configurator will automatically detect your hardware and install the corrrect driver.


_http://manuals.opensound.com/devlists/lynxtwo.html
_http://manuals.opensound.com/usersguide/lynxtwo.html
_http://manuals.opensound.com/devlists/Linux.html

This forum cannot support the closed source drivers for Lynx soundcards, because they are "closed source".
You may try to contact the developers.

merl
New Member
Posts: 5
Joined: Sun Jan 08, 2017 5:53 am
Sound Card: Lynx L-22
OS: Fedora Linux 25

Re: oss not working with kernel 4.8 [SOLVED]

Postby merl » Mon Jan 09, 2017 5:12 am

Thanks for your time, igorzwx!
I will. :D

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: oss not working with kernel 4.8 [SOLVED]

Postby igorzwx » Mon Jan 09, 2017 10:18 pm

alexdw wrote:Try building from the sources in the git repo: _http://www.opensound.com/
Browse the Open Sound Git Repository: _http://opensound.git.sourceforge.net/git/gitweb.cgi?p=opensound/opensound;a=tree

Get the source code using GIT:

Code: Select all

git clone git://opensound.git.sourceforge.net/gitroot/opensound/opensound


That should have the required patches already applied.


These two patches seem to be already applied:

Code: Select all

 kernel    2016-12-22    Alex Wiggins    [891ddd] Fix runtime problem with Linux kernel 4.8
 setup     2016-12-22    Alex Wiggins    [5d996a] Fix compile problem with Linux kernel 4.6

_https://sourceforge.net/p/opensound/git/ci/master/tree/

The other required patches (from your Arch package) seem to be missing:

Code: Select all

01_linux-4.0.patch
03_ossvermagic.patch
04_gcc-5.patch

_http://ossnext.trueinstruments.com/forum/viewtopic.php?f=3&t=5828

alexdw
Member
Posts: 23
Joined: Sat Jul 06, 2013 12:29 pm

Re: oss not working with kernel 4.8 [SOLVED]

Postby alexdw » Mon Jan 09, 2017 10:26 pm

igorzwx wrote:
alexdw wrote:Try building from the sources in the git repo: _http://www.opensound.com/
Browse the Open Sound Git Repository: _http://opensound.git.sourceforge.net/git/gitweb.cgi?p=opensound/opensound;a=tree

Get the source code using GIT:

Code: Select all

git clone git://opensound.git.sourceforge.net/gitroot/opensound/opensound


That should have the required patches already applied.


These two patches seem to be already applied:

Code: Select all

 kernel    2016-12-22    Alex Wiggins    [891ddd] Fix runtime problem with Linux kernel 4.8
 setup    2016-12-22    Alex Wiggins    [5d996a] Fix compile problem with Linux kernel 4.6

_https://sourceforge.net/p/opensound/git/ci/master/tree/

The other required patches (from your Arch package) seem to be missing:

Code: Select all

01_linux-4.0.patch
03_ossvermagic.patch
04_gcc-5.patch


Thanks for checking. :)

I didn't apply the ossvermagic one as I think it was before I started maintaining the AUR packages so I'm not entirely sure if it's always necessary or Arch-specific. Have you found it was necessary for other LInux distros as well?

The others should be applied; they are in the commit history:
https://sourceforge.net/p/opensound/git ... 8fd93/log/
https://sourceforge.net/p/opensound/git ... 117a61063/
https://sourceforge.net/p/opensound/git ... fb0a37399/

The top-level view only shows the latest commit for the file/directory.

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: oss not working with kernel 4.8 [SOLVED]

Postby igorzwx » Mon Jan 09, 2017 10:50 pm

alexdw wrote:I didn't apply the ossvermagic one as I think it was before I started maintaining the AUR packages so I'm not entirely sure if it's always necessary or Arch-specific. Have you found it was necessary for other Linux distros as well?


It seems that it does not make any harm for Linux Mint. I was ready to believe that it does fix the so-called "soundon issue", although, of course, it should be tested more carefuly
_http://ossnext.trueinstruments.com/forum/viewtopic.php?f=3&t=5828

COMMENTS
_https://aur.archlinux.org/pkgbase/oss/?comments=all

keenerd commented on 2013-11-11 20:51

I'd want the nastiest remaining bugs fixed first.
The two major issues were 'soundon' and the uninstall script.
'soundon' would sometimes take several minutes to finish. (That was isolated to a single line in the soundon script, didn't look deeper.)

toksik commented on 2013-11-14 18:53

The soundon issue seems to be easy to fix:
ossvermagic.patch

alexdw
Member
Posts: 23
Joined: Sat Jul 06, 2013 12:29 pm

Re: oss not working with kernel 4.8 [SOLVED]

Postby alexdw » Mon Jan 09, 2017 11:17 pm

igorzwx wrote:
alexdw wrote:I didn't apply the ossvermagic one as I think it was before I started maintaining the AUR packages so I'm not entirely sure if it's always necessary or Arch-specific. Have you found it was necessary for other Linux distros as well?


It seems that it does not make any harm for Linux Mint. I was ready to believe that it does fix the so-called "soundon issue", although, of course, it should be tested more carefuly
_http://ossnext.trueinstruments.com/forum/viewtopic.php?f=3&t=5828

COMMENTS
_https://aur.archlinux.org/pkgbase/oss/?comments=all

keenerd commented on 2013-11-11 20:51

I'd want the nastiest remaining bugs fixed first.
The two major issues were 'soundon' and the uninstall script.
'soundon' would sometimes take several minutes to finish. (That was isolated to a single line in the soundon script, didn't look deeper.)

toksik commented on 2013-11-14 18:53

The soundon issue seems to be easy to fix:
ossvermagic.patch

I had a quick look at the patch and it appears that it should make that part of the code more robust but as you say it would need some testing and to also look at the patch in the context of the rest of the related code. I guess it would also make sense to check if some of the other older patches are necessary for all Linux distros rather than just for Arch. I think I assumed that they were Arch-specific because some of the kernel patches were applied upstream a couple of years ago:
https://sourceforge.net/p/opensound/git ... 8b33c4376/
If they did they then it would make sense that version 2011 released soon after should have been functional.

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: oss not working with kernel 4.8 [SOLVED]

Postby igorzwx » Mon Jan 09, 2017 11:50 pm

alexdw wrote:I think I assumed that they were Arch-specific because some of the kernel patches were applied upstream a couple of years ago


Some of them might be Arch-specific:

Code: Select all

$ cat soundon.patch | grep Fix
+       # Fix for compatibility with Arch's directory structure
+     # Fix for compatibility with Arch's directory structure


What is the purpose of kmod-link.patch?

igorzwx
Known Member
Posts: 1246
Joined: Sun Jun 28, 2009 9:31 pm

Re: oss not working with kernel 4.8 [SOLVED]

Postby igorzwx » Tue Jan 10, 2017 9:43 pm

kmod-link.patch was designed to fix a sort of "actual bug in OSS":

_https://aur.archlinux.org/pkgbase/oss/?comments=all
toksik commented on 2013-11-11 18:14

I seem to have finally discovered the actual bug in OSS and was able to fix it properly. This removes the dependency on gcc-4.7 and will hopefully allow OSS to be readded to the repo.

The patch below requires setup/Linux/oss/build/osscore.c to be renamed to osscore_wrapper.c (in prepare) and should be applied after all other patches.

Explanation:
When osscore.ko is loaded by running soundon dmesg shows

Code: Select all

osscore: no symbol version for memmove
osscore: Unknown symbol memmove (err -22)


saying two things:

1. The function memmove is called somewhere in the kernel module.
Generally this is fine as the linux kernel provides the function.

What is interesting is that it is never directly called in the OSS codebase. Instead it is GCC that, in newer versions, sometimes generates calls to memmove as part of its code optimization at optimization level "-O3". To be precise it is an assingment in the function setfragment_error in kernel/framework/audio/oss_audio_core.c that gets optimized in this way. GCC's behaviour is correct and even documented in it's man page.

2. Symbol version information for memmove is missing.
The usual way to build a kernel module externally is to use the Makefile provided in /lib/modules/VERSION/build: It takes care of generating symbol version information and linking everything to a .ko kernel module.

This is also what OSS does with it's linux kernel wrapper to generate /lib/oss/build/osscore.ko. What it does then is what causes the problem: The main part of OSS /lib/oss/objects/osscore.o, which unfortunately contains the call to memmove, is linked together with this osscore.ko to /lib/modules/extramodules-VERSION/oss/osscore.ko with a conventional "ld". This of course does not take care of symbol versioning so that it is missing for symbols only used in this main part of OSS.

The fix is to hand both /lib/oss/build/osscore.c (renamed to osscore_wrapper.c to avoid name conflicts) and /lib/oss/objects/osscore.o (copied by install.sh to osscore_mainline.o) over to the provided Makefile that then generates symbol version information for the whole osscore.ko module.

I've successfully tested the patch on x86_64 and i686 with gcc-4.8.2.

Code: Select all

--- setup/Linux/oss/build/install.sh 2013-11-10 20:56:26.182816531 +0100
+++ setup/Linux/oss/build/install.sh 2013-11-10 21:00:08.858276861 +0100
@@ -203,11 +203,8 @@
exit 3
fi

-if ! $LD -r osscore.ko osscore_mainline.o -o /lib/modules/$UNAME/kernel/oss/osscore.ko
-then
- echo Linking the osscore module failed
- exit 5
-fi
+
+cp -f osscore.ko /lib/modules/$UNAME/kernel/oss/osscore.ko

if test -f Module.symvers
then
--- setup/Linux/oss/build/Makefile.osscore 2013-11-10 20:57:25.732493923 +0100
+++ setup/Linux/oss/build/Makefile.osscore 2013-11-10 20:59:46.185066359 +0100
@@ -5,6 +5,7 @@
ifneq ($(KERNELRELEASE),)

obj-m := osscore.o
+ osscore-y := osscore_wrapper.o osscore_mainline.o

else


It seems that kmod-link.patch should be tested with Linux Mint and other distros.

Arch Linux OSS4 packages:
_https://aur.archlinux.org/packages/oss
_https://aur.archlinux.org/packages/oss-git

Code: Select all

$ git clone https://aur.archlinux.org/oss.git
$ git clone https://aur.archlinux.org/oss-git.git


Code: Select all

$ cat kmod-link.patch
--- setup/Linux/oss/build/install.sh   2012-05-22 00:23:41.000000000 +0200
+++ setup/Linux/oss/build/install.sh   2013-11-10 21:00:08.858276861 +0100
@@ -203,11 +203,8 @@
    exit 3
 fi
 
-if ! $LD -r osscore.ko osscore_mainline.o -o /lib/modules/$UNAME/kernel/oss/osscore.ko
-then
-   echo Linking the osscore module failed
-   exit 5
-fi
+
+cp -f osscore.ko /lib/modules/$UNAME/kernel/oss/osscore.ko
 
 if test -f Module.symvers
 then
--- setup/Linux/oss/build/Makefile.osscore   2012-05-22 00:23:41.000000000 +0200
+++ setup/Linux/oss/build/Makefile.osscore   2013-11-14 18:57:44.270163268 +0100
@@ -5,6 +5,7 @@
 ifneq ($(KERNELRELEASE),)
 
    obj-m := osscore.o
+   osscore-y := osscore_wrapper.o osscore_mainline.o
 
 else
 


Return to “Linux”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests