Why OSS sound quality is superior vs ALSA

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium

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

Re: Why OSS sound quality is superior vs ALSA

Postby igorzwx » Thu Jan 14, 2016 7:10 pm

ossuserr wrote:Maybe we need to organize a spiritism session to ask Elena Blavatskaya to give that knowledge :) Or Jakob Blumkin :)

I don't think that it's possible to make a static build of jackd in an easy way because the flag USE="static-libs" is missing on gen2. And that guru is kind of learning programing and is using debian.


The static linking of ALL the libraries is said to be a very bad idea.

Some libs can be linked statically, and other should be linked dynamically
_http://insanecoding.blogspot.de/2012/07/creating-portable-linux-binaries.html

"static linking is not absolutely necessary. Adding $ORIGIN to the rpath is an alternative"
_http://blog.sagargv.com/2014/09/on-building-portable-linux-binaries.html

Relative dynamic libraries
_http://freegamedev.net/wiki/Portable_binaries#Relative_dynamic_libraries
Compiling
_http://freegamedev.net/wiki/Portable_binaries#Compiling_your_application

There is a sort of quasi-static portable DeadBeef
_http://deadbeef.sourceforge.net/portable.html
_http://deadbeef.sourceforge.net/download.html
See "Contacts" (IRC, email) at the bottom of this page:
_http://deadbeef.sourceforge.net/about.html

ossuserr
Known Member
Posts: 272
Joined: Thu Jan 08, 2015 12:01 am
Sound Card: audigy 2 zs platinum, esi juli
OS: gentu riced to bo0st
Location: Earth

Re: Why OSS sound quality is superior vs ALSA

Postby ossuserr » Fri Jan 15, 2016 5:09 pm

Well this job to build a binary with static build is too complex. First of all because not all libs needed for jackd2 have static-libs use flag, for example alsa-lib. I could build all other libs as with static-libs according to ebuild. Ebuild shows these ones:

Code: Select all

CDEPEND="media-libs/libsamplerate[${MULTILIB_USEDEP}]
   media-libs/libsndfile[${MULTILIB_USEDEP}]
   sys-libs/readline:0
   ${PYTHON_DEPS}
   alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
   celt? ( media-libs/celt:0[${MULTILIB_USEDEP}] )
   dbus? (
      dev-libs/expat[${MULTILIB_USEDEP}]
      sys-apps/dbus[${MULTILIB_USEDEP}]
   )
   ieee1394? ( media-libs/libffado[${MULTILIB_USEDEP}] )
   opus? ( media-libs/opus[custom-modes,${MULTILIB_USEDEP}] )
   abi_x86_32? ( !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )"
DEPEND="${CDEPEND}
   virtual/pkgconfig
   doc? ( app-doc/doxygen )"
RDEPEND="${CDEPEND}
   dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
   pam? ( sys-auth/realtime-base )"


Also there is no guarantee that the binary with static-libs will work. One guy told me that jackd clients can use only the shared jackd library and building static jackd2 is useless.
1. Applications, that use jackd need libjack0 and they will try to install jackd if you try to install them to get that libjack0!
2. You can't have II jackds in the system.
3. Some apps use dlopen() instead of linking directly to libjack0. You can't dlopen the statically built jackd.

So if you know how to overcome this we can try to build that one-binary mega-package...
Anyway i can provide my jackd2 binary and jack .so modules and tell the versions of libs that i have and people will be able to run my binary if they install the same versions of the libs.

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

Re: Why OSS sound quality is superior vs ALSA

Postby igorzwx » Fri Jan 15, 2016 7:45 pm

ossuserr wrote:Also there is no guarantee that the binary with static-libs will work. One guy told me that jackd clients can use only the shared jackd library and building static jackd2 is useless.
1. Applications, that use jackd need libjack0 and they will try to install jackd if you try to install them to get that libjack0!
2. You can't have II jackds in the system.
3. Some apps use dlopen() instead of linking directly to libjack0. You can't dlopen the statically built jackd.

So if you know how to overcome this we can try to build that one-binary mega-package...


All this is TOTAL CONFUSION.

You do not need an absolutely static "one-binary mega-package" jackd, which has all libs inside.

What you need is a kind of "quasi-static" build jackd + jackd.so, which look like normal "dynamic-shared" build.
It should be portable, but it need not to be portable in an absolute sense.

Example 1: quasi-static portable DeadBeef

Code: Select all

$ ./DeadBeef-static/deadbeef-0.6.2/deadbeef --version
starting deadbeef 0.6.2 [static] [portable]
DeaDBeeF 0.6.2 Copyright © 2009-2013 Alexey Yakovenko


Code: Select all

$ file ./DeadBeef-static/deadbeef-0.6.2/deadbeef
./DeadBeef-static/deadbeef-0.6.2/deadbeef: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xf6d55a84f816ec5f514e27f95786522cd4f309c1, stripped


