Using the Open Sound System⁠ OSS4 instead of ALSA in Buster.

Here you can discuss every aspect of Debian. Note: not for support requests!

Using the Open Sound System⁠ OSS4 instead of ALSA in Buster.

Postby kedaha » 2019-07-14 08:37

I'm posting this topic for anyone who might be interested in OSS4, which I, for one, have always used in preference to ALSA/Pulseaudio system since Debian 6 (Squeeze) on account of its⁠—for my sound card at least⁠—excellent sound quality and low latency.

OSS4 has been available in the main repository up to Debian 8 (Jessie) but was not available in Debian 9 (Stretch). To judge from the Developer_Information page, OSS4 on Debian has been at a standstill since oldoldstable; however, a new upstream version is available: 4.2-build2019. I hope that this version becomes available in unstable whence it might be backported to stable and be available without having to build it oneself.

I recently installed two Debian 10 (Buster) systems; one with GNOME Desktop 3.30 and the other with the Mate Desktop Environment.

Now I'm trying to build OSSv4 from source by following the upstream Wiki_page instructions but have run into a snag, which I'm working on. For the time being, in order to use OSS4 immediately with the Mate Desktop in Buster, I've simply installed the Linux 2.6/3.x/4.x(amd64)Deb available here and it works really well. I would also like to disable pulseaudio, but this is necessary for Firefox I will post again if and when I'm able to successfully build OSS4 either from the gpl'd upstream source or from the older 4.2-build2017-1 version currently available in sid.

Thank you for reading.
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2906
Joined: 2008-05-24 12:26

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby Head_on_a_Stick » 2019-07-14 10:56

kedaha wrote:Now I'm trying to build OSSv4 from source by following the upstream Wiki_page instructions but have run into a snag, which I'm working on.

Looks like it needs some patches to work with recent kernels:

https://aur.archlinux.org/packages/oss/#comment-695271

I've just built buster versions of the sid packages in my OBS repository if that helps at all:

https://build.opensuse.org/package/bina ... /Debian_10

Note that only a limited range of hardware is supported though: https://github.com/galaxy001/oss/blob/m ... ists/Linux

kedaha wrote:I would also like to disable pulseaudio, but this is necessary for Firefox

Not if you're using the firefox-esr package from the Debian repositories, that is built with the --enable-alsa option and so does not need PA for sound to work.
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby Deb-fan » 2019-07-14 11:22

^ Read pulseaudio is a dependency of many major DE's too? I've never really learned much about gnu/nix audio. Sound works reasonably well, I'm happy and don't have to fixy. Have pretty much resigned myself to pulseaudio. Glad not everyone has though. Was just looking OSS over the other day cause people here were having audio issues.

Anyone with experience want to post up about sound quality comparisons between these? Alsa/oss/pulseaudio? Would be interested in terms of system resource use of one combo or stand alone of these VS the others too. Interesting OP, thanks for posting.
Deb-fan
 
Posts: 246
Joined: 2012-08-14 12:27

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby sunrat » 2019-07-14 11:39

I've heard OSS is good but never been dissatisfied enough with default sound to try it. One of the major issues I believe with PulseAudio is its default resampling which was not able to be circumvented up to and including Stretch with PA10. A new config option was introduced in PA11 which allows sound to be played without resampling and Buster has PA12.
Set this in /etc/pulse/daemon.conf :
Code: Select all
avoid-resampling = yes


By all means try OSS if you want, but Pulse should be less crap in Buster.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2753
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby Deb-fan » 2019-07-14 11:54

@Sunrat, thanks too. Good to know. :)
Deb-fan
 
Posts: 246
Joined: 2012-08-14 12:27

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby kedaha » 2019-07-14 15:45

Head_on_a_Stick wrote:
kedaha wrote:Now I'm trying to build OSSv4 from source by following the upstream Wiki_page instructions but have run into a snag, which I'm working on.

Looks like it needs some patches to work with recent kernels:

https://aur.archlinux.org/packages/oss/#comment-695271

I think so although the new OSS v4.2 Build 2019 is announced to have added support for Linux 4.15 and later kernels.But the fact that the downloadable Linux 2.6/3.x/4.x(amd64) deb works out of the box is promising.

Head_on_a_Stick wrote:I've just built buster versions of the sid packages in my OBS repository if that helps at all:

Thanks a lot. I tried them but got no audio from with my particular sound card; however, I may have missed something so I'll give them another go some time.
Head_on_a_Stick wrote:
kedaha wrote:I would also like to disable pulseaudio, but this is necessary for Firefox

Not if you're using the firefox-esr package from the Debian repositories, that is built with the --enable-alsa option and so does not need PA for sound to work.

