Slashdot Mirror


ALSA vs. OSS vs. OSSFree

scenic writes "I was wondering what experience the /. community has had with ALSA vs the sound drivers that are part of the Kernel and the various other choices (such as the 4Front OSS packages). I've used the commercial OSS drivers as well as the "included" Linux drivers. I've started to look to ALSA for better sound response (for example, I've noticed with esd and the basic linux drivers, there is sometimes a lag when playing back video files through esd. I understand that esd is part of the issue, but it's sort of important to be able to multiplex sound). What have others' experiences been? What other solutions are there aside from things like esd?" Which sound systems do you find work for your system, and which don't? If specific hardware / software combinations can be endorsed or critiqued, it'll probably help a lot of people.

32 comments

  1. Read "Programming Linux Games"... by wrinkledshirt · · Score: 5, Informative
    John Hurt does an interesting breakdown of six different methods of programming sound for games, and talks about the advantages and disadvantages of each (not just the programming part).

    According to him OSS is a pretty entrenched technology, but ALSA's continuing to grow. The fact that ALSA's retaining nearly 100% compatibility with OSS probably means that at some point you'll be able to make a full shift from OSS to ALSA...

    Don't know if that's helpful (or even relevent).

    --

    --------
    Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

    1. Re:Read "Programming Linux Games"... by Anonymous Coward · · Score: 0

      got a link?

  2. Get a real sound card by bconway · · Score: 2, Insightful

    It sounds like your problem has nothing to do with the drivers you're using, it's that you're using a sound daemon. Most quality sound cards (like the SB Live Value, 39 bucks on pricewatch) will mix up to 32 wav sources in HARDWARE. There's no need to use esound or arts sound daemons to do mixing for you, and they only muck up the works. I've been using the OSS drivers from opensource.creative.com for my SB Live, but these were merged into the latest kernel releases, so I have no need to look outside the kernel.

    --
    Interested in open source engine management for your Subaru?
    1. Re:Get a real sound card by Anonymous Coward · · Score: 0

      How is this a troll? God, I just metamoderated half of my page as unfair because you people are on crack. I can't wait to see you assholes in metamoderation.

  3. Okay, here's the funny thing! by Anonymous Coward · · Score: 1, Funny

    "Programming Linux Games" is what's known as a "book," an ancient analog data storage device. Hence, you can't "link" to it, you have to actually physically acquire a copy of it in meatspace and then "read" it. Sounds crazy, I know.

    1. Re:Okay, here's the funny thing! by Anonymous Coward · · Score: 0

      Kinda forgot to read the subject line, since they seldom hold any important info...

    2. Re:Okay, here's the funny thing! by mattdm · · Score: 2

      :) Actually, you can link to books.

      (This bit here is to get around the stupid "postercomment compression filter" yet still post my insightful comment....)

  4. Vote for ALSA by spuk · · Score: 3, Informative
    ALSA seems to have a better design and general quality. My (crappy) onboard ESS Solo 1 barely works (only pcm playback, didn't even record, the last time I checked) with the kernel driver, and its alsa driver supports (almost?) all the features, including 3D effects and all the in/out channels.

    --

    "Video bona proboque; deteriora sequor." -- Ovid
    1. Re:Vote for ALSA by Anonymous Coward · · Score: 0

      Thx for the info... My new mobo has a solo1 on it. Of course, the solo1, technically, isn't an OSS driver, it just tries to mimic the interface.

    2. Re:Vote for ALSA by Platypii · · Score: 1

      I agree that ALSA is by far better..... For a while I thought I would have to pay more for my sound driver (OSS) than every piece of software on my system! Then I discovered ALSA was the only other way to get my ALS4000 working under linux! :-)

  5. Program using the OSS/Free API for now by salimma · · Score: 3, Informative
    As has been mentioned, ALSA has OSS compatibility, and even better, automatically multiplex audio streams for you. Yes, you can play multiple sound files at the same time without a sound server.

    Kind of like the jump from Win9x to Win2k, soundwise.

    HTH,

    Michel

    --
    Michel
    Fedora Project Contribut
    1. Re:Program using the OSS/Free API for now by sinator · · Score: 1, Interesting

      My understanding is Mandrake 8.0 used ALSA exclusively. I use the Maestro 2 chipset (it's a crappy no-name laptop), and it didn't seem to multiplex sounds at all. Hence I use artsd. Am I completely on crack, and is there a definitive way to test if the ESS Maestro 2 is capable of/currently wavetable mixing via ALSA?

      --
      Three Step Plan:
      1. Take over the world.
      2. Get a lot of cookies.
      3. Eat the cookies.
  6. Mandrake by Shook · · Score: 1

    I have an on-the-motherboard chip by C-Media. I automagically had multiplexed sound on my first bootup of Mandrake 8. Now only if I could get my dual monitors working with my Radeon VE. :-(

  7. You need the 0.9.0 betas by salimma · · Score: 1
    I should have clarified this, the multiplexing works for 0.9.0 upwards only. Sorry.

    Michel

    --
    Michel
    Fedora Project Contribut
  8. ALSA 0.9.0 betas are frustrating by Redline · · Score: 2, Informative

    While the latest ALSA drivers sound wonderful on my SB Live, I have a non-technical problem with them.

    I have tried to build several programs and libraries that have "native" ALSA support, and ALSA gets detected properly at configure-time. Then I proceed to make, and the build will die because the app only supports the 0.5.0 ALSA interface, and not 0.9.0. It is not really the fault of the ALSA drivers, the configure scripts (and ideally the software package itself) need updating to be aware of the newer ALSA interface.

    I just feel like I am losing functionality when I have to reconfigure the software with "--disable-alsa" and let the OSS emulation layer get used. <sigh> I wish I had more time to hack on my favorite projects. ALSA 0.9 for everyone!

    1. Re:ALSA 0.9.0 betas are frustrating by salimma · · Score: 1
      Indeed. Situation will improve when they declare the API completely frozen, of course. Sometime before 1.0 is released, but even now it is much better than OSS.

      I believe some of Red Hat's beta testers who own SB Lives have been rather unhappy at the state of the emu10k driver in the latest kernels...

      Ran into snags with programs' configure trying to enable ALSA support. Solution? Do not install the alsa libraries, just install the drivers. Works for me.

      Regards,

      Michel

      --
      Michel
      Fedora Project Contribut
    2. Re:ALSA 0.9.0 betas are frustrating by Dashslot · · Score: 1

      Ran into snags with programs' configure trying to enable ALSA support. Solution? Do not install the alsa libraries, just install the drivers. Works for me.

      Sounds like fun, one question: Are you able to multiplex connections using the oss-compatibility mode? Another Question: Will that work with all the drivers?

      Cheers.

    3. Re:ALSA 0.9.0 betas are frustrating by salimma · · Score: 1
      Sounds like fun, one question: Are you able to multiplex connections using the oss-compatibility mode? Another Question: Will that work with all the drivers?

      Answering the first question, yes it works in oss-compatibility mode. In fact I have not really tried its native mode - the hassle of there being almost no application that support it natively being the culprit, as well as having to recompile.

      One would expect the soundservers (esd, arts) to be the first programs to support ALSA 0.9.0, but that would be defeating the purpose of doing multiplexing without a sound server, no?

      As to the second question, I have tried it with the ymfpci driver. YMMV. But if they implement it like Win2k's sound drivers, which I have tested on the good ol' SB AWE64, it should work on most drivers.

      Yours,

      Michel

      --
      Michel
      Fedora Project Contribut
    4. Re:ALSA 0.9.0 betas are frustrating by Dashslot · · Score: 1

      Thanks for your response.

      I tried compiling up the newest drivers, but I was unable to get it mutliplexing - don't know if I missed a switch somewhere though. Symptoms were while playing a Real stream, loading xmms and pressing play - the latter froze until Real was stopped, at which point it came back to life. Am I missing something?

      This maybe because of my crappy Intellistaion onboard sound (i8x0 with ac97 codec)

      Cheers.

  9. What I want to know is... by Wakko+Warner · · Score: 2

    ...which drivers support playing more than one goddamned sound at once? IRIX can do it. Hell, even Solaris 8 can do it. And, you know, Windows has been able to do it since Win95. It's been 10 years; where are my concurrent Linux sound drivers?

    Does anyone know if they exist and what card I should be purchasing?

    (Please do not mention ESD, the Enlightened Sound Daemon. This is not a good solution. ESD built into the kernel would be.)

    - A.P.

    --
    "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
    1. Re:What I want to know is... by Anonymous Coward · · Score: 0

      alsa 0.9.x and above. esd sucks.
      any high end SB card (like the live) can do it. my Yamaha YMF 744B on board chipset can do it but its not SB compatible.

    2. Re:What I want to know is... by LyNXeD · · Score: 1

      I run a Creative Labs SBLive! Value OEM, picked it up for about $50 a while back (they're probably cheaper now.) Love it, works great, don't have to use esd or anything like that. (Only use for esd I've found is to send sound across the LAN.)

      I absolutely hate my Ensoniq AudioPCI (I think it's a Creative card too) that I have at work as it only supports one sound at a time - I'm stuck using esd there. But here at home, using the SBLive works great.

    3. Re:What I want to know is... by gid · · Score: 3, Informative
      As mentioned above, yes ALSA supports hardware mixing. When you have the ALSA drivers running, and one of the magical sound cards, then more than one program can essentially use /dev/dsp at once. I've been digging for about 30 minutes now and still can't find a list of cards that support hardware mixing. So here's the cards that I KNOW support hardware mixing:

      ymf724 pci based cards

      ymf744 pci based cards, it's essentially a ymf724 but it has digital out, and 4 channel out

      SB Live

      Trident 4DWave

      I own two ymf724's and a ymf744, great cards, they sound great, and they're cheap :) The ymf744and ymf724 have issues with quake3, it hangs on exit :( But you can just kill off the process luckily. This is with the latest .9.0beta7 drivers, the .5.x drivers don't have any noticeable issues though.

      A quick search here's the cards: ymf744 [$18] and ymf744 pro version (digital out version?) [$25]

    4. Re:What I want to know is... by Wakko+Warner · · Score: 1

      Dude, you rock.

      I just picked up one of the $25 cards (on backorder) and, with any luck, my problem is solved.

      Who says Ask Slashdot doesn't work?!

      - A.P.

      --
      "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
    5. Re:What I want to know is... by jnik · · Score: 1
      And, you know, Windows has been able to do it since Win95.


      Actually I've had problems with that--the system sounds always work, of course (except for those of us who've turned the damned things off), and you almost always get one other source working, but I haven't been able to, for example, run WinAmp and play a game. This might be because one or the other is using DirectX, but I'm pretty sure some of the combinations I've tried haven't used DirectSound.


      So it's not perfect; hopefully ALSA will catch up soon and Linux will be ahead of Windows in this respect. Certainly Windows has a slight edge right now, tho.

    6. Re:What I want to know is... by commrade · · Score: 1

      Ensoniq AudioPCI ens1370 works great for me with multiple sound sources and everything. Under ALSA, it even supports full duplex (recording on line-in and outputting on speaker-out at the same time). Also, the line-in can be switched to another speaker-out, giving you four distinct sound sources, it's not 5.1 but for a card that cost $20 in 1998, that's pretty good. None of this is specific to ALSA 9.x either, I've been using ALSA and this card since ALSA 4.x.

  10. You're on crack.. by Anonymous Coward · · Score: 0

    .. if you think that a SB Live is a "quality" card.

    Quality sound cards don't sell for $39.00, they sell for $390.00.

    Consumer-grade sound cards sell for $39.

    The difference is the accuracy of the DACs and clock, and the amount of noise introduced.

    Of course, you're probably someone who thinks that the home stereo he bought at price-mart for $300 is "quality".

    1. Re:You're on crack.. by Anonymous Coward · · Score: 0

      "quality" sound cards dont sell for $390. and they certainly dont work on PC hardware.

      "quality" sound cards work with MIPS boxen and sell for $390,000.

      high-end consumer-grade sound cards sell for $390.

      The difference is the no of channels, the DACs, DSPs, 3D surround sound processing, optical drivers to other devices etc etc

      Of course, you're probably someone who thinks that home stereo he bought at Hi-Fi-R-Us for $3000 is "quality".

    2. Re:You're on crack.. by Anonymous Coward · · Score: 0

      Hey, an SB Live beats the shit out of my $7 ES1371 here. :P

  11. Check configuration by salimma · · Score: 1
    Assuming that you are indeed loading the ALSA drivers and their OSS compatibility layers (snd-card-xxx, snd-pcm-oss, snd-mixer-oss etc.), make sure that Real and XMMS are both set to use OSS drivers instead of ESD or any other sound server.

    It might be true that your sound chipset does not do multiplexing, I'm afraid this feature is not yet well documented; stumbled upon it by chance myself.

    That's the only thing I could think of - but there are lots of cheap PCI soundcards out there :)

    HTH,

    Michel

    --
    Michel
    Fedora Project Contribut