Code: Select all

$ ldd ./DeadBeef-static/deadbeef-0.6.2/deadbeef
   linux-gate.so.1 =>  (0xb7707000)
   libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb76e0000)
   libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb76b4000)
   libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7698000)
   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb74ed000)
   /lib/ld-linux.so.2 (0xb7708000)


Example 2: Petrov's oss_rate.so

Code: Select all

$ ldd ./DeadBeef-static/deadbeef-0.6.2/plugins/oss_rate.so
   linux-gate.so.1 =>  (0xb7779000)
   libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7719000)
   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb756e000)
   /lib/ld-linux.so.2 (0xb777a000)


Example 3: Quasi-static ALSA plugin for "quasi-portable" DeadBeef-quasi_static

Code: Select all

$ ldd ./DeadBeef-static/deadbeef-0.6.2/plugins_disabled/alsa.so
   linux-gate.so.1 =>  (0xb76ff000)
   libasound.so.2 => /usr/lib/i386-linux-gnu/libasound.so.2 (0xb75e5000)
   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb743a000)
   libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb740d000)
   libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7408000)
   libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb73ed000)
   librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb73e4000)
   /lib/ld-linux.so.2 (0xb7700000)


Notice that Quasi-static ALSA plugin depends on libasound.so.2

ossuserr wrote:not all libs needed for jackd2 have static-libs use flag, for example alsa-lib.


alsa-lib should not have flags.

System libraries that cannot be bundled (or linked statically):
1. Glibc
2. Libasound
3. Xlib
4. OpenGL

_http://freegamedev.net/wiki/Portable_binaries#System_libraries_that_cannot_be_bundled

ossuserr wrote:Anyway i can provide my jackd2 binary and jack .so modules and tell the versions of libs that i have and people will be able to run my binary if they install the same versions of the libs.


It can be tested by Ubuntu users. They cannot compile anything themselves.

ossuserr
Known Member
Posts: 272
Joined: Thu Jan 08, 2015 12:01 am
Sound Card: audigy 2 zs platinum, esi juli
OS: gentu riced to bo0st
Location: Earth

Re: Why OSS sound quality is superior vs ALSA

Postby ossuserr » Fri Jan 15, 2016 9:22 pm