Removing pulseaudio and associated packages resulted in no OSS4 sound in Firefox-esr and Chromium so I had to reinstall it and edit /etc/pulse/default.pa as detailed here.
Thanks sunrat and Deb-fan for your comments.
Deb-fan wrote: Read pulseaudio is a dependency of many major DE's too? I've never really learned much about gnu/nix audio. Sound works reasonably well, I'm happy and don't have to fix. Have pretty much resigned myself to pulseaudio. Glad not everyone has though. Was just looking OSS over the other day cause people here were having audio issues.

I would definitely prefer to use OSS4 without Pulseaudio; it's easy enough, at least in Mate, to remove pulseaudio but there is just no sound at all from Firefox-esr and Chromium.
Deb-fan wrote:Anyone with experience want to post up about sound quality comparisons between these? Alsa/oss/pulseaudio? Would be interested in terms of system resource use of one combo or stand alone of these VS the others too. Interesting OP, thanks for posting.

In my opinion OSS4 sound quality is superb, but I think anyone interested should simply try it and see, or rather hear, for themself.
All I did to use it on my Mate Desktop was to remove alsa-utils and edit the pulseaudio configuration file as referenced above, download and install, using gdebi the Linux 2.6/3.x/4.x(amd64)Deb and reboot with OSS4 sound; however, it might not be so easy in another DE. But naturally I wish to use either a version backported from sid or built from the upstream source.
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2906
Joined: 2008-05-24 12:26

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby sjukfan » 2019-07-14 22:37

https://packages.debian.org/buster/apulse if you want to run firefox and other without pulseaudio. It works so well I had to check if I had it installed or not.
Buster amd64, Core 2 Quad Q9550
Buster amd64, Intel Xeon E3-1240 v3
Sid ppc, PowerPC 7447a
Sid ppc64, PowerPC 970FX
User avatar
sjukfan
 
Posts: 383
Joined: 2010-03-01 19:39

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby kedaha » 2019-07-15 06:12

sjukfan wrote:https://packages.debian.org/buster/apulse if you want to run firefox and other without pulseaudio. It works so well I had to check if I had it installed or not.

apulse, as far as I know, only works with ALSA but not OSS4 but I will try it on my other Gnome system. Thanks.
@HOAS With regard to the older 4.2-build2017-1 versions of OSS4 currently available in sid, as well after trying your OSS4 packages for Buster, I also tried to build them myself from source using module-assistant which failed so I proceeded to backport them, apparently without any glitches. I then installed them but they just didn't work. I can replicate this and print some of the terminal output to try and solve it but I think it would be more worthwhile to use the later 4.2-build2019 upstream version because it is seems compatible with the Buster kernel as the ready-made, upstream OSS4 deb would prove. It would be nice however to see some progress in OSS4 by the Debian developers who have in the past packaged OSS4 so well but sometimes if a user wants something done, the only way is to try and do it oneself with varying results ranging from total success to abject failure. :lol: By comparison, getting OSS4 up and running looks a lot easier in FreeBSD though.
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2906
Joined: 2008-05-24 12:26

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby kedaha » 2019-07-18 23:23

Just to continue from where I left off:
No luck so far building from the latest upstream 4.2-build2019 version myself but someone has done it since the oss4-base, oss4-dkms, oss4-gtk and the other Open Sound System (4.2-build2019-dmo1) packages are available from the unofficial deb-multimedia.org but I guess I'll just continue to use the downloaded, ready-made oss-linux deb I mentioned before since it works just fine unless I can figure out why my builds have failed so far with stuff about missing ALSA and SADA packages etc.
Code: Select all
user@debian:~/oss$ sh /usr/src/oss*/configure --enable-libsalsa=NO
Using the Linux specific script
Setting up full REGPARM compiling environment
srcdir=/usr/src/oss-v4.2-build2019-src-gpl
Source directory is /usr/src/oss-v4.2-build2019-src-gpl
Build directory is /home/user/oss
Build tree created OK
System: Linux
Release: 4.19.0-5-amd64
Machine: x86_64
Directory depends on the ALSA package which is not available
Directory depends on the SADA package which is not available


Trying to build it results in these messages being thrown by the configuration script up:
Code: Select all
Cannot locate <sys/socket.h>
Cannot locate <sys/ioctl.h>
Cannot locate <sys/socket.h>
Cannot locate <sys/stat.h>
Cannot locate <sys/utsname.h>
Cannot locate <sys/types.h>
Cannot locate <stdarg.h>
Cannot locate <sys/time.h>
Cannot locate <gtk/gtkmain.h>
Cannot locate <gtk/gtk.h>
Cannot locate <ntddk.h>
Cannot locate <sys/wait.h>

And finally the build always fails with:
Code: Select all
ossdetect.c: In function ‘create_devlinks’:
ossdetect.c:555:31: warning: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration]
       if (mknod (dev, node_m, makedev (major, minor)) == -1)
                               ^~~~~~~
