Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 17459 ideas, 107690 comments, 2263278 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #14682: Unify sound drivers and the sound api

Written by pyrates the 22 Oct 08 at 02:46. Category: Hardware support. Related project: Nothing/Others. Status: New
Rationale
I really think we need to unify the way sound is done on linux.

Another article on the confusing situation with Linux and sound:

http://www.matusiak.eu/numerodix/blog/index.php/2008/12/19/linux-audio-confusin g-as-ever/

703
votes
up equal down
Solution #1: Unify sound drivers and the sound api
Written by pyrates the 22 Oct 08 at 02:46.
Don't have 2 different systems where one is for professionals and the other is for end users. Windows and OS X only have one, so should linux. Second is that going with Pulse Audio is a start, but it only supports 70% of the alsa api calls. So changing from Alsa to Pulse and we can do even less now. I say we build onto Pulse including the sound api Jack, so that we only have one system and not force developers to use different api calls from different libraries, instead of confusing them like we are currently doing.

Main things it needs:

1. Low latency. Part of Jack but we shouldn't have 2 systems, it should be one.
2. Sound event support. There's a separate library for this and it should just be part of pulse instead.
3. Multi-threaded support for multi-core cpu's.
4. Realtime ac3/dts encoding. I could never get this to work with alsa.
5. Sending out compressed audio. This seems to be controlled on an application basis, but never in an easy way.
6. 7.1 analog audio output. I'm tired of my sound blaster only having 2 channels of audio output. I want more.
7. Mixer on a per application basis like Vista has.
8. The ability to play more then one sound at once. I don't think alsa allows for this.
9. Select which output device to use in systems where there may be more then one sound card such as those with a builtin sound card and then a usb headset. This should apply to default speaker output and default mic to use.
10. Once point 9 is done, then implement the ability for an individual application like skype to either use the default settings in point 9 or set it to use its own settings. For example the default speaker output could be your sound card and mic port on the sound card but for skype you'd want to use the usb headset as the speaker output and the usb headset's mic as the mic.
11. Allowing the end user to select how many speakers they have connected based on the driver for the sound card they have loaded. So if the sound card supports up to 7.1 audio; you can select from 2, 2.1, 4, 4.1, 5, 5.1, 6, 6.1, 7, or 7.1. But if the sound card driver indicates only 5.1 audio support; then you'd select from 2, 2.1, 4, 4.1, 5 or 5.1.

Notice I didn't mention anything about power there or the ability to send sound events over the network. I don't care about any of this as an end user.

Now OSS can do most of this, but it is rejected by the open source community because it use to be closed source and is now again under the gpl, so politics has interfered in something technical. And since the new ubuntu has switched over to Pulse, might as well stick with it instead of re-inventing the wheel which seems to happen a lot in open source.
-3
votes
up equal down
Solution #2: OSS
Written by NomadDemon the 22 Feb 09 at 12:38.
OSS works good for all applications, alsa doesnt.. it makes errors "device in use" even with pulseaudio deleted

you could make OSS also a native like alsa [alsa is choppy.. OSS works perfect]
10
votes
up equal down
Solution #3: OSS v4.1 (just released March 2009)
Written by ian.halpern the 22 Jun 09 at 16:32.
Open Sound System v4.1 is exactly what we have all been waiting for. It unifies sound drives and application API, and does it well. Ubuntu should drop PulseAudio and ALSA and use OSS 4.1 as the default sound system.
Here are some reference material on how to install it if you want to try it out for yourself

https://help.ubuntu.com/community/OpenSound
http://www.harshj.com/2009/05/16/get-rid-of-all-pulseaudio-problems-use-oss/

Also, I had to change /usr/lib/gdmplay to:

#!/bin/sh
/usr/bin/ossplay -q $@ 2> /dev/null

to get the login music to play.

I am in the middle of porting my applications over to OSS and am extremely pleased with the API so far.

It is by far our best option, and not just being our best option it is has been implemented very well, and includes great documentation!

NOTE: This is not the depreciated OSS 3.x. OSS 4.x is very active and up to date.

Propose your solution

Attachments


Duplicates


Comments
rainstride wrote on the 22 Oct 08 at 14:51
im pretty sure 8.10 has done this, im using it right now and with the recent updates the sound system works like it should, everything seems to be unified now.

a lot of the things you listed work for me.

rainstride wrote on the 22 Oct 08 at 14:53
also i can now run as many apps as i want, all of them playing sound. and hear them all no problem.so..... 8 days to go!!

gunjam wrote on the 22 Oct 08 at 14:56
Pulse can already adjust volume levels per application.

Rabbid wrote on the 22 Oct 08 at 15:36
rainstride: Even if you can hear audio fine doesn't mean that the amount of APIs and systems in use isn't a total mess.

PulseAudio will probably fix most of the problems the users face, but developers still have far to many different APIs to work with.

bryhoyt wrote on the 22 Oct 08 at 23:43
Brilliant idea. We really need this.