So if you want to use my jackd2 which supports OSS driver, do the following:
1. Uninstall jack-audio-connection-kit-1 if you have it installed
2. Install my versions of libs that i used to compile jackd2 with oss support (i think higher versions or little lower versions may also work. You are welcomed to try one lower or one higher version than the below ones if these don't work):
media-libs/libsndfile-1.0.26
media-libs/libsndfile-1.0.26
media-libs/alsa-lib-1.0.29
media-libs/celt-0.11.1-r1
sys-apps/dbus-1.8.16
dev-libs/expat-2.1.0-r5
sys-libs/pam-1.2.1
sys-auth/realtime-base-0.1
dev-python/dbus-python-1.2.0-r1

oss-4.2.2011 (yes of course OSS is to have been installed too)

To search these packages in .deb based repositories use synaptic or the command

apt-cache search package-name

If you know how and your OS supports it you may try installing both 32 and 64-bit versions of the above libs because i was compiling multilib jackd2.

3. I think if you have jack-audio-connection-kit 2 installed you don't have to uninstall it. Try to overwrite its files by the files that i propose to you in attachments because your operating system is to think that you have jackd2 installed, otherwise apps using jackd may refuse to work. And besides, the files I provide are just files and don't create any links which are usually created during normal installation of any program.

Here i attach jackd binary (like exe file but for linux). Unzip it and move to /usr/bin/ folder by the commands:
unzip jackd.zip
sudo mv jackd /usr/bin/
Untar the attached jack modules and put them to the folder /usr/lib64/jack/ using the commands:
mkdir NEWDIR
Now put the so_modules.tar.gz file into the folder NEWDIR and enter that folder:
cd /path/to/NEWDIR
Now:
tar xfzv so_modules.tar.gz
sudo mv *.so /usr/lib64/jack/

5. Try to run jackd.
/usr/bin/jackd -S -v -doss -r48000 -C/dev/dsp -P/dev/dsp -p1024 -n2 -w16
Attachments
so_modules.tar.gz
modules
(190.6 KiB) Downloaded 239 times
jackd.zip
binary
(7.41 KiB) Downloaded 245 times

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

Re: Why OSS sound quality is superior vs ALSA

Postby igorzwx » Fri Jan 15, 2016 11:05 pm

It is 64bit. Otherwise, I would surely try it.

UBUNTU: File list of package jackd2 in wily of architecture amd64
_http://packages.ubuntu.com/wily/amd64/jackd2/filelist

Code: Select all

/usr/bin/alsa_in
/usr/bin/alsa_out
/usr/bin/jack_alias
/usr/bin/jack_bufsize
/usr/bin/jack_connect
/usr/bin/jack_control
/usr/bin/jack_cpu
/usr/bin/jack_cpu_load
/usr/bin/jack_disconnect
/usr/bin/jack_evmon
/usr/bin/jack_freewheel
/usr/bin/jack_iodelay
/usr/bin/jack_latent_client
/usr/bin/jack_load
/usr/bin/jack_lsp
/usr/bin/jack_metro
/usr/bin/jack_midi_dump
/usr/bin/jack_midi_latency_test
/usr/bin/jack_midiseq
/usr/bin/jack_midisine
/usr/bin/jack_monitor_client
/usr/bin/jack_multiple_metro
/usr/bin/jack_net_master
/usr/bin/jack_net_slave
/usr/bin/jack_netsource
/usr/bin/jack_rec
/usr/bin/jack_samplerate
/usr/bin/jack_server_control
/usr/bin/jack_session_notify
/usr/bin/jack_showtime
/usr/bin/jack_simple_client
/usr/bin/jack_simple_session_client
/usr/bin/jack_test
/usr/bin/jack_thru
/usr/bin/jack_transport
/usr/bin/jack_unload
/usr/bin/jack_wait
/usr/bin/jack_zombie
/usr/bin/jackd
/usr/bin/jackdbus
/usr/lib/x86_64-linux-gnu/jack/audioadapter.so
/usr/lib/x86_64-linux-gnu/jack/inprocess.so
/usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
/usr/lib/x86_64-linux-gnu/jack/jack_alsarawmidi.so
/usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
/usr/lib/x86_64-linux-gnu/jack/jack_loopback.so
/usr/lib/x86_64-linux-gnu/jack/jack_net.so
/usr/lib/x86_64-linux-gnu/jack/jack_netone.so
/usr/lib/x86_64-linux-gnu/jack/netadapter.so
/usr/lib/x86_64-linux-gnu/jack/netmanager.so
/usr/lib/x86_64-linux-gnu/jack/profiler.so
/usr/lib/x86_64-linux-gnu/libjackserver.so.0
/usr/lib/x86_64-linux-gnu/libjackserver.so.0.1.0
/usr/share/bash-completion/completions/jackd
/usr/share/dbus-1/services/org.jackaudio.service
/usr/share/doc/jackd2/README.gz
/usr/share/doc/jackd2/TODO
/usr/share/doc/jackd2/changelog.Debian.gz
/usr/share/doc/jackd2/copyright
/usr/share/doc/jackd2/examples/asound.rc
/usr/share/jackd/audio.conf
/usr/share/man/man1/alsa_in.1.gz
/usr/share/man/man1/alsa_out.1.gz
/usr/share/man/man1/jack_bufsize.1.gz
/usr/share/man/man1/jack_connect.1.gz
/usr/share/man/man1/jack_disconnect.1.gz
/usr/share/man/man1/jack_freewheel.1.gz
/usr/share/man/man1/jack_impulse_grabber.1.gz
/usr/share/man/man1/jack_iodelay.1.gz
/usr/share/man/man1/jack_load.1.gz
/usr/share/man/man1/jack_lsp.1.gz
/usr/share/man/man1/jack_metro.1.gz
/usr/share/man/man1/jack_monitor_client.1.gz
/usr/share/man/man1/jack_netsource.1.gz
/usr/share/man/man1/jack_samplerate.1.gz
/usr/share/man/man1/jack_showtime.1.gz
/usr/share/man/man1/jack_simple_client.1.gz
/usr/share/man/man1/jack_transport.1.gz
/usr/share/man/man1/jack_unload.1.gz
/usr/share/man/man1/jack_wait.1.gz
/usr/share/man/man1/jackd.1.gz
/usr/share/man/man1/jackrec.1.gz


Hence, your "modules" should be installed here:

Code: Select all

/usr/bin/jackd
/usr/lib/x86_64-linux-gnu/jack/audioadapter.so
/usr/lib/x86_64-linux-gnu/jack/inprocess.so
/usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
/usr/lib/x86_64-linux-gnu/jack/jack_alsarawmidi.so
/usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
/usr/lib/x86_64-linux-gnu/jack/jack_loopback.so
/usr/lib/x86_64-linux-gnu/jack/jack_net.so
/usr/lib/x86_64-linux-gnu/jack/jack_netone.so
/usr/lib/x86_64-linux-gnu/jack/netadapter.so
/usr/lib/x86_64-linux-gnu/jack/netmanager.so
/usr/lib/x86_64-linux-gnu/jack/profiler.so
/usr/lib/x86_64-linux-gnu/jack/jack_oss.so


Other things seem to be missing, for example:

Code: Select all

/usr/bin/alsa_in
/usr/bin/alsa_out
/usr/bin/jack_alias
/usr/bin/jack_bufsize
/usr/bin/jack_connect
/usr/bin/jack_control
/usr/bin/jack_cpu
/usr/bin/jack_cpu_load
/usr/bin/jack_disconnect
/usr/bin/jack_evmon
/usr/bin/jack_freewheel
/usr/bin/jack_iodelay
/usr/bin/jack_latent_client
/usr/bin/jack_load
/usr/bin/jack_lsp
/usr/bin/jack_metro
/usr/bin/jack_midi_dump
/usr/bin/jack_midi_latency_test
/usr/bin/jack_midiseq
/usr/bin/jack_midisine
/usr/bin/jack_monitor_client
/usr/bin/jack_multiple_metro
/usr/bin/jack_net_master
/usr/bin/jack_net_slave
/usr/bin/jack_netsource
/usr/bin/jack_rec
/usr/bin/jack_samplerate
/usr/bin/jack_server_control
/usr/bin/jack_session_notify
/usr/bin/jack_showtime
/usr/bin/jack_simple_client
/usr/bin/jack_simple_session_client
/usr/bin/jack_test
/usr/bin/jack_thru
/usr/bin/jack_transport
/usr/bin/jack_unload
/usr/bin/jack_wait
/usr/bin/jack_zombie
/usr/bin/jackdbus
/usr/lib/x86_64-linux-gnu/libjackserver.so.0
/usr/lib/x86_64-linux-gnu/libjackserver.so.0.1.0
/usr/share/bash-completion/completions/jackd
/usr/share/dbus-1/services/org.jackaudio.service
/usr/share/jackd/audio.conf

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

Re: Why OSS sound quality is superior vs ALSA

Postby igorzwx » Sat Jan 16, 2016 12:18 am

ossuserr wrote:that guru is kind of learning programing and is using debian


If the great guru is using Debian, he might already have learned the art of "Debian packaging".
It is a sort of very strange shamanism. Those, who do not want to practice such shamanism, are using Gentoo, or Funtoo.

jackd2 deb-package for Ubuntu/Debian can be recompiled (and patched for OSS) with "debian build scripts".

EXAMPLE: Recompilation of the package "gnome-settings-daemon" with Debian Build scripts
_http://www.4front-tech.com/forum/viewtopic.php?f=3&t=3375&start=15#p13781

ossuserr
Known Member
Posts: 272
Joined: Thu Jan 08, 2015 12:01 am
Sound Card: audigy 2 zs platinum, esi juli
OS: gentu riced to bo0st
Location: Earth

Re: Why OSS sound quality is superior vs ALSA

Postby ossuserr » Sat Jan 16, 2016 11:16 am

I don't have several of the files mentioned by you because i was not compiling for example net support, libsamplerate, ffado into jackd2.
Also DON'T look for jackdbus support in my build. The thing is that i compiled it as --CLASSIC . That's why you can use the command jackd, otherwise if you compile it with --dbus, it does not have jackd command and uses other commands to start jackd.
I don't need jackdbus because i lauch the app from commandline. Jackdbus is needed only for graphical interfaces like Cadence, non-session-manager. Actually that cadence is just a gui for jackd command.
For example, i don't have /usr/share/bash-completion/completions/jackd /usr/share/dbus-1/services/org.jackaudio.service and some others.
Instead of folder /usr/share/doc/jackd2/ i have /usr/share/doc/jack-audio-connection-kit-1.9.10/
I don't have /usr/share/jackd/audio.conf

As you can remember i compiled multilib jackd2. That's why i provide both 64-bit libs and 32-bit libs in the attachments to this post.
Attachments
usr-share-doc.tar.gz
/usr/share/doc/
(33.81 KiB) Downloaded 227 times
binaries-from-usr-bin.tar.gz
from /usr/bin/
(210.83 KiB) Downloaded 240 times
32-bit-libs-from-usr-lib-jack.tar.gz
32bit libs from /usr/lib/jack/
(190.17 KiB) Downloaded 232 times
Last edited by ossuserr on Sat Jan 16, 2016 11:32 am, edited 1 time in total.

ossuserr
Known Member
Posts: 272
Joined: Thu Jan 08, 2015 12:01 am
Sound Card: audigy 2 zs platinum, esi juli
OS: gentu riced to bo0st
Location: Earth

Re: Why OSS sound quality is superior vs ALSA

Postby ossuserr » Sat Jan 16, 2016 11:21 am

2 more files
Instead of /usr/lib/x86_64-linux-gnu/jack/ i have /usr/lib/jack/ for 32bit libs
Attachments
usr-lib64-jack-dir.tar.gz
/usr/lib64/jack/
(190.63 KiB) Downloaded 228 times
usr-share-man-man1.tar.gz
/usr/share/man/man1/
(16.32 KiB) Downloaded 220 times

gognos
New Member
Posts: 1
Joined: Sun May 08, 2016 1:19 pm
OS: ubuntu

Re: Why OSS sound quality is superior vs ALSA

Postby gognos » Sun May 08, 2016 1:56 pm

This seems all rather confusing.
So an easier way for ubuntu/debian
install devscripts quilt

So i found a patch

Code: Select all

Package: jackd2
Version: 1.9.10+20140719git3eb0ae6a~dfsg-2
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64-xenhvm-ipsec
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
From: Steven Chamberlain <ste...@pyro.eu.org>
Subject: enable using OSS on GNU/kFreeBSD

--- a/linux/wscript
+++ b/linux/wscript
@@ -97,6 +97,10 @@
     if bld.env['BUILD_DRIVER_IIO'] == True:
         create_jack_driver_obj(bld, 'iio', iio_driver_src, ["GTKIOSTREAM", "EIGEN3"])
 
+    if bld.env['BUILD_DRIVER_OSS'] == True:
+        create_jack_driver_obj(bld, 'oss', ['../solaris/oss/JackOSSDriver.cpp', '../common/memops.c'], ["OSS"])
+
+
     create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp')
 
     create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp')
--- a/wscript
+++ b/wscript
@@ -355,6 +355,10 @@
         display_feature('Build with FireWire (FreeBob) support', conf.env['BUILD_DRIVER_FREEBOB'] == True)
         display_feature('Build with FireWire (FFADO) support', conf.env['BUILD_DRIVER_FFADO'] == True)
         display_feature('Build with IIO support', conf.env['BUILD_DRIVER_IIO'] == True)
+        # GNU/kFreeBSD supports OSS
+        if platform.startswith('gnukfreebsd'):
+            conf.env['BUILD_DRIVER_OSS'] = True
+            display_feature('Build with OSS support', conf.env['BUILD_DRIVER_OSS'] == True)
 
     if conf.env['IS_WINDOWS']:
         display_feature('Build with WinMME support', conf.env['BUILD_DRIVER_WINMME'] == True)


be sure you have the deb-src repositories in sources.list applied

Lets apply the patch

Code: Select all

apt-get source jackd2

cd into the jackd2 folder created in home
see ubuntu applies patches

Code: Select all

ls debian/patches

apply all patches contained in the package.

Code: Select all

export QUILT_PATCHES=debian/patches

Code: Select all

 quilt push -a

Code: Select all

quilt new newoss.patch

Code: Select all

apt-get build-dep jackd2

add change log

Code: Select all

dch -i

rebuild package

Code: Select all

debuild -uc -us

Install created .deb

ronal_07
New Member
Posts: 1
Joined: Tue Aug 16, 2016 2:37 am
Sound Card: Realtek ALC662
OS: Linux Mint 18

Re: Why OSS sound quality is superior vs ALSA

Postby ronal_07 » Tue Aug 16, 2016 2:47 am

ossuserr wrote:Let me disagree with you strongly. It's wrong to hang pricetage to people. I don't think that all alsa users are deaf. Perhaps they
1. have better monitors and soundcards than oss users which compensates for drawbacks of alsa sound quality. Many of them use adams and rme cards, yamahas 10m line. Many use firefire cards with ffado.
2. Are not interested in audiophilia and just interested in programming.

Still they helped to make a patch for jackd2 to work with oss :)

I have noticed that alsa colorates the sound making it a bit sweet. That sweet, glamour-like thing is a derivative from antialiasing - the same works for image processing. As a result the entire picture looks like more glamor but due to the lack of details like you have removed all wrinkls.
Alsa programers swear that alsa does not make any secret resampling but why does alsa then have lower sound volume? In order to lower the volume you have to apply some processing to sound. The only method to change volume without effecting the digital stream is by master mixer whcih operates on hardware level. My suspicion is that alsa's master slide in alsamixer does not enable the full volume to prevent clipping. This prevents giving full electrical power to the card. Or they preprocess sound before feeding to the master mixer. Whatever it is they claim that alsa is opensource and everyone can check. But no one wants to check those low level things.

Whatever alsa programers say oss's sound differs from alsa's. It's more neutral and more DRY. By the way in audioengineering DRY means UNPROCESSED.

Still we should admit that alsa users can use more expensive and newer cards with better DACs then OSS users.

In my opinion that antialiasing makes sound be feminine while OSS corresponds to the northern and viking like school with crisp highs. Thus for me alsa = jewish school of audio engineering, oss = indoeuropean school. By the way in jewish culture mother dominates over father. Interesing coincidence.


And then why when it rises entire volume is heard wrong and distorted?

sm5bsz
New Member
Posts: 8
Joined: Tue Aug 16, 2016 1:45 pm
Sound Card: many
OS: many