cc -O -s -o ../../../target/sbin/ossdetect ./ossdetect.o   
/usr/bin/ld: ./ossdetect.o: in function `main':
ossdetect.c:(.text+0xed8): undefined reference to `makedev'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:34: ../../../target/sbin/ossdetect] Error 1
make[3]: Leaving directory '/home/user/oss/os_cmd/Linux/ossdetect'
make[2]: *** [../../make.defs:11: subdirs] Error 1
make[2]: Leaving directory '/home/user/oss/os_cmd/Linux'
make[1]: *** [../make.defs:11: subdirs] Error 1
make[1]: Leaving directory '/home/user/oss/os_cmd'
make: *** [make.defs:11: subdirs] Error 1

Not very pretty... :wink:
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2906
Joined: 2008-05-24 12:26

Re: Using the Open Sound System⁠ OSS4 instead of ALSA in Bus

Postby kedaha » 2019-07-29 10:25

Head_on_a_Stick wrote:Looks like it needs some patches to work with recent kernels.

Just an update on my slow progress in trying to configure and build the upstream 4.2-build2019 gpl'd OSS4 package; I think you're right about the thing needing a patch. I think the solution will be similar the patch used for an earlier version Compile error with ossdetect with glibc starting with version 2.23.
In Buster:
Code: Select all
ldd --version
ldd (Debian GLIBC 2.28-10) 2.28

with regard to the following "Cannot locate" messages resulting from running configure:
Code: Select all
Cannot locate <sys/socket.h>
Cannot locate <sys/ioctl.h>
Cannot locate <sys/socket.h>
Cannot locate <sys/stat.h>
Cannot locate <sys/utsname.h>
Cannot locate <sys/types.h>
Cannot locate <stdarg.h>
Cannot locate <sys/time.h>
Cannot locate <gtk/gtkmain.h>
Cannot locate <gtk/gtk.h>
Cannot locate <ntddk.h>
Cannot locate <sys/wait.h>

cating and greping the the os_linux.h file in the extracted source folder shows:
Code: Select all
user@buster:~$ cat /home/user/oss-v4.2-build2019-src-gpl/kernel/OS/Linux/os_linux.h |grep include
#include <sys/types.h>
#include <sys/param.h>
#include <sys/signal.h>
#include <oss_errno.h>
#include <sys/file.h>
#include "oss_ddi.h"
#include <sys/stat.h>
#include <sys/fcntl.h>
#include <asm/poll.h>
#include "kernel/OS/Linux/wrapper/wrap.h"
#include <sys/sysmacros.h>
/* The soundcard.h could be in a nonstandard place so include it here. */
#include "soundcard.h"
#include "oss_pci.h"

By using apt-file search, I have now whittled down the missing stuff to just five, although stdarg.h may be another kettle of fish:
Code: Select all
Cannot locate <libutil.h>
Cannot locate <stdarg.h>
Cannot locate <gtk/gtkmain.h>
Cannot locate <gtk/gtk.h>
Cannot locate <ntddk.h>

As for the "missing ALSA and SADA packages" referred to in my first post, no idea at the moment what the confiure script may be looking for.
make build continues to be obstructed by the same error, which I quote in full:
Code: Select all
ossdetect
make[3]: Entering directory '/home/user/oss/os_cmd/Linux/ossdetect'
cc -c -O -Wall -DOSS_LITTLE_ENDIAN  -I../../../include -I../../../kernel/framework/include -I../../../kernel/OS/Linux -I../../../kernel/nonfree/include -I../../.. ossdetect.c -o ./ossdetect.o
ossdetect.c: In function ‘create_devlinks’:
ossdetect.c:555:31: warning: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration]
       if (mknod (dev, node_m, makedev (major, minor)) == -1)
                               ^~~~~~~
cc -O -s -o ../../../target/sbin/ossdetect ./ossdetect.o   
/usr/bin/ld: ./ossdetect.o: in function `main':
ossdetect.c:(.text+0xed8): undefined reference to `makedev'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:34: ../../../target/sbin/ossdetect] Error 1
make[3]: Leaving directory '/home/user/oss/os_cmd/Linux/ossdetect'
make[2]: *** [../../make.defs:11: subdirs] Error 1
make[2]: Leaving directory '/home/user/oss/os_cmd/Linux'
make[1]: *** [../make.defs:11: subdirs] Error 1
make[1]: Leaving directory '/home/user/oss/os_cmd'
make: *** [make.defs:11: subdirs] Error 1

Seems so similar to the problem in the referenced link that a bit of tinkering might solve it; but maybe not.
Mate DE & OSSv4.
LaMp, WordPress; ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 2906
Joined: 2008-05-24 12:26


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable