Replace ALSA/Pulseaudio with OSS4

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Re: Replace ALSA/Pulseaudio with OSS4

Postby hifihere » Thu Oct 14, 2010 5:25 pm

That was the first place I went. I am the last post (two channel). Stuck.
hifihere
Member
 
Posts: 24
Joined: Sun Oct 10, 2010 8:34 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby igorzwx » Thu Oct 14, 2010 5:39 pm

hifihere wrote:That was the first place I went. I am the last post (two channel). Stuck.


Have you tried that "howto", or not? If not, you may ask Cesium to explain that "howto".
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: Replace ALSA/Pulseaudio with OSS4

Postby cesium » Fri Oct 15, 2010 2:46 am

cesium wrote:hifihere: Does "osstest" work and emit sound? Does 'ossinfo -v3' emit lots of output? If so, oss is installed. Now, I think this wiki page will show you how to configure stuff to use OSS. (KDE, for example uses phonon for sound. Latest gnome IIRC uses libcanberra for notifications). If anything is unclear, please ask here.


I think this fell by the wayside...
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby igorzwx » Fri Oct 15, 2010 12:48 pm

cesium wrote:I think this fell by the wayside...


It seems that his "original objective" was "bit perfect sound" rather than OSS4.

hifihere wrote:So back to my original objective, up to 24/192 support, gapless FLAC playback and bit perfect output.
Maybe I am trying to achieve the immpossible.


cesium wrote:I suggesting leaving Pulse there. It's too difficult to remove given package dependencies, and it's unnecessary really.


Is it possible to get "bit perfect sound" with PulseAudio?
If it is possible, could you please explain how to do that?
Does PulseAudio have a kind of resampler inside?
Could it be replaced with another resampler which is mathematically perfect?
If that resampler of FreeBSD is said to be so good (and so fast), it might be utilized for the purpose.
If you are going to promote PulseAudio, you may try to recompile it to enable a better resampler.

Another problem is how to install OSS4 on Fedora.
There is a "howto" on Fedora forum:

Howto install oss4 [Archive] - FedoraForum.org
25 Dec 2009 ... [Archive] Howto install oss4 Guides & Solutions
http://forums.fedoraforum.org/showthread.php?t=237230

However, that "howto" suggests the removal of PulseAudio:

type yum erase pulseaudio to remove pulse audio and it's garbage.
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: Replace ALSA/Pulseaudio with OSS4

Postby hifihere » Fri Oct 15, 2010 5:16 pm

I never did get osstest or any OSS commands to work even though it says "already installed" when I try to re-install.

I did remove Pulseaudio but my player was broken after that so I reinstalled it.

Bit perfect is working since I can pass the DTS test. I have to set my sound device to hw or spdif to bypass all the digital manipulation and then it passes bit perfect tests.

Even if I was able to get OSS4 to work it looks like I have another problem that no one has solved. Gapless playback is not possible and that is a deal breaker for me.
hifihere
Member
 
Posts: 24
Joined: Sun Oct 10, 2010 8:34 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby cesium » Fri Oct 15, 2010 5:56 pm

igorzwx:

igorzwx wrote:Is it possible to get "bit perfect sound" with PulseAudio?

I dunno. What I was trying to say/do is this: hifi doesn't want "bit perfect source" for everything, but only for a specific use. I doubt he cares if (for example) the k3b burning success sound is bit perfect or not. This means we could have (assuming OSS install had worked for him and playback was gapless) kept most of the system using Pulse (since reconfiguring everything is work and Pulse can work with OSS if we modify its config file), and migrate only a few important programs (i.e. the FLAC player) to use OSS directly. After that, it's on a base of 'if we care enough, we'll change the output, but we probably don't care'.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby igorzwx » Fri Oct 15, 2010 6:01 pm

hifihere wrote:Bit perfect is working since I can pass the DTS test. I have to set my sound device to hw or spdif to bypass all the digital manipulation and then it passes bit perfect tests.


Now, I cannot understand anything.
There is a site:
FAQ: What is Bit-Perfect? - MP3Car.com
http://www.mp3car.com/vbulletin/faq-emp ... rfect.html

If you are running bit-perfect, you will have a more true reproduction from the media that you are playing.


This actually means something strange: "If you are running bit-perfect, you will have a less false reproduction from the media that you are playing." Right? Is this a kind of mythology?

Bit-perfect can only truly be tested using the tos-link out of either your sound card or a compatible audio codec for onboard sound for some motherboards and a DTS-decoder. http://www.mp3car.com/vbulletin/faq-emp ... rfect.html


"TOSLINK cables are widely reported to introduce jitter (essentially timing errors), which results is a less well articulated sound. However, many humans do not notice any resulting distortions. http://en.wikipedia.org/wiki/S/PDIF#Limitations"