Re: Why OSS sound quality is superior vs ALSA

Postby sm5bsz » Wed Aug 17, 2016 12:02 am

Hello,

I was pointed to this forum by someone who had looked at my video here: https://www.youtube.com/watch?v=v_DlDSqJ8yk. In this video I am comparing 4Front OSS and ALSA. In both cases the data is the unmodified raw data supplied by the soundcard as is mandatory for a SDR (Software Defined Radio) application. The statement by ossuserr: "Whatever alsa programers say oss's sound differs from alsa's. It's more neutral and more DRY. By the way in audioengineering DRY means UNPROCESSED." is NOT true (always) and I will explain.

First some background. When I started the Linrad project about 16 years ago ALSA did not exist. There was legacy sound and 4Front OSS. They were both compatible. At that time it was the responsibility of the application to figure out the hardware capabilities and to open the sound device with the appropriate speed and data format. After a couple of years Linrad no longer worked properly. OSS would report that all speeds and formats are available. Performance was not OK however, for a radio application like Linrad. I was first quite upset... As it turned out, 4Front OSS had adapted to the lazy programming style common in the music industry. "The application programmer should not have to bother about the hardware." Lockily there is COOKEDMODE that disables this feature and only allows a device to be opened in its raw format without resampling and without format conversion.

There is a counterpart in ALSA. One can find out what the hardware speeds and formats are. Opening a device with speed and format in agreemant with the hardware disables all conversions in ALSA just as it does in OSS and the sound quality is identical for both systems. OSS is however better for a radio transceiver since it allows lower latency as you can see in my video.