It's taken so long for Linux to have a half-elegant sound backbone, and we've still got a long way to go.

I think I agree with all your points -- a rare occurrence.

rainstride wrote on the 23 Oct 08 at 07:36
agreed...

crazyivan wrote on the 3 Nov 08 at 00:34
Actually I thought windows had 2 systems. WDM for the consumer and ASIO for the pro. Still, the point is moot. I've been playing around with Mixxx and it's not working too well (not sure how far it's Mixxx's fault and how far it's the sound modules), and the sound drivers and sound api complications aren't helping. In particular, using an inbuilt sound card, Mixxx chokes when you cut the latency too much. Multithreading would probably help.

If, like a pro, you're using an outboard audio interface (USB or Firewire), things get more interesting. Some apps (like gstreamer) will recognise the card and pipe to it. Others (like Flash, Firefox) won't and will proudly blast the sound solely from the inbuilt sound card (and if unlucky, inbuilt laptop speakers).

+ 1. + a lot more if I could. Can't fault any of the points.

spadger wrote on the 3 Nov 08 at 16:29
I agree. Although everything is working smoothly on my desktop trying to set up sound properly on my laptop (vaio vgn-fs215z) is a nightmare. one application blocks another and won't unblock until the application is killed.

I'm trying to convert friends and family to ubuntu but it's difficult when there's either no sound from youtube/firefox/flash or no sound from skype.

I've got a feeling it's things like this (and perhaps wifi connectivity) which can potentially put off newcomers to linux. If it were possible to make setting up sound very simple and consistent then it would be a massive boost for less tech users and also for the community.

digisus wrote on the 6 Dec 08 at 18:25
100% agree. We need to push this topic much higher in the stack of ideas. Here is what I did and how you can help (takes only 5 minutes):

I searched for other sound-system-unifying ideas on brainstrom and suggested them as duplicates of this idea. The votes of every accepted duplicate-idea will get merged and this will push up the sound issue in the idea stack.

I started by adding ca. 10 other ideas. Please help by adding more related ideas that suggest to unify/streamline/improve the sound system on ubuntu. Thanks!

andydread wrote on the 22 Dec 08 at 16:39
I totally agree. In Intrepid I expected to be able to fire up Audacity and press record and simply record streams from songbird. Oh well. What planet was I on when I dreamed that. It turned into a project and I could never make it work. On one PC I got it to record but the volume was so low it was unusable. It looks like Linux Audio will be in its infancy for years to come.

seeker5528 wrote on the 22 Dec 08 at 22:13
"For one thing, don't have 2 different systems where one is for professionals and the other is for end users."

There is no question there needs to be some unity in the audio space, but to my way of thinking the above suggestions is going in the wrong direction. It's like saying all the distributions should unite around KDE or Gnome or that KDE and Gnome should merge.

If you are doing professional audio then Jack is the preferred solution and there is reason for it to take complete managerial control of the audio interfaces. For the more casual users that want to use those same applications, having jack take complete control is more of an annoyance than a desirable feature.

Similarly with Pulse Audio there are use cases where it is desirable for it to take complete managerial control, but I think the majority are not using these feature, so having it take complete control is more of an annoyance than a desirable feature.

So the first thing is these sound servers should not by default take complete control of the audio interfaces, but there should be an easy way to enable/disable exclusive control.

The second thing... Why do all these sound servers implement features that alsa has, but completely independently of alsa? There are alsa capabilities to provide software mixing of audio streams, redirect audio streams, tie in audio FX, etc....

Where there is not a good GUI interface to do something create one that uses the existing alsa stuff as much as possible. Where in addition to not having a GUI there is a belief that the existing mechanism for doing something sucks, provide a better mechanism that ties in with alsa and can be used by other alsa software without blocking the ability to directly use other alsa features or work with the alsa guys to improve the mechanisms and interfaces.

Think of alsa bing like X.org and the sound servers bing like KDE and Gnome.

X.org, through Xrandr and other things, provides capabilities to resize the desktop, stretch it accross multiple monitors, move windows to other desktops or monitors, drag and drop, etc... Then it's up to the different desktop environments and window managers to make use of those features, so you can mix and match utilities and applications with minimal concern that they will work together and function as intended.

This is the type of relationship that should be building between the different sound servers and alsa.

Later, Seeker

bewst wrote on the 23 Dec 08 at 08:53
One of the goals of said integration should be a comprehensible mixer GUI. Please see https://bugs.launchpad.net/bugs/187848

Dummy00001 wrote on the 23 Dec 08 at 13:24
I would gladly vote the idea up, if it also would allow me to use all my three audio cards under Linux.

At the moment, every application uses whatever it finds first. No driver problems: all cards are recognized. This is pure interface problem: there is no proper "default" sound card switching interface. One which is present doesn't work for half (most?) of applications (VLC, Flash, MPlayer, etc) where sound is actually relevant.

ALSA as interface is fine with me, but as was highlighted above ("ability to play more then one sound at once") it is also way too low level and often appears to be broken due to H/W limitations. ALSA has a library to workaround some of the problems, but I guess it is not always possible e.g. playback from multiple sources when H/W doesn't provide mixing.

Honestly, I'm all for unified sound interface, as I see it my only hope to ever make my all sound cards works in Linux nicely and switching between them painless. At moment it is even more broken that dual head support.

jymbob wrote on the 23 Dec 08 at 20:26
I'd tend to agree with the initial suggestion, and have had similar experiences to Dummy00001 which are, in a nutshell:

Pulseaudio works OK on a standard system with one soundcard outputting over analog to upto 6 discrete speakers (might work with 8. haven't got 8 to test)

However: add in a second soundcard and all bets are off.
Attempt to route sound from one app to one output (e.g: in-game audio in/out to headphones/mic, music to SPDIF) and you might as well just ditch pulseaudio and fight with ALSA.

I'm often left with the feeling that more testing of non-standard systems is required with new ubuntu distros. I'm aware that this is a huge amount of work, and that the current state of affairs is amazing compared to what was offered in Warty, (...Hoary, Breezy, Dapper, Edgy...) but there is still a long way to go to have a system that is as customisable as manually editing alsa files, and as easy to use as gnome sound controller.

Jayferd wrote on the 26 Dec 08 at 07:45
JACK also needs to be either un-borked or made irrelevant. It refuses to work with certain sound cards, barely has a ui (even qjackctl still sucks) and it's something no end user wants to deal with. I want to be concentrating on writing and recording music, not dealing with JACK getting the xruns - or even better, failing to figure out how to get sound to my card.

Tom Mann wrote on the 7 Jan 09 at 15:53
This desperately needs attention.

Our competitors (namely OSX and Windows) have a single audio API which does everything.

On OSX, there is CoreAudio, which handles all MIDI, PCM audio and hardware mixing.

Since Windows 98SE, Microsoft introduced the DirectSound audio system, replacing Windows MME (MME however is still available)

Both of the systems offer low latency, a single set of drivers, and are complete.

On Linux now, we have ALSA and OSS. OSS (3.8) has seemingly been deprecated (OSS is on 4.1 now I believe) and we will be left with ALSA.
Then we have PulseAudio on top of that, adding functionality.
Then we have JACK on top of that, adding functionality.

To put it simply: to have many Sound Systems is a burden on the user (who has to switch systems to get their sound working), on the developer (spoilt for choice but seriously, one API?) and ultimately on Ubuntu/Linux itself.

I repeat, this desperately needs attention.

Rabbid wrote on the 10 Jan 09 at 06:07
PulseAudio (connecting to ALSA) is going to be default in GNOME, and KDE cleaned things up with Phonon, so we are definitely heading in the right direction.

What library people choose to use doesn't really concern me as long as they integrate properly with the sound system used.

aidave wrote on the 26 Jan 09 at 21:50
Sound in Ubuntu is absolutely a nightmare.

I have been trying to get Ubuntu Studio (Intrepid) to work, with varying degrees of failure. I have since moved to Ubuntu Studio (Jaunty Alpha 3), to see if there has been progress made.

It looks to me like Jaunty is actually going backwards from Intrepid!!

There needs to be a concentrated effort to bring proper, plug-n-play, modular sound to Linux. Unfortunately this will mean a lot of funding.

Hopefully Canonical can step up to the plate.

This will not take a few scattered bug fixes. This requires a dedicated team effort working full time! Please, for the love of god, fix sound in Linux.

Endolith wrote on the 17 May 09 at 01:39
Pulseaudio is confusing as all hell. How many different dialog boxes do I need to open to get sound to go from an application to the sound card?

RgnKjnVA wrote on the 2 Jun 09 at 16:38
I wish I had more than one vote to give this. PLEASE work this out ASAP! Frankly, I'm not sure how a unified sound solution has taken this long to sort out but be that as it may it is positively maddening. I'm using Intrepid and sound via Pulseaudio is most definitely NOT 'just working'. Flash does not route to PA no matter what form of black magic I employ and email notification sounds from Thunderbird causes crashes though I can see that it routes to PA properly. Seriously?! I have been on a months long quest to try to get this resolved and have come to the conclusion that "It's not me, it's you". Tonight I disable/uninstall PA and try to figure out how to route my audio to my BT headset without having to close apps/relogin/reboot/manually run scripts and HOPE that it works.

pyrates wrote on the 10 Jul 09 at 07:49
@RgnKjnVA

Simple. Too many cooks in the kitchen. When you have no leadership and everyone has their equal say, including the developers who want to get something up and running that only they know how it works, this is what you get. A complete mess.

Plus they let politics get in the way instead of looking at it from a technical perspective only. Clearly OSS is superior, but because it use to be closed source, they refused to use it. Now that it's open source again, they still refuse to use it because it's been "deprecated" by the linux kernel.


Post your comment