Audio in linux, how to put it into words? How about: oss, alsa, pulseaudio, esound, arts, portaudio, jack, gstreamer, phonon. :googly: Did I miss any? Embarrassment of riches? Or just embarrassment?
I will not rehash history any more than to say that between buggy/incomplete drivers for sound cards and the wonderful world of alsa I've never been able to understand how the hell audio works beyond getting output and, sporadically, input. I am the quintessential dumb user of linux audio, even though I have tried to figure it out.
But let past be past. Ubuntu 8.10 Intrepid. Pulseaudio ready and everything, since 8.04. Why Ubuntu decided to plug in pulseaudio without setting up any gui controls for it is beyond me. All I know is that occasionally sound output will stop working (I get 2 seconds of output and then it stops) and then "pkill pulse" cures it.
Let's run through the list.
alsamixer
I've learned to use alsamixer to fix low level audio problems. It is reliable in that it gives me all the channels on my sound card, so I always use it to mute/unmute my microphone and to untangle the master/pcm/headphones/front speakers settings caused by mixers that only allow me to control the volume of one channel and apps that output on god knows what channel.
That's alsamixer on a Ubuntu 8.10 desktop with all updates installed as per today. Here's the same thing on my laptop.
Same distro, same version, all updates installed. And I have made no conscious choice for this to come about, all I did was install the pulsaudio gui tools. All of a sudden, alsamixer is useless as it only has access to a single "master" channel. It would appear now that pulseaudio is sitting between the sound card and alsa, but does that sound right?
pulseaudio gui
pulseaudio is here, might as well use it, right? Ubuntu ships a bunch of pa* packages that are gui tools for pulseaudio (not installed by default). This one is called pavucontrol. It lets you set volume per audio stream. I love this, I've wanted to have it since forever.
But then it comes to output and what do I see?
A single output device. Where is my master, my pcm, all my channels? What's more bizzarre is that pulseaudio says it's connecting to alsa while alsamixer says it's connecting to pulsaudio. Surely that way madness lies?
What's worse, pavucontrol is a gui app without any kind of systray integration, so much as I would like to use it as an easy-to-reach mixer, I can't.
kmix
I run kmix in my tray, it lets me set the volume by scrolling the mousewheel over the icon, which is exactly what I want. It's not a terribly impressive mixer, as it only lets me select one channel to control, whereas what I really would like is to be able to lock several output channels into one, otherwise I'm never really in control. So the best I can do is set the volume to max on master, and tell kmix to show me pcm. That seems to work well enough.
It appears I have two identical channels, but the leftmost is misnamed, that's actually Master.
Now, let's see. alsamixer doesn't show any of these channels, because it delegates to pulseaudio. So kmix connects to... god knows what, but at least I can access these channels.
gnome-volume-control
Gnome's volume manager is an interesting one. It has a combo box for devices. I'm showing here all the devices related to output and how channels are connected.
The good news is that the channels in the default mixer correspond to those in kmix (sweet sanity!). But then there is that bottom mixer with a channel of the same name as the single output channel in pavucontrol. And yes, they are the same (and the same as the single output in alsamixer).
But this channel appears to be some kind of composite output channel that has no bearing on any of the output channels in the top mixer (or in kmix). (Ie. while it might appear to be a composite pipe that aggregates the flow of all these standard channels, it's actually a pipe that sits after all of them. If pcm volume is 0, this channel won't receive any input, and will be mute no matter its volume setting.)
So neither can I effect the settings of master/pcm/etc with this channel nor vice versa. That means if I want to use this single channel as my master volume control, I have to make sure that absolutely no application can mess with the volume for any of the standard master/pcm/etc channels. Good luck with that.
A sane spec
I know this sounds crazy, but what's it gonna take to get a single server+mixer applet that
- captures every possible audio stream, no matter the audio server/api it's on,
- prevents applications from messing with master volume controls (eg. mplayer),
- has a single virtual channel controlling all the underlying output channels, so that I can have a single master volume slider,
- has per stream/app volume controls pulseaudio style,
- integrates well into the systray,
- integrates with laptop hotkeys
?
UPDATE: Ubuntu users can now vote on a proposal to unify sound systems on ubuntu brainstorm. Hopefully this idea and the related ones can gain some traction with Canonical to attack the problem.
Hey guess what ALSA does that already! Wow who would have thought
I suppose if you know how to use it, then maybe it does. But I have no idea, and no distro comes with an out of the box setup that actually does this (asoundrc or whatever the heck it takes). So if alsa was so capable, why hasn't it been done ages ago?
And where is this mixer applet I'm looking for?
ALSA seems to work the best out of those.
Hey try this:
alsamixer -c 0
:)
yup, just finish alsa. "alsamixer" is the command.
Here, read this, Everybody... http://insanecoding.blogspot.com/2007/05/sorry-state-of-sound-in-linux.html
Oh man, audio on GNU/Linux is such a NIGHTMARE! I've been using Linux for about 5 years, I worked with Linux professionnally, but I can't get it right!
Someone told me that ALSA supported software mixing (multiple apps playing sounds at the same time), and I followed some tutorials on the Web to get it working. Guess what? It didn't work! What a surprise!
Yeah when I upgraded to Intrepid I started noticing sound problems.
I finally uninstalled pulseaudio and everything works fine now, including wine apps. Delete or move this file too though: /etc/X11/Xsession.d/70pulseaudio
@aoupi
Thank you very much, I have my old alsamixer functionality back. :)
Surprise. You don't know anything about linux, managed to successfully install ubuntu and upgrade (which is easy to do), and then breaks things you don't understand in ways you don't understand. After this you complain that linux audio is confusing. If you sat down and spent any amount of time actually learning about your upgrade system, alsa, etc. you'd be able to sort it out. Surprise, things you don't understand are hard to understand. Wtf did you want?
"If dude wants advanced controls over his audio output, maybe he should learn how to read a man page. He can alsamixer -c0 while using Pulse and have direct, non-PA sound controls."
from http://www.reddit.com/r/linux/comments/7kkid/linux_audio_confusing_as_ever/14n4
@saon
Thanks for the highly uninformed and arrogant response. If you'd actually read the text before writing your knee jerk comment you'd know that this has nothing to do with any upgrade, nor is anything broken.
Yeah, my alsamixer only gave me master control. =/ I just used gamix* to fix the volume. And the hotkeys on my laptop work. =)
I'm glad you mention this, as sometimes the sound is quite quiet without a clear way to fix it presented.
*not sure if this is the same as the gnome one, or why it works and alsamixer doesn't.
Nice too see that Linux is starting to cath up to the capabilties of Win95 Great work team !! A few more years and you will have a mainstream OS there fella's LOL
I would love it, if people would stop posturing about their pseudo linux knowledge and actually make a constructive comment?
Here in Brazil we say that Linus is a deaf guy :P
ubuntu 8.10 maps the alsa device to pulseaudio so as to supposably make it easier for apps that do not work with pulseaudio natively to continue to work without seeing errors like "Sound device in use" and what not, while still giving you the benefits of being able to use native pulse apps.
I'm still not quite sure why the other mixer elements don't show tho, although i have seen the same effect.
I still choose to use pulseaudio on ubuntu due to the padevchooser and paman (this shows up in the systray if you set an option to do so, and the volume control is in context menu) tho, since it makes it super easy to set up network sound discoverable via zeroconf (avahi).
as far as gstreamer is concerned.. if all your audio apps used gstreamer (and the gstreamer pulse plugin) then you wouldn't need the kind of hack that ubuntu uses by overriding the REAL alsa device to speak directly to pulse
but apps like skype (recommend running via padsp) and mplayer kind of spoil the party, since they are often either completely missing pulse support, or are not compiled with it
This situation is getting closer and closer to being resolved every day, so just hang in there
This post is ironic because we just had a conversation about how much PulseAudio sucks in a Linux IRC channel I frequent. I am going to have to second, third, hundredth or whatever the notion that the KERNEL-level sound server built into ALSA is sufficient, and any updates to the sound system should happen there.
Gstreamer (and phonon) is a totally different idea though, it's a media framework (can play compressed sound and video directly, eg MP3/OGG) - it is not a general sound API. So it's fine. But having multiple sound servers is the dumb thing.
Hey fucking asshole, guess what. Linux wasn't made for fucking pussies just like you. You better get up and use XP or Vista, some of that pussies shit before hoping to get any support on your whining post. You don't even know what the fuck you're talking about. OSS and ALSA are both low level drivers to the underlying hardware for your fucking sound card, all the rest which you made menction of are user level software. But you're a fucking clueless son of a fucking bitch to be able to tell the difference. What led you to Linux in the first place? If you're such a fuck to learn what's involved and the FUCKING BASIC differences between the pieces of software that you happen to name.
You are as lame as your sorry ass, and I'm as drunk right now as your father who gets at home and fucks you and your little sister for being such a pain in the ass.
@numberodix - thanks... you just wrote what I've been thinking too. What annoys me is that this machine (when I dual-boot to Windows XP, it's a work box first and foremost) has incredibly loud sound, and even with the alsamixer -c 0 command and everything turned up 100%, it's still only about 1/2 as loud as Windows sound... what gives?
Next thing to tackle... adding a USB printer (my Canon i960)
The main issue with the complexity of sound on Linux is less knowledgeable users who don't know how to read man pages, nor do they want to.
I've been using Linux for nearly a decade and I had a sound problem I couldn't solve. My current laptop has a built in mic, but my ALSA-using applications seemed to only want to use my mic port, which forced me to purchase a microphone to plug in after giving up trying to get Gnome's volume control, alsamixer, or a pulseaudio GUI tool to switch from mic to the built-in mic. Eventually, I found out about alsamixer -c0. A tab press to switch to the capture screen, and lo and behold, there is an input setting that switches between front mic and mic.
The point is, an average user of Ubuntu probably isn't going to look past Gnome's sound settings, much less actually use alsamixer, and they shouldn't have to. There is a lot of room for improvement regarding the sorry state of sound in Linux.
I set up 2 pc's with the 64studio distro specifically for audio, and while I haven't given up on the idea, in practice I have had little success. For the mixer problems I have to run the "alsaconf" command every time to get the gui to show my soundcard. Before I figured that out I couldn't get it to do anything. 64studio comes loaded with neat apps, some of which I like, but speaking as a musician they just aren't that useful as audio tools. Maybe if you hired an engineer who was good with linux you could get good recordings done, but to try and play your instrument well in between command lines seems like asking a bit too much in my own experience. Then again I am a linux novice, and it's possible that the whole process could become more workable when (if) getting around the os becomes easier and takes up less of my attention. I have wine up and running and I got it to install FLstudio and even my projects and settings folders from my windows machine. The gui works fine, but the sound doesn't work at all, even after the "wineasio" command. Maybe I'll learn how to make it all work if I concentrate on my computing skills, but frankly I'm not all that motivated to do that when my windows machine with Fruity Loops does what it says it does without taking up all of my attention so I can make music. Even my ancient Mac G4 with Ableton Live on it is useable to make music with. It's slow and there's a lot of latency, but it remembers my settings so I don't need to spend a half hour fucking with it before I can play.
Like I said, I haven't given up on the idea of audio on linux, and I have a few hundred hours invested in it already, but the return on that investment has been very frustrating compared to similar effort on the other two os's.
"alsamixer -Dhw" works too.
I tend to agree fully, that why I started the Wikibook for configuring sound on Linux.
http://en.wikibooks.org/wiki/Configuring_Sound_on_Linux
I'd love for you to expand it with your own experiences, learn from it, and clarify what needs to be clarified. I got my stuff working ;) Good luck.
GNOME ALSA Mixer provides a nice interface for the CLI-based ALSAmixer. Comes in handy for stuff that GNOME volume control can't help you with.
all i have to say is AMEN! audio works great for me for the regular stuff, but once i got into all the sweet audio production tools for linux i couldn't do a damn thing. so much software and i can't use it one bit. just try throwing jack into the mix and your head will be spinning.
saon, Jeff Cooke: congratulations on escalating the definition of 'dick' to new dimensions and making Star Trek sound like non-fiction.
...and saon, upgrade your browser. It's embarrassing to see a linux user that doesn't know how to upgrade their box or competent enough to find a distribution with a robust package manager that makes this possible.
Anyway, regarding ggervais: it might be safer to remove any configuration of alsa first. Rename or delete ~/.asoundrc and /etc/asound.conf and reload your sound modules ('alsa force-reload' in debian).
Straight from an ALSA wiki: For ALSA 1.0.9rc2 and higher you don't need to setup dmix. Dmix is enabled as default for soundcards which don't support hw mixing.
Just make sure you're running a fairly recently updated distribution. As of now, ALSA 1.0.18a is out... a nice number to check your packages against.
When you want to run the newest software, you also run the newest bugs. Please post your bug on bugzilla so the developpers can take care of it.
The first thing I do on any distro is uninstall puseaudio/phonon/esound/whatever .
Just bare alsa works fine for almost all apps and the extra indirection always causes extra delays which messes up movie watching etc. Alsa can do software mixing just fine (though I haven't really found a way to set the relative volume of different apps yet). The only reason people insist on using a sound server is that it's supposed to be more portable.
And now we have the situation where most apps use a wrapper library for alsa so they are not tied to one platform, and then alsa gets wrapped in pulse, which emulates alsa again to have the apps understand it.
ohwhyohwhy?
You should think twice before adding such stupid titles to your blog posts.
You label yourself as a user. This means that you aren't a developer, right? If that's true, then you should be concerning yourself with "Linux audio" (when in fact, you mean "Ubuntu audio).
Ubuntu and Fedora made a terrible mistake moving from ESD (a system that worked reasonable well for almost a decade) to Pulse, which was unproven and had a myriad of problems.
Some distributions, though, get it right. They use ALSA and set all applications to use ALSA by default. Or they use ESD and use Gnome apps. Or they use KDE apps and use Arts (KDE3) or Phonon (KDE4). The very few people who need real-time audio know who they are and how to set it up.
If you're a developer, audio on Linux is a difficult matter. If you're a user, it isn't really. If you have Fedora 9 of Ubuntu 8.04/8.10, then your distribution is screwed up. That fact has nothing to do with audio on Linux, though.
s/should be concerning/shouldn't be concerning/
Simple fix... dump Linux and use Windows.
I switched to linux a month ago and audio is one reason I would not point regular users towards linux- as with many other things, mostly media related linux lags. Sure, you can do it- and I have, but fighting and working for functionality is not something people are interested in. bums me out, cause I am into Ubuntu, i wish I could recommend it to the average user. I send them to Mac
Great post. I myself am a Linux user, but not a power user like most. I did a post on my blog once about how Linux has come a long way, but isn't quite there yet. I think this perfectly illustrates what I was talking about. Daeng Bo makes a great point to. This is more of an Ubuntu thing than a Linux thing, but I think people understand what you mean when you generalize to "Linux".
Good job.
Well, your post is a bit ignorant as well, so I don't see how you can complain about the comment of the same kind.
You have mixed so many things that have nothing in common.
Alsa and OSS are low level audio layers (one developed for linux, and one standard for all unixes)
Arts is dead for more than a year (or two) - with the arrival of kde4 it is finally admitted
Gstreamer, esd, jackd, ,,, are high level layers that use one of the low level ones, or they can use one of the other higher level ones
Phonon is an abstraction library that uses some of the higher level layer for actual implementation, so it is not a new audio system (by default, in gnu linux, it uses gstreamer).
And, how exactly you can conclude anything about the frameworks/systems/layers from the fact that you have multiple *mixers* which behave differently?
p.s. Read the man page of mplayer to see how not to use hardware mixer, but to set the volume controls to be /soft/
Cheerio!
I get by killing pulseaudio whenever required, thankfully my sound requirements are pretty minimal.
The problem seems to occur when I use Skype+Anything...that said I use Skype on a daily basis so it's getting quite irritating and I would love a fix.
This should clarify things for you:
http://blogs.adobe.com/penguin.swf/linuxaudio.png
Err maybe not :)
Wow. A guy criticizes something dealing with Linux and gets burned at the stake for it. Linux fanboys are worse than apple fanboys now? I agree, sound in unbuntu specifically is confusing. I've tried wading through manuals to figure it out. However GUIs are supposed to be intuitive enough to where I have a simple layout to perform simple tasks. That is the feature that these applications lack, simplicity.
Just switch to a (sane) desktop OS, like OS X or Windows. It's what I did when I bought my new laptop and got tired of fixing crap that should work. Didn't look back, and I won't bother with Linux again. Ever.
Sound is very confusing in Linux, always has been and always will be I guess. Plus if you are the proud owner of one of Creative's X-Fi sound cards that have been made for years now, you have no sound at all. Zip, nada, nothing. They did come out with some 64-bit drivers but they didn't work. I have seen nothing in the past two years to indicate that this situation will ever change.
@wtflol
Many of the people you are talking about suffer from Autism; they cannot empathize with other human beings, and are very bad at communicating - like 'Ivan' above. They just cannot understand that there are some people who do not want to read a man page, and there are still more who when they read it, are still stumped. Instead of taking this priceless free feedback and using it to improve the user experience of a distro, they 'lash out'; only to them, it is not lashing out, but perfectly reasoned response.
Thankfully Linux distros are coming into the mainstream, and these terrible, destructive and sad people are being marginalized. The proof of this is how well Ubuntu is being received; it is doing well because psychologically normal people are in charge of developing it.
And just in case you think I am an OS X 'pussy' this post is being made from my Ubuntu box in an X session from my Mac Mini.
Yeah one of the more problematical things in linux has always been the audio/audio frameworks. Pulseaudio was REALLY buggy when it was introduced in ubuntu in fedora but it dos seem to be getting a lot better. There definitely does need to be more unification in this area.
On a side note, vista doesn't suck, flame me.
@Glenn:
Creative released Open-Source drivers for X-Fi. Only problem is that at the moment it only supports front channel output and nothing else. I've been using it.
I'd like to see linux's audio tools looking like Reason or something. Drag wires between inputs and outputs from tools. Each component with it's own volume but all feeding into master output controls for different audio outs. etc. We already have a great hardware metaphor for how to mix together sounds and provide surface controls, why not plug it all in?
Agreed, Ubuntu sound system is confusing, even if you try to take the time to work it out.
Personally I have had a lot of problems with PulseAudio. I have two soundcards, one on the m-board, and an EMU one. I do NOT want to use the onboard sound, but PA insists on making it the default source, sink, and whatever else, even after I have instructed it otherwise (via hours' worth of searching forums, manuals, etc.)
Add the fact that I have to compile the ALSA drivers manually to get my EMU card working, and it all adds up to a lot of wasted time.
I really hope the devs will spend some serious time on the audio side of Ubuntu before the next release.
While I agree that audio under Linux could be a little more "plug-and-play", most distros are probably not doing anyone a favor by installing tools or drivers (like pulseaudio) that seem to scream beta quality. I'm not sure what's wrong with straight ALSA, to be honest, and I admit I could be overlooking something huge, but I'd imagine that configuring it for most distros would be the best idea. It has huge support, and works great (I've never had audio issues via Wine or anything else, though, so I might not be aware of common issues).
I am not familiar with Pulseaudio, but I've never had a desire to move apart from ALSA, since it's treating me so well. Even newer chipsets work, and it's great. I have an ASUS Xonar AV200, and it sounds just as well under Linux as it does under Windows... despite the lack of the official (and far more robust) driver/software. That, to me, is impressive.
That aside, even though audio under Linux is a little confusing for inexperience users, I do think it's better than Windows audio in certain regards - especially for the power users. I'm able to use my audio card for output and a USB-based microphone for input, with little configuration (had to alsamixer -c 3 to increase the volume, but that's about it), just by plugging it in.
I would be quick to say that a lot of GUI applications are lacking, like mentioned in this article... but it takes little more than 'alsamixer' in the command-line to get things done quick. It would be cool to see a robust GUI tool that handled the enabling and disabling of drivers (and other configuration), rather than forcing people to the command-line, but Linux as a hole has more important issues to take care of being it achieves true mainstream success.
Pulseaudio usually gets removed from my Ubuntu installs - mainly because of the CPU overhead (that's especially critical on my Netbook, where battery life is a concern).
Hey,
I've had no trouble with linux sound and I am using alsa for basic sound (no OSS compatibility it usually fucks things up) and esound. A lot of people mention uninstalling esound or pulseaudio but these apps are useful as they allow more than one application to access the sound card at the same time. I've never had a satisfactory experience with pulseaudio but esound just works (don't forget to run the daemon). For the mixer, I bind amixer to some keyboard keys with xbindkeys.
I found I only had a slider for my Master volume in gnome-volume-control. The fix was easy, "File > Change Device > 0: HDA Intel (ALSA mixer)" the "ALSA mixer" bit is what is important there, just tell it to use whatever device is marked (ALSA mixer).
@John
"Nice too see that Linux is starting to cath up to the capabilties of Win95 Great work team !! A few more years and you will have a mainstream OS there fella’s LOL"
First, stop being a troll.
Second, who the fuck do you think you are? You're using IE for fuck sake! That's the most retarded thing you could of ever done while criticizing Linux! Go contract a virus.
Why not just give Linux that quick death it deserves and switch to Windows or OSX?
[...] Link:http://www.matusiak.eu/numerodix/blog/index.php/2008/12/19/linux-audio-confusing-as-ever/ [...]
Unless I missed it I saw no one recommending OSS. It's not perfect but it does provide application specific volume controls and a master control as well. Plugging in your headphones does not kill the internal speaker on my laptop - I like that. Getting your multimedia keys to work with OSS is a challenge and OSS does not work after suspend (current solution? kill all apps using the soundcard and run 'soundoff' then 'soundon' after resume - uggghhh). Not pretty at all BUT OSS does work rather well despite these limitations. I do have to say that just because Ubuntu doesn't get it right doesn't mean none of the other distros do. Pulseaudio has only given me headaches but jackd OTOH has been a dream to work with. It may be true that sound on WIndows is easier but as always let's rememebr that the hardware vendors actually write drivers for Windows and (presumably) OSX. However, there are plenty of other reasons not to use Windows which are totally off-topic for this post.
I can live with a shitty sound sub system but like fuck am I going give any more money to microsoft or apple.
Need to close my browser now because I want to use skype...
I don't understand all this flaming on the guy that complains about something that is absolutely real.
So you need to be an expert to have sound in linux? say what?
Linux sound is a mess, period. Don't listen to this linux virgins fanboys.
My advice is to uninstall pulseaudio. I still have to understand what is that for since it doesn't work and breaks other things with it. Here i had low microphone volume (no solution) and weird sound issues. No more pulseaudio, no more problems.
ALSA for the win.
No idea how OSS is different. I completely agree with this post.
And The first paragraph says it all.
Re-reading the article, I had a very similar experience in Intreprid, where the PulseAudio output would just die. Running it via command line gave me a "Soft CPU time limit exhausted" error, which I googled to be a possible bug. That's why I just removed PA - Alsa is good enough for me, until this gets worked out.
"First, stop being a troll."
He was actually being generous. Linux is way, way behind Windows 95. Yeah, the kernel is more solid and stable than Win95 ever could be, but who gives a fuck about the kernel if the whole system is unusable and the user experience is pure crap?
dude just chmod the tarball.
open up prompt in your favorite flavor LINUX HAS A AFLAVOR
type in
chaudio tarball drv -x 56 /comp -7g 555
then recompile your driver after getting root
root -admin -lvl 5
compile -py -dir document programs -*.* 56 dodge stratus
that will solve it. stupid windows noob what flavor are you running hmm??? dont you know what a flavor is??? it makes sense you shit.v microsoft lover faggot cant get it to work becuz ur a fag and a fagg
GNU/Linux is not ready to take on heavyweight multimedia just yet. LAMP, yes, NLE/DAW, no thanks.
I think maybe a better title for this article would be "Ubuntu audio confusing as ever". For people dropping ubuntu on a system out of the box, with little knowledge of how the sound system works, you can probably confuse yourself pretty easily. For people who start with a bare system and install also, oss, pulseaudio, etc. themselves its not too tough to follow. Also, man pages are your friend (not that ubuntu would remind you of that very often). Its frustrating to see people say "x is broken in linux blah blah blah" when they really mean "x is broken in ubuntu". Dont hate on linux because you cant get a distro designed for computer illiterate e-tards to work the way it did in windows.
Funny, i just realised that the ubuntu/gnome guys have problems with linux sound because of pulseaudio. That really speaks for linux as a whole:)
Well nice hack there pulseaudio team.
For everyday audio alsa is fine, dmix software mixing is the default anyway and for pro you got JACK which is great.
Bluetooth headsets should not require dropping to a command lin e and issuing pulse commands in order to work. These aren't new technologies...
Anyone who uses LUNIX is turbo-gayyy!
hehe.. Im still using OSS and will do that for a long time as Im using CentOS.
Maybe I will use pulseaudio in 5 years. Enjoy your problems.
@bert plunkett
Coming from a Mac users, you're not in a position to speak like you did. Go do something else on your toy that you are using.
@Ibod Catooga: Not that there's anything wrong with that, going on your OS? :-)
Yes, pulseaudio on Ubuntu currently has many bugs left. I'm experiencing a few glitches from time to time myself (mostly flashplayer). Pkill pulseaudio often helps indeed.
However, I'm willing to put up with that. Because Pulseaudio is the best audio driver unification opportunity we have. The bugs will get sorted out. (On SuSE and Fedora they already are IIRC. And at least ALL the mixer channels work with my sound card.)
See, the problem with ALSA is, that it is proprietary. It is GNU GPL covered, yes. But still it is a Linux-only thing. Shallow-thought. The open source community is made up of BSD and Linux, Mac and other operating systems. Making a one-system-only (=proprietary in my book) driver API and kernel ABI was really bad and abused resources.
That's why I'm voting for Pulseaudio any day. Audio on Linux is still confusing. But my bet is, by next christmas this will all be sorted out, user-friendly.
(And btw, even OSS is nowadays a better cross-plattform driver than ALSA ever was.)
[...] gstreamer, phonon. :googly: Did I miss any? Embarrassment of riches? Or just embarrassment?Link:http://www.matusiak.eu/numerodix/blog/index.php/2008/12/19/linux-audio-confusing-as-ever/ Leave a comment Powered by LiveJournal.comAdvertisement Customize if (SnapShots) { [...]
Wow. There are some real a-holes who apparently post thinking that flaming somebody makes them look smart.
It's a legitimate source of confusion, especially for people who haven't been using linux very long and haven't figured out how to find proper documentation or use man pages. Man pages are usually pretty good, but web documentation can be incomplete, out of date, or cluttered wiki pages that are hard to follow.
Low Level Driver and Control Frameworks: These control the hardware directly
- Alsa - Very complicated, low level. Has OSS compatibility layer
- OSS - Depreciated and rarely used in Linux any more
Audio Servers: Sit on top of the drivers. Are a relic from back when Alsa did not offer mixing, So they provided high level functions that were not otherwise available in the low level driver framework. That is no longer the case. Also provided a simpler API than Alsa.
- arts - dead. Totally sucked too. Was part of KDE
- ESD (esound) - Equivalent for Gnome. Not as bad. Still maintained.
Abstraction Layers: Similar in function to Audio Servers, but the purpose is to provide abstraction between software and driver so that the same library can be used on different platforms that have very different driver frameworks.
- PortAudio - Excellent design (callback framework is similar to Jack)
- PulseAudio - Supports fewer platforms than PortAudio, but seems to be developing faster
- Phonon - Abstraction layer for KDE4 apps.
Multimedia Framework: More than just audio, Also includes things like video, filters, codecs, demuxers, streaming etc. Similar in concept to Window's DirectShow.
- Gstreamer - supposedly also an abstraction layer, but I've never seen it used much outside linux
- MLT - more geared towards professional broadcast / video editing purposes
Pro-Audio: This is where JACK fits in. It's primarily geared towards Pro-Audio applications since it includes things like transport control, timecode sync, and IPC (Inter Process Communication) Basically it lets you route audio back and forth bewteen different applications and to control all of them at once. It can also offer extreamly low latency.
The source of most of the confusion is from not understanding WHY all of these frameworks exist or what they do.
@Johnson
"“First, stop being a troll.”
He was actually being generous. Linux is way, way behind Windows 95. Yeah, the kernel is more solid and stable than Win95 ever could be, but who gives a fuck about the kernel if the whole system is unusable and the user experience is pure crap?"
Way behind 95? That's why I moved to Linux from vista within 2 months of actually using it.
If the system is unusable then how the fuck did I post on this page 3 times, and why is it apparently so hard for everyone to turn their audio up, I'm going to go listen to some Music using XBMC right now because it just so happens a 14 year old (me) can configure a Linux system better than anyone else on this site! Also @roeboot, IE 3.01? Are you for real? Or are you masking your UA string.
@Callum : No, that was for real. Windows 3.1 + IE3 = superior to Linux. :-)
@roeboot
Win3.1? I'm way too young to remember that, Although it appears to of been unable to see your User Agent string this time. That said, every website that I've visited in the last ~30 mins thought I was GoogleBot 2.1. I love UA string spoofing, I need it to use my hotmail account, Microshaft are doing some malicious anti-linux UA string sniffing and blocking Linux users, which isn't fair since I've used hotmail since before it was owned by MS.
:(
Cool, this site calls the Googlebot Netscape Navigator 5.0. And yes that UA and this one are spoofed.
It's awesome.
The assholes are blocking me right now! All the functions (delete, spam, junk, etc) link to "javascript:;"! AAARGH!!!!
Unfortunately, I'm definitely old enough to remember Windows 3.1. I pre-date the Internet!
All my browser versions were legit - first was Wine, then Syllable, then Windows 3.1 + TCP32 + IE3. Now, I'm testing Kazehakase (which this blog should actually support). I'll have to test out messing with my UA settings, too.
You should, although to do any UA tweaking with IE you have to modify the registry, Firefox is definitely your best bet for spoofing.
Also, in other news, the ongoing battle continues. Follow it at http://windowslivehelp.com/community/p/2608/8164.aspx#8164 to see if I can liberate the Linux users of the world.
Oh and if you're bored enough subscribe to the RSS feed on the same page. I'm certain some Windows user will slag me off and epic lulz will result.
This is more fun than it should be.... thanks for the link, btw.
unfortunately, this is a wide spread problem in Linux, you have 10 applications that do the same thing and all of them do it equally BAD
i went back to windows,
but i will give Linux a try 10 years from now, hopefully "they" will get the basic stuff fixed by then
@m-p{3}
I've been using Linux long before even GNOME existed. I just only switched to the Mac on the desktop. All of my servers (and my customers) are running Debian GNU/Linux.
Best regards,
I'm glad to hear I am not the only one who has to periodically kill pulseaudio. I know it is going to be way better eventually but I am not enjoying the growing pains.
While the author may have a point about the extra steps required to get sound working well in most linux distros, it's also worth remember the infamous role HW manufacturers play, with scant and begrudging support for linux to the same extent as windows or mac. I've used all three as a full time composer writer,and have to say here, that with a couple of hundred hours invested in getting my head around linux in general, and professional linux sound use in particular, i've come out in front. Alsa, Jackmp, and even pulseaudio on the non studio boxes all work correctly, and together.
That means i benefit from all the tools that linux has, that the other two don't, like jack as a server, handling all apps, and PA to do the esoteric stuff (watching movies, skype, etc). With an RT kernel, i'm getting the type of performance using big orchestral templates, that i could never have had in windows or osx, because their architecture wasn't built for it. (Maple midi anyone?)
There's a recurring message in most threads like this, that if the user doesn't read the manual, do the research, or think beyond 5 mins, then an app/OS must be,,,,,crap.
Linux sound isn't Win, or Mac. That means it might take longer than 5 mins to setup, but it also means the benefits are greater, with a bit of extra effort, and elbow grease, on the part of the user.
I run a full time business using linux professional sound tools, and it works, well.
For the 'desktop' user more interested in games, vids, etc, pulseaudio is growing, it's true. But with a reasonable amount of time invested, it can work in the background without complaint, and without a hassle. I'm not a fan of pulseaudio, as i think the distros jumped too early, but at least, as a linux user, i have the option of CHOICE.
Something to remember when comparing penguins to patent trolls, to apples.
alex.
"If the system is unusable then how the fuck did I post on this page 3 times, and why is it apparently so hard for everyone to turn their audio up, I’m going to go listen to some Music using XBMC right now because it just so happens a 14 year old (me) can configure a Linux system better than anyone else on this site!"
Maybe because you're 14 and you have too much time in your hands. When I was young I also had lots of free time to waste, and the ideal that hating Microsoft was the right thing to do. Linux makes you do a lot of that.
Don't worry, we all grow up sooner or later.
Just to add to the post above, and in response to the idea that linux audio is somehow more unstable or 'rough' compared to win95, i do remember win 3.11, win95, win98, etc.
And what i didn't, and won't forget, is the countless occasions when a client was seated next to me waiting to hear their masterpiece, only for the box to come up with a BSOD. (And this on a professionally built and setup system)
At least i'm spared this particular brand of humiliation using a well setup linux box.
And i won't even start on mac 9, or classic........
So if the comparisons are to continue, some degree of objectivity might aid a more fruitful discussion.
alex.
My experience with sound is that if it ain't broke don't fix it. Usually there are some pretty good tutorials around to get it to working. But It can go wrong if some program decides to use another sound system.
I just go with the default configuration and everything works fine.
I also dual boot to windows xp to play steam, but I don't have any sound there at all because I'm to lazy to download the driver from creatives 5Kb/s server.
@johnson
It took to install ~20 minutes to install Ubuntu on my laptop, ~10 minutes to find and install drivers for my WiFi, ~10 minutes to install mp3, flash, java, etc support. Sound worked straight away, video worked straight away. That's all the tweaking I had to do to get my install to do what I wanted it to do, and most of that wasn't even tweaking, iit's what anyone who gets Ubuntu does.
Yeah that first bit's a mess, I just woke up.
Oh and if you’re bored enough subscribe to the RSS feed on the same page. I’m certain some Windows user will slag me off and epic lulz will result.
@Alex: Some excellent remarks. I just ignored the "Win95 is better than Linux" post, as the poster's argument was full of holes. I supported Win95 back in the day, and I remember all the fun times with sound drivers - especially the ones that had no native Win9x support and needed to use DOS drivers.
I've used Linux for a long time, and vendor support has always been one of the main problems (both in terms of hardware drivers, or applications). I guess that Pulseaudio is the future of Linux audio, but it still has some bugs to be worked out. As I mentioned in an earlier post, I removed it from my Intrepid install and I'm using ALSA - for my needs, it's fine (Creative Audigy2 sound card, btw).
This is more fun than it should be…. thanks for the link, btw...
I really can't understand the reason to use pulseaudio, or arts, or any other "daemon". ALSA has provided everything I need: several apps using the device? no prob. Even old oss apps can be used by using dmix. So everything else is just cruft: not needed complexity, more code, less memory.
I wish video 4 linux (2) was working as well as ALSA...
You're making it harder than it is. Sure, Pulse was a little difficult to understand at first, but a little reading and a little setup (why Ubuntu didn't preinstall Pulse apps is beyond me) and you're good to go.
I'm using 8.10 (and used 8.04 and 7.10) to do Linux home audio recording (vocals and guitar via a mixing board) and I don't have any weird problems. Any more :)
And for the guy that had problems with Pulse + Wine: padsp is your answer. It suspends pulseaudio and lets Wine use Alsa. It's a known issue that's being worked. Patience. In the meantime, simply modify your desktop launchers to include padsp before the wine command and you never have to touch it again.
Oh, and you CAN have a single master channel. I do. Just set up your master channel in the sound prefs. Now the volume knob on my keyboard controls the master vol.
Was it easy? Well, not really. I screwed around a while and thought about removing Pulse audio, but that's the easy way out. Pulse is the future so you might as well spend the couple of hours getting it up and running. It'll get easier, we're just on the early part of the adoption curve, is all.
I don't know if someone else has mentioned this, but the PulseAudio Device Chooser (padevchooser) runs in the system tray and lets you browse network devices, set the default device (if you have more than one) and run other pa* tools like the volume control and server configuration. I added it to my autostart, works great.
I probably should write this in a blog somewhere, but hang on and read anyways. First, let me address some of the issues with Alsa. This work is being done mostly by volunteers that have little to no hardware documentation or vendor support. For the people that whine about their favorite sound card not working, or volume only at half what it is in Windows, why don't you complain to the company that made your system? Tell them to help support Alsa. As it stands now, Alsa is the third (I think) biggest single kernel subsystem behind network and drive controller device support. For over a year, I worked on the Intel HD Audio driver subsystem, which >95% of the pc's built today have built in. I used to get all kinds of complaints that someone's Intel HD Audio driver didn't work. Well, it isn't that simple. First, like the AC'97 bus before it, the Intel HD Audio bus is just that, a serial bus for audio devices. The bus specification allows for up to 15 input and 15 output streams, 16 channels per stream. Most desktop systems have a single codec chip on this bus, while newer systems have two (analog/digital codec and HDMI stream port). Laptops usually have two (audio codec and soft modem).
The current driver framework was developed by Intel when there were a handful of systems and even fewer codecs. This design has the driver use lookup tables to define the codec installed on the system, and the system's pci device subsystem ID in another table to define how that codec is wired for that system. When you have, say, 10 systems with 4 codecs, that results in up to ~40 entries in lookup tables. Fast forward to today, and there are well over 92 codecs from 8 vendors and the number of individual pc configurations is staggering (Intel has 20 different systems based on a single chipset alone).
While I have taken this year off from development to finish my BS degree, work has continued by a team dedicated to supporting new systems as they come out, but the workload is overwhelming to say the least. The last driver I worked heavily on ended up supporting 26 different laptops. The development team is hashing out ideas for a replacement framework, but this takes time and resources.
The Alsa team has also developed a few tools that are mainly for debugging and code examples. Alsamixer is one of those. It is simplistic in design, because it meets the needs of the Alsa developers. Other sound mixer applications (kmix, gnome mixer, etc) are free to make their apps work as the developer sees fit. The alsa mixer api also creates a PCM channel, which is nothing more than a soft volume control. It changes the volume of the stream being passed to the codec, and has nothing to do with the actual hardware.
Now, as to pulse audio, from what I understand of it, it is designed to go between the drivers (alsa) and the applications. There needs to be a system in place here, because not all application developers understand Linux and shared resources. Flash is very bad at this. I can run Amarok with my mp3's while I am running XP in a Virtualbox session with it's audio signals, and receive audio alerts for emails, or other system events. But the minute I run a youtube video, I have to shut down Firefox to allow the other applications to work again. Alsa support in other applications is equally troublesome. Wine and Cedega have slowly ported to Alsa from OSS, which is why Alsa has an OSS emulation layer still.
Pulse audio was developed to fill this gap and to standardize the audio backend, replacing esd (gnome) and arts (kde). Once the back end stabilizes, the front end tools will follow. And I'm sure you'll see at least two front end GUI tools written in every supported programming language.
I could continue writing about all this, but I have to shovel snow. I hope this has been somewhat helpful.
Oh, and my handle on the various sites and IM channels is GrueMaster. I hope to return to the developers fold as soon as I complete my degree next year.
I'd be upset if so many beligerent children were posting on my blog. Why do you allow it? It serves no purpose at all except for allowing these losers to look more like losers. The kids shouting the loudest and in the most beligerent ways will likely end up in careers that involve asking :
"Would you like fries with that?"
Or, they'll be working for my kids. The worst are also the most arrogant and they will breed assholes just like them. Terrific.
I have to double boot Linux and XP. I use basic USB speakers and Realtek sound plus earphones for audio. Both XP and Linux have very similar problems with sound. Neither OS treats sound right and neither will without radical architectural change.
Sound is a shared resource like disk space and should be treated similar. Should a normal app write to a given disk sector? No, it should open a file and the OS should decide where it will reside. Should a media player select an output device? No, it should open some kind of connection and write to it.
A system level configuration tool should decide what to link that connection to. The Data Source abstraction is the closest thing to what is needed: a data source is defined on a system level and an app opens a data source by name. Same with sound. Define sound connection first, with all the filters, enhancers, and recorders. When a media player starts, select it by name.
I fully agree with this blog entry.
Just purge all alsa+pulseaudio and install oss4.1 from "http://www.4front-tech.com/wiki/index.php/Building_OSSv4_from_source" and have all your sound wows disappear. You'll get all the mixer controls you want from ossxmix.
And to all the idiots that say OSS is dead, get a brain! It's much more advanced than alsa and has been and still is in active development and is truly a cross-platform solution which benefits everyone!
To let linux win in the fight for freedom it is a reasonable demand to make it able to handle the sound hardware as fine as windows can. Linux would not spread to the mass if this would not happen... It is an important think what all the linux kernel and application developers shoud consider.
Windows is not a bad OS, and MS made a business success with the strategy to make the OS usable by absolutely non-geek users, but what MS is doing with all the patent and licensing thingy is horrible and in nowadays it holds back all the communities and developing annd the spreading of the knowledge, the developing science.
That's why linux distros have to be able to manage everything what windows can do, and much more, and for free. Handling sound is one of these issues so the writer of this blog entry had right imo.
Yeah that first bit’s a mess, I just woke up..
Oh and if you’re bored enough subscribe to the RSS feed on the same page. I’m certain some Windows user will slag me off and epic lulz will result..
I have had more problem getting stuff to work under win than gnu/linux. That is why I switched and will never go back.
Audio on linux for me has worked out of the box every time.
[...] baca tulisan di blog ini (linux audio confusing as ever) yang saya jadikan judul tulisan ini. Dan jika Anda memiliki ide untuk mengatasi masalah sound [...]
As far as i remember (ilve started to use linux somewhere in '97) sound always been a prob under linux. First it was coz OSS3 was kinda retarded (one device - one stream) and coz of ISA (and ISA "Plug and Play" which was quite difficult to configure).
Then came ALSA. First there were probs with OSS apps, configuring wrapper etc. and still u couldn't run 2 oss apps on same time.
Second, indamous dmix. Some cards dont have thing called "hardware mixing" so mixing sound from diff apps have to be done in software. ALSA have it but back then it was usually mis- or unconfigured and ppl have to play with configs to get things working.
(btw. If u dont want to have probs with your sound under linux, BUY A REAL SOUND CARD! with hw mixing etc. SB Live! from ebay works good ;])
Then when "out of the box" sound usually works, some guys come and say "Hey ALSA is BAD, OSS4 is GOOD" so what we didnt even implement midi, mare new api for all ur programs and use OSS4. Why ? because.
PulseAudio is another sound daemon who repair things that dont work in sound system in OS but i'd rather want to repair things in ALSA, not another layer on sound system
hey guys, nice to see windows, osx and lnux users co-existing on the same page...lol. Well my story is that I have a creative Audigy 2 ZS Notebook card and a 5.1 speaker attached to it. Since I've started using Ubuntu Linux in 2005, sound has only been coming out of two front speakers but after 3 years of trying out different configurations on alsa and pulse-audio, sometimes breaking my Linux installation in the process and going through different Linux forums, I finally made it happen. Now I have true surround sound on my laptop using the Audigy 2 ZS card and Ubuntu Intrepid (using Pulse-Audio)
To a new Linux user with no patience, this can be a very a very frustrating experience and is enough to persuade any user to switch back to windows or the bitch-ass(OSX). What is needed is a unified sound system for Linux that wold make it work across all distributions. Cause when I used my Pulse Audio configuration in OpenSUSE; it didn't work and it's the same Pulse Audio !!!. I love Linux (still use windows though) and that's why I had the patience but I am sure that new users would be discouraged from using Linux as their main OS. Most people just want an OS that works !
A little while back I asked some questions to the pulse team about the state of play regarding pulse/alsa and the many offshoots we have. I also asked them about the possibility of merging pulse and alsa to give us one interface, and them direct access to functions in ALSA.
They came back to me to say this will never happen, however I have seen proof that the ALSA team are willing to help PulseAudio become a stable entity, including fixes.
It's also worth noting that ALSA's backend (Hardware) is extremely stable. It's their frontends that need work.
So I gather from that that we need pulseaudio to cement it's position in the desktop, and for pulse and ALSA to continue to work together to give us a powerful mixer and good hardware support.
In terms of KDE, Phonon is an configurable API bridge between KDE (Qt) Applications and either - a) an ALSA sound card or b) Pulse (for which it has support). From what I gather, Phonon is not a sound system!
It just needs a little more time...
hi...
I would like to know where i'd get the mp3 dependency for audio-converter-mod (fedora core 8, x86_64 architecture). thanks
haha so funny :) love the IE comment
For all the "read a man page" responders do you expect everyone that drives to fix their own car and take the hours or days to fix a clutch or brakes? I would assume no. Most are really not interested in how, they just want to use it. After 20 years of working on my own cars, I am tired of spending time under a car and not with my kids or wife that miss me while at work all week.
For Linux to get popular these dumb issues like this sound need to get fixed - because its driving folks back to stuff that works in other OS's for 20 years now. My wife is using Windows now because in Ubuntu studio she had spotty issues with sound or jack or upgrade broke something, youtube did not work and in Windows it just works, I have limited time and she wants to compose music, not become a software nerd.
Linux sound seems caught up in politics and if its ever gonna be mainstream, just make it work.
"Ok Grandma, open a terminal window - we are gonna become root and edit the config file in vi, then install a couple packages"
I love all the comments about Linux and users and not knowing anything. Reality is I don't get paid to play music, but to admin servers. Just tonight I want to listen to some Metallica, but something broke gstreamer and now instead of doing work I get paid for I am tinkering with sound stuff. Amen - I just want sound to work - this is one place where Windows rocks. Note I said one place....
Linux sound system has allways been a nightmare (the video system also, but in a smaller scale).
Linux sound system is far far far away of being human-friendly (only geeks can make it work fine).
This is why Linux is going to take a LOOOOONNNNGGGG time before being a desktop system for everyone.
That's why Micro$$$oft Window$$$ can't e beaten, at this moment, in ease of use, instalation and configuration.
In the meantime, some morons continue to defend that it's easy to use it. They should help to make it more usefull for the end user.
At this moment, for example, one of my audio cards simply stoped work without any reason and the inputs of the other simply keep changing.