It seems to me the question "Why OSS sound quality is superior vs ALSA" has a simple answer. The rate/format conversion in OSS is better than the conversion in ALSA. (Difficult to understand, the theory is well known and OSS is open source....)

With modern signal analysis we can measure any change in the signal quality far better than the human ear can distinguish. I never made tests on the differences between rate conversion in OSS and ALSA for the simple reason I do not want any rate conversion in my project. I wonder, has anyone made blind tests that show beyond doubt that a human can hear the difference?

When both OSS and ALSA are in COOKEDMODE there surely is no difference if they both open the same soundcard at the same data rate.

By the way, the soundcard hardware typically samples at HF. The Delta 44 at 6.144 MHz and the digital part of the A/D chip performs a rate conversion down to 96 kHz or lower. It does not matter if a further conversion down to 48 kHz is made in the hardware, the drive routine or the application software. If properly done, the signal must be the same. If something is wrong, there could well be audible differencies and that would be very easy to show by measurement of intermodulation and pulse response (equivalent to amplitude and phase frequency response.)

Linrad was "application of the year" in 4Front OSS in year 2003 or so. No trace of that on the Internet...

Regards

Leif

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

Re: Why OSS sound quality is superior vs ALSA

Postby igorzwx » Fri Aug 19, 2016 3:36 pm

sm5bsz wrote:my video here: _https://www.youtube.com/watch?v=v_DlDSqJ8yk


Have you noticed some audible noise in your video?

that is caused by pulseaudio. The command pasuspender...
_https://www.youtube.com/watch?v=v_DlDSqJ8yk


Have you tried to remove PulseAudio?

When PulseAudio is removed, and "exclusive mode" is enabled, you may try to measure something.
You may also try a "test for deafness":
_http://ossnext.trueinstruments.com/forum/viewtopic.php?f=3&t=5831

sm5bsz
New Member
Posts: 8
Joined: Tue Aug 16, 2016 1:45 pm
Sound Card: many
OS: many

Re: Why OSS sound quality is superior vs ALSA

Postby sm5bsz » Mon Aug 22, 2016 9:21 pm

igorzwx wrote:

> Have you noticed some audible noise in your video?

I am a radio developer. I do signal analysis with advanced methods and I note differences very much smaller than a human ear can distinguish. There is absolutely no difference at all between OSS and ALSA provided the user knows how to avoid resamplers and format converters as I described in my posting.

That is what I thought would be clear by this statement: "In both cases the data is the unmodified raw data supplied by the soundcard as is mandatory for a SDR"

The answer to your question is: There is absolutely no difference in the noise floor between OSS and ALSA. I would say the noise floor of my modified Delta 44 is not audible, but yet it is the limiting factor when the Delta 44 is used as part of a radio receiver. The noise floor is at about -145 dB in a 1 Hz bandwidth.

igorzwx also wrote:
> Have you tried to remove PulseAudio?
Sure, it affects the latency, but it does not affect the signal.

igorzwx also wrote:
> You may also try a "test for deafness":
> _http://ossnext.trueinstruments.com/forum/viewtopic.php?f=3&t=5831