Hence, bit-perfect is suggested for those "humans" who "do not notice any resulting distortions." Right?

S/PDIF lacks flow control and retry facilities, which limits its usefulness in applications outside of synchronous playback.

Because the receiver cannot control the data rate, it instead has to avoid bit slip by synchronising its conversion with the source clock. This means that S/PDIF cannot fully decouple the final signal from influence by the analogue characteristics of the source or the interconnect, even though the digital audio data can normally be transmitted without loss. The source clock may carry inherent jitter or wander, and noise or distortion introduced in the data cable may further influence the process of clock recovery.[3][4][5]. If the DAC does not have a stable clock reference then noise will be introduced into the resulting analogue signal. However, receivers can implement various strategies which limit this influence[5][6].http://en.wikipedia.org/wiki/S/PDIF#Limitations"


This means exactly this: S/PDIF is useful only for synchronous playback. It cannot ensure sound quality.

To summarize: "Bit-perfec" is not perfect. It is simply a kind of mythology, a sort of Orwell speak (FREEDOM IS SLAVERY).
That pseudo-perfect "bit-perfect" may make sense for ALSA, but you may get much better results with the magic Russian plugin for ALSA.

cesium wrote:igorzwx:

igorzwx wrote:Is it possible to get "bit perfect sound" with PulseAudio?

I dunno. What I was trying to say/do is this: hifi doesn't want "bit perfect source" for everything, but only for a specific use. I doubt he cares if (for example) the k3b burning success sound is bit perfect or not. This means we could have (assuming OSS install had worked for him and playback was gapless) kept most of the system using Pulse (since reconfiguring everything is work and Pulse can work with OSS if we modify its config file), and migrate only a few important programs (i.e. the FLAC player) to use OSS directly. After that, it's on a base of 'if we care enough, we'll change the output, but we probably don't care'.


Is it really so difficult to boot that Arch LiveCD and test whether OSS4 works with his soundcard?
Last edited by igorzwx on Fri Oct 15, 2010 7:08 pm, edited 9 times in total.
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: Replace ALSA/Pulseaudio with OSS4

Postby cesium » Fri Oct 15, 2010 6:07 pm

hifihere wrote:I never did get osstest or any OSS commands to work even though it says "already installed" when I try to re-install.
Darn. You may wish to follow this, and just build OSS from source**. "make install" should than do.

hifihere wrote:I did remove Pulseaudio but my player was broken after that so I reinstalled it.
Yeah, I don't favour this.

hifihere wrote:Bit perfect is working since I can pass the DTS test. I have to set my sound device to hw or spdif to bypass all the digital manipulation and then it passes bit perfect tests.
You mean output to "hw:0" etc.? Can't your player output to ALSA directly? If so, I think setting up the right output address should do..

Even if I was able to get OSS4 to work it looks like I have another problem that no one has solved. Gapless playback is not possible and that is a deal breaker for me.
I wonder, what makes you think it's not possible?

** Note that if you get source from mercurial rep, it's best to erase contributions/ dir before running configure, otherwise the build will break (at least until someone fixes this).
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby hifihere » Fri Oct 15, 2010 7:34 pm

I have researched what everyone else has concluded before I came along. The Vortexbox project is built around the MPD player which is flawed by it's inability to provide gapless playback. The only other player I can use with Vortexbox is Squeezeslave and it can only handle 16/44.1.

If I abandon Vortexbox and do a different Linux build I am not sure if there is any player that can playback gapless FLAC and provide up to 24/192 resolution.

All of this is moving away from the purpose of this forum but I would like to create a solution that uses OSS4 because everything I have read indicates that it sounds better than ALSA.

Bit perfect is simple if you can bypass mixers, volume controls, EQ and other digital manipulation of the source data. This has been researched to death in all the available OS's. The acid test is to pass a DTS encoded music file to a DTS decoder. If a single bit has been altered from the original data then it will not decode. This is not a problem for me to achieve right now, it works on my Windows and Linux builds just fine.

Again, my biggest problem is not ALSA vs. OSS4 as I had originally suspected. The problem that faces all Linux users is chopped up, gapped music playback. Whether you favor a Classical work or Dark Side of the Moon, the art is lost when it is fragmented with gaps.
hifihere
Member
 
Posts: 24
Joined: Sun Oct 10, 2010 8:34 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby igorzwx » Fri Oct 15, 2010 8:21 pm

hifihere wrote: The problem that faces all Linux users is chopped up, gapped music playback.

