On Mon, 16 Nov 2009, Nick Rout wrote:

But are you using something on top of alsa, like that plague they call
pulseaudio?

Nick - you have jumped on raw nerve there. Audio on linux.
Ten years ago, I started on linux, and got paid for my efforts. There were many comments from people like, "linux is ready for the desktop" - like ready for the average user..

During that ten years, I have been associated with the opalvoip (was openh323) project at sourceforge where an opensource sip, h323 and iax2 library is provided. The biggest problem area on linux, and this is by a country mile, has always been sound. Even though the alsa code in the project was written to the alsa spec - there were still hassles. Originally, we just said to people to get another sound card. Get opalvoip to use the second sound card, and the linux desktop can use the first sound card.
 -This worked, but was not comfortable for the user.

people have complained about the latency in sound for opalvoip based software (such as Ekiga). For USB based sound systems (head phones) you will see 5 sound buffers used (each 20ms long, so add 100ms to the latency) to avoid gaps in the audio stream. In the good old days of OSS, 2 sound buffers was sufficient (==>40ms), and things were good..

one of the problems was that opalvoip generates sound at a sample rate of 8khz - system apps run at much higher rates - over 40khz. Even though the alsa spec implied that two applications can share the same sound card, because of the difference in settings used (sample rate, buffer size etc) the sound device cannot be shared.

The alsa library is woefully deficient. You list the available pcm devices from a particular sound card, and you get a long list, including names like 'surround_51'. But the sound card has four sockets, red, green, black and blue. So where do I plug my headset in? Put two identical pci sound cards into a box. Reboot the device three times. On each of the reboots, you will notice that the sound cards are ordered differently. Which means that for the average user, on each reboot, he has to crawl down behind the machine and move the 3.5mm plug.

One of the alsa people reviewed the sound handling code used in opalvoip. Opalvoip had apprarently used some "unsafe alsa code", and needed to buffer audio in software, and then give the audio to the sound device. This I could not understand - surely buffering would be done in the sound library. Why does the application have to contain code that belongs in the sound library?

Which leads me to the view:
 The only advanced thing in Alsa is from the name
    (advanced linux sound architecture)..

==================
And then along came ubuntu. 7.10 was a nice release for sound. When pulse was introduced at 8.04, things went bad. the ubuntu ui contained a mixture of alsa, oss, pulse etc controls. Was not friendly or intuitive. Did not manage multiple sound cards well.

Multiple sound cards are very very common. It is an ordinary laptop (with sound on the motherboard) and a usb headset. On plugging the usb headset in, you expect to be able to direct all system sound to the usb headset. Flash plugins did not respect this. Some sound went to the headset. Sound from a youtube video went to a randomly selected audio device.

I could never understand why the AMD single core 64 bit box at home did a terrible job of playing videos of the local hard disk. The audio quality was shite. Video was fine - no gaps..

I have a number of children, who are very effective at testing software. When presented with a choice of a windows or linux box to use, they always chose the windows box. The inability to do sound easy was a major imepediment.

For those of you who do not know,
pulse stands for "pathetic useless linux sound engineers".

now, the pulse people say that ubuntu failed cause they say ubuntu did not "read the source enough and participate etc etc.." Rubbish. The simple truth is that the pulse people failed to document and write usable front ends.

Admittedly, there were many apps&drivers which contained bugs. Well yes - but this is more of a documentation and testing issue.

I never would recommend linux for the average person - sound is too much of a hassle.

================================================================

ubuntu 9.10 has been a pleasant surprise.

a)That amd64 box can now play video files from the network
b)on box a, ssh to box b, play a game, sound comes out the speaker of box
  a.
c)handles multiple sound cards much better. The selection of the preferred
  sound card is much better, and more intuitive
d)my kids will use the linux boxes now
e)The ubuntu desktop interface is much more consistant now, and seems to
  only contain pulse based controls.
f)Linux has moved closer, much closer, to being ready for the average
   person.



Derek.

p..s - I perhaps should have enclosed this in rant tags. I guess all I am trying to say is that,
"surprise surprise, the pulse on ubuntu 9.10 is a significant improvement"

-- Derek Smithies Ph.D.
IndraNet Technologies Ltd.
ph +64 3 365 6485
Web: http://www.indranet-technologies.com/

"The only thing IE should be used for is to download Fire Fox"

"My favorite language is call STAR. It's extremely concise. It has
 exactly one verb '*', which does exactly what I want at the moment."
    --Larry Wall

Reply via email to