On this page I read: "You may not hear any difference between HiRes and CD format with ALSA, simply because ALSA resamples everything with a low quality resampler. Since ALSA does not provide any sort of 'exclusive mode', it should not be used for hearing tests." THIS IS A FALSE STATEMENT!!!!! The way to run ALSA in exclusive mode is to probe the soundcard for modes supported by hardware. See the routine alsar_get_dev_native_capabilities(...) in lsetad.c of the linrad package.

On the page I also read: "What really matters is what the term 'exclusive mode' actually means. The true meaning of the term is that certain software causes of sound distortions are somehow removed:
1. any sort of software mixing and/or redirection to virtual mixer engines is disabled,
2. sample rate/format conversions are disabled,
3. any sort of dsp processing, such as equalizing, is disabled."

The purpose of the alsar_get_dev_native_capabilities(...) is to make sure these criteria are met. The routine uses things like:
resamp=1;
err=snd_pcm_hw_params_set_rate_resample(tx_ad_handle, hw_ad_params, resamp); err=snd_pcm_hw_params_set_rate_near(tx_ad_handle,hw_ad_params, &samprate, 0);
to make sure the original raw data from the soundcard will be sent to the callback
routine that takes care of the sound stream.

I might add that the Delta 44 when modified http://sm5bsz.com/linuxdsp/hware/delta44.htm works fine under 32 bit Windows XP but that there is no proper routine for any 64 bit Windows.
It is possible to install the 32 bit XP driver under 32 bit Windows 10 by use of compatibility mode.
The Delta 44 works well in both 32 and 64 bit Linux under OSS as well as under ALSA.

The Lynx2 is totally useless because of the strong phase noise on the sampling clock http://sm5bsz.com/linuxdsp/rxiq/rx2500lynx.htm
as well as under Linux with both OSS and ALSA but that there is no proper drive routine
(This might evem be audible by ear.)

The Maya 44 has a problem. There is a time shift between the two stereo channels. This
time shift is different from time to time and that makes the card difficult to use.

It is difficult to find a properly working 4-channel soundcard....

I do however not think that "test for deafness" would make any of those very serious
errors audible.

Regards

Leif

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

Re: Why OSS sound quality is superior vs ALSA

Postby igorzwx » Mon Aug 22, 2016 10:29 pm

sm5bsz wrote:I would say the noise floor of my modified Delta 44 is not audible
...I am a radio developer.


The noise level in your recordings is above -48dB (see the spectrogram).
If you do not hear such noise, you should urgently visit doctors.

Spectrogram_of_noise--Frequency_Analysis.png.tar.gz
Spectrogram of audible noise in "4Front OSS vs ALSA" video
(52.47 KiB) Downloaded 52 times


_https://www.youtube.com/watch?v=v_DlDSqJ8yk
4Front OSS vs ALSA
sm5bsz

Published on Jul 26, 2015
In popular Linux distributions ALSA is the default sound system. This video compares ALSA with 4Front OSS which is an alternative sound system that is supported by Linrad.


If you do not hear that noise in the audio track of your video, you should not be able to hear the difference between ALSA and OSS4, as well as the difference between HiRes audio and CD format. All these are symptoms of deafness, and deafness correlates with stupidity.

If you pretend to be a "radio developer", or "audio expert", you should not publish such crappy recordings.

sm5bsz wrote:I am a radio developer. I do signal analysis with advanced methods and I note differences very much smaller than a human ear can distinguish.


A semi-deaf "radio developer" may not hear a rather strong noise in his own audio recordings. If you do not know how to measure noise in your recordings, you may ask for help on Audacity forum. Although, of course, Audacity tools might be very difficult to use for the old and demented.

Your "advanced methods" of "signal analysis" seem to be the standard techniques of "Cargo Cult Science"
_https://en.wikipedia.org/wiki/Cargo_cult_science
_http://calteches.library.caltech.edu/51/2/CargoCult.pdf

Any very advanced scientific methods and devices might be of little help for the ignorant and stupid.
Although, of course, the performance of very advanced "scientific rituals" may help to solve some ideological problems.
According to Anthropology, Cargo cult rituals are very effective instruments of political power.
The stories of Cargo Cults in Vanuatu and Papua New Guinea prove this point
_https://en.wikipedia.org/wiki/Cargo_cult

Cargo Cult _https://www.youtube.com/watch?v=qmlYe2KS0-Y
[Cargo Cult] Поклоняются...самолетам (Russian translation) _https://www.youtube.com/watch?v=J6qxREv-EyM
Melanesian People beg US Soldiers Return. Cargo Cult. John Frum Day [HD]
_https://www.youtube.com/watch?v=LMO7Yo4PM8U
Mike Daisey, The Last Cargo Cult (interviews) _https://www.youtube.com/watch?v=YB-26XqDZj8

Notice, that ALSA [Advanced Linux Sound Architecture] was named "advanced" for ideological reasons.

Since the perception of sound depends on the age, it makes sense to try a sort of "hearing test". It may help to diagnose certain problems, such as "dementia progression" and the like.

Adult hearing test - Audiology at the University of Canterbury
_https://www.youtube.com/watch?v=9u9Ja4wyUaU
Dr. Vincent Lin on Dementia and Hearing Loss
_https://www.youtube.com/watch?v=WMSl1ahO9GM

sm5bsz
New Member
Posts: 8
Joined: Tue Aug 16, 2016 1:45 pm
Sound Card: many
OS: many

Re: Why OSS sound quality is superior vs ALSA

Postby sm5bsz » Sun Aug 28, 2016 3:39 am

igorzwx wrote: If you do not hear that noise in the audio track of your video, you should not be able to hear the difference between ALSA and OSS4, as well as the difference between HiRes audio and CD format. All these are symptoms of deafness, and deafness correlates with stupidity.


I am sorry, you have completely misunderstood everything. The video is a demonstration of timing made by use of a camera. The noise in this recording has nothing to do with the soundcard performance. The noise floor of the Delta44 (modified) is -146 dBc/Hz (means 146 dB below a near saturating signal in a bandwidth of 1 Hz.) Have a look here: http://sm5bsz.com/linuxdsp/hware/delta44b.htm

The difference between formats is huge. CD format is useless. Drive routines are often a mess. Have a look here: http://www.sm5bsz.com/linuxdsp/hware/sb ... ternal.htm The sb-live-external has bad drivers under ALSA. I was not able to make it work with OSS. Under Windows, at the time, year 2011, the proper drivers gave a dynamic range of 142 dBc/Hz while many drivers were less good. It also depended on the Windows version. I challenge you: Can you hear the differences that I demonstrate on the above page? (I am confident you can not.)

If you pretend to be a "radio developer", or "audio expert", you should not publish such crappy recordings.

And why is that? Do you try to say the quality is so bad so you can not hear what I am saying? I do not know who you are and how you can get into your mind that the sound quality of a video recording would have any meaning in a discussion of soundcards. The sound in the video is packed with a lossy mp3 packer. If you listen you can hear that the noise is the noise generated by fans in computers and other equipment.

sm5bsz wrote:
I am a radio developer. I do signal analysis with advanced methods and I note differences very much smaller than a human ear can distinguish.

A semi-deaf "radio developer" may not hear a rather strong noise in his own audio recordings. If you do not know how to measure noise in your recordings, you may ask for help on Audacity forum. Although, of course, Audacity tools might be very difficult to use for the old and demented.

You should feel ashamed. I wrote: "I do signal analysis with advanced methods and I note differences very much smaller than a human ear can distinguish." Seems you can not read plain text. Again, look here: http://www.sm5bsz.com/linuxdsp/hware/sb ... ternal.htm

I can not understand what triggered your stupid criticism:
Your "advanced methods" of "signal analysis" seem to be the standard techniques of "Cargo Cult Science"
_https://en.wikipedia.org/wiki/Cargo_cult_science
_http://calteches.library.caltech.edu/51/2/CargoCult.pdf
etc. etc.


Notice, that ALSA [Advanced Linux Sound Architecture] was named "advanced" for ideological reasons.


Sure. But earlier postings in this thread have been FALSE. Both OSS and ALSA give exactly the same
performance when it comes to sound quality on many sound cards. Both of them operate the sound cards
exactly the same way provided the application programmer knows how to use the system in exclusive mode.
It is not true that ALSA does not provide an exclusive mode. There might be some timing differences however.

Since the perception of sound depends on the age, it makes sense to try a sort of "hearing test". It may help to diagnose certain problems, such as "dementia progression" and the like.

Adult hearing test - Audiology at the University of Canterbury
_https://www.youtube.com/watch?v=9u9Ja4wyUaU
Dr. Vincent Lin on Dementia and Hearing Loss
_https://www.youtube.com/watch?v=WMSl1ahO9GM


I think insults fall back on you. You might use Google on Linrad (about 25000 results.) If you have the patience you would find a lot of detailed information about soundcard performance. Nothing subjective, hard facts obtained by proper scientific methods.

I have been using 4Front OSS and I still support it in my software package. As we all know ALSA is the default in Linux now. There could be differences in the drive routines, but until now I have not found any. This thread was about major differences - such differences that a human ear can distinguish. As you can see in the link above such differences occur with the SB-LIVE USB under Windows. (I have not investigated whether this soundcard is properly supported by OSS or ALSA today.) I think it is reasonable to assume that some soundcards are better supported in one or the other of OSS and ALSA - but I do not think this happens often.


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 7 guests