I do not feel myself facing such problems, and it seems that Cesium too.
And I have never heard about this problem on the Russian Ubuntu forum (perhaps, they name it in another way).
Perhaps, the Russians do not have such problems, because they use Russian players, such as CuePlayer, DeaDBeeF, Qmmp, and the like, for playing cue-flacs (CuePlayer - CUE проигрыватель http://code.google.com/p/cueplayer/ )

Have you already tried to boot that Arch LiveCD and test that "gapped music playback" with ALSA and OSS4?
http://godane.wordpress.com/2010/08/25/ ... 5-release/
You do not need to install anything on your computer, just boot and test
http://en.wikipedia.org/wiki/Livecd

Do you mean such "gaps"?
http://wiki.archlinux.org/index.php/Gap ... _from_MP3s
http://en.wikipedia.org/wiki/Gapless_playback

ripping/playing mp3 tracks without gap's between them.
http://club.myce.com/f57/ripping-playin ... hem-85385/

hifihere wrote:I have succeeded in getting Squeezeslave to operate only to find that it can only support 16/44.1 resolution.

So back to my original objective, up to 24/192 support, gapless FLAC playback and bit perfect output.

The Vortexbox/MPD player covers all but gapless FLAC playback. I was hoping that moving to OSS4 would help that problem. I have discovered that others before me have found the MPD player to blame for the rough FLAC playback. It is not an artifact of ALSA/Pulseaudio apparently.

Maybe I am trying to achieve the immpossible.


It seems that Windows Vista users have a problem similar to yours:
[slim] Gap of a few seconds in FLAC music playback on my SB1
http://www.mail-archive.com/discuss@lists.slimdevices.com/msg77468.html
[slim] Gap of a few seconds in FLAC music playback on my SB1
norderney
Mon, 31 Dec 2007 10:30:07 -0800

I posted the following in the Beta forum but have not had any replies
yet. So this afternoon, I decided to uninstall SC7 and downgrade to
SlimServer Version: 6.5.4 - 12568. So having installed version 6.5.4
and let it do a full music scan, I was very disappointed to see that I
am STILL suffering the same problem. Getting a gap of a few seconds
when doing things like searching for music or when the web browser
freshes the music playing screen. The music plays fine with NO gaps if
I am accessing other web sites other than slimserver. I have no problem
searching for music with the remote control, as long as the slimserver
web browser is not active.

I only get this problem with FLAC files. MP3 files play ok all the time
even when the web browser refreshes.

I am currently running SqueezeCenter Version: 7.0 - 15528 on a Windows
Vista
Ultimate Dell PC with 3Gb RAM.
My SqueezeBox is an SB1.


This is what I posted to the Beta forum, but is also seems to apply to
6.5.4 too for me!!!!!
I recently upgraded to SC7 and have been suffering a problem when using
the web browser. I control my SB1 with a Dell Axim PDA using Internet
Explorer. When the web browser refreshes the screen each time a new
track starts playing I get a gap of a few seconds in the music
playback. This also happens if I use the web browser on my PC. If I
close down all web browsers and control my SB1 with the remote control,
it works fine.


Is this a problem with my SB1?

Any advice would be appreciated.


ANSWER:
http://www.mail-archive.com/discuss@lists.slimdevices.com/msg77620.html
Re: [slim] Gap of a few seconds in FLAC music playback on my SB1
Richie
Wed, 02 Jan 2008 13:30:07 -0800

I haven't used my SB1 for some time now but from what I can recall the
behaviour you are seeing is quite normal.

The buffer in the SB1 is much smaller than the SB2/3 and is of the
order of a few seconds of music for flac (which will be transcoded to
wav), probably 10 times that for mp3.

This means that if your server is busy for a second or two doing
something else or querying the Slimserver/SqueezeCenter database it's
quite easy to get a dropout. You don't get the same problem with mp3
since the buffer holds 10 to 20 seconds of music.

The remote seemed to use less server power than the web interface and
was less likely to give problems.

I wasn't sure of the numbers above so if you look here:

http://wiki.slimdevices.com/index.cgi?H ... Comparison

you can see the size of the buffers. The numbers there suggest that the
SB1 can only store less than a second of wav data.

Hope this helps.

Richard


--
Richie


Read more:
http://www.google.com/search?q=gapped%2 ... 8&oe=UTF-8
http://www.google.com/search?q=gapped%2 ... 8&oe=UTF-8

Do you have such gaps?
Sound interruptions while playing music. - Windows NT / 2000 / XP
http://www.daniweb.com/forums/thread237047.html

I have some trouble when playing sound files with Windows Media Player or Media Monkey. When I play music there are very short interruptions. What could be causing this?
My system has 4GB RAM, an Athlon X2 and Soundblaster Audigy soundcard. It runs Windows XP



Sound interruptions while playing music in Ubuntu 10.10
http://forum.ubuntu.ru/index.php?topic=118611.0

Прерывается звук в Ubuntu 10.10
« : Сегодня [today] в 16:47:30 »
У меня прерывается звук при воспроизведении любых медиафайлов (аудио, видео, флеш - audio, video, flash) в Ubuntu 10.10. В чём может быть причина?
Графическая карта:
Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
Звуковая карта:
Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)


I have this card (ICH4), it works perfectly with OSS4, but it does not like ALSA and PulseAudio.
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: Replace ALSA/Pulseaudio with OSS4

Postby hifihere » Tue Nov 02, 2010 8:49 am

cesium wrote:I suggesting leaving Pulse there. It's too difficult to remove given package dependencies, and it's unnecessary really. Also, with some fiddling it can even output to OSS4. You can then migrate programs slowly to OSS if you want to (you may have to edit MPD config files to make sure it chooses OSS output).


Cesium, I have built a different box and OSS4 is finally installed and running. I took your advice and did not remove ALSA or PA. Now I need to get sound output. I have read the link above but I do not know how to edit config files in Fedora. Can the same changes be made through the GDE GUI?

I believe OSS4 has taken priority since none of the ALSA commands work anymore. The only device listed in Multimedia (GUI) is Pulseaudio. No sound right now on SPDIF.
hifihere
Member
 
Posts: 24
Joined: Sun Oct 10, 2010 8:34 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby cesium » Tue Nov 02, 2010 11:06 am

Put this file in ~/.pulse directory. You may need to restart Pulse service (not sure how it's done in Fedora) - probably do just "sudo killall -9 pulseaudio" and it (I think) starts again when a program asks for it. Hopefully, this will get Pulse working, and with it most GUI stuff. Afterwards, we'll look into more direct use of OSS. Also, do you want default output to go via SPDIF? If so, does outputting to /dev/dsp emits sound via SPDIF? (You can test with something like "ossplay /usr/share/sounds/*"). If not and you want sound mainly via SPDIF, we may have to do some other changes.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby igorzwx » Tue Nov 02, 2010 2:11 pm

cesium wrote:not sure how it's done in Fedora


There is a very interesting "howto" written by Carla Schroder, the author of the "Linux Cookbook" and the "Linux Networking Cookbook" (O'Reilly Media). It deserves a try (not sure how it's done in Fedora):

"Ubuntu Tip: Turning PulseAudio On and Off" by Carla Schroder (July 22, 2010)
http://www.linuxplanet.com/linuxplanet/ ... ls/7130/2/

To be fair, I do not believe in the efficacy of such solutions.
I did try to disable PulseAudio in all possible ways. Some "solutions" seemed to be effective, but in a short term. A few days later they failed to work for some strange reason. Eventually, I came to the conclusion that the best solution is the most radical one.
igorzwx
Supporter
 
Posts: 998
Joined: Sun Jun 28, 2009 9:31 pm

Re: Replace ALSA/Pulseaudio with OSS4

Postby hifihere » Tue Nov 02, 2010 4:10 pm

cesium wrote:Put this file in ~/.pulse directory. You may need to restart Pulse service (not sure how it's done in Fedora) - probably do just "sudo killall -9 pulseaudio" and it (I think) starts again when a program asks for it. Hopefully, this will get Pulse working, and with it most GUI stuff. Afterwards, we'll look into more direct use of OSS. Also, do you want default output to go via SPDIF? If so, does outputting to /dev/dsp emits sound via SPDIF? (You can test with something like "ossplay /usr/share/sounds/*"). If not and you want sound mainly via SPDIF, we may have to do some other changes.


SPDIF and USB are the main ways I want to output. With the original Vortexbox/ALSA build that was the only way I could get bit perfect output. I had to set the built in player which is MPD to output to "hw" to bypass the volume controls and re-sampling. I don't want mixers and features changing my data, just native rate passed straight to my external DAC.

The other thing that should playback audio is the built in network streamer, which is the Logitech SqueezeBox Server 7.5.1.
hifihere
Member
 
Posts: 24
Joined: Sun Oct 10, 2010 8:34 am

Re: Replace ALSA/Pulseaudio with OSS4

Postby cesium » Wed Nov 03, 2010 1:05 am

So if I get this right, you want bit-perfect output with MPD and don't care much about anything else? Well, than, we can leave Pulse working on main output (did you try that file for Pulse?) right now, and set up MPD to output to /dev/oss/oss_hdaudio0/spdout0 (I guess that's where the SPDIF is at? You can test with something like "ossplay -d /dev/oss/(etc.) /usr/share/sounds/*"), right?
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

PreviousNext

Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron