LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-11-2006, 03:26 PM   #1
progrock
LQ Newbie
 
Registered: Dec 2006
Distribution: Slackware 12
Posts: 9

Rep: Reputation: 0
How Does the Kernel Handle Audio?


Hi all, if this is the wrong forum for this, sorry, hopefully a mod will move it...

Anyway, what does the linux kernel do with audio? I was just wondering in general, but also I know that windows downmixes everything that you put through it(that's why we have kernel streaming through foobar ). Does linux do anything like this? I was just wondering, because sometimes I feel like audio comes through a little worse than it started, although I could be dreaming. And if it does, is there a way to fix it?

-prog
 
Old 12-11-2006, 05:39 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
There is more than one sound system in the kernel. OSS (The Open Sound System), which is now obsolete, and ALSA (Advanced Linux Sound Architecture).

Applications are typically written for one or the other (a few support both). With a bit of luck, OSS will disappear some time soon.

Both OSS and ALSA cards with hardware mixing to do it, but OSS will not do software mixing if the card doesn't support it. This means that if you have a budget soundcard (like many/most laptops), if a program which uses OSS gets the soundcard, everything else gets shut out. There is a work around for this described below.

ALSA does do software mixing between different apps. This feature of ALSA is called dmix. Turning it on is a configuration item. Some distros ship with dmix enabled by default.

There is a method for multiplexing single-channel soundcards between multiple OSS apps using aoss - the ALSA OSS wrapper, which uses ALSA underneath to provide an OSS-compatibile interface to the applications. This works only sometimes though. Personally I've never had little success with it.

Using dmix, I have in the past found that the mixing can cause poor quality, although I've not had that for a while. I had particular problems when using aoss + ALSA causing a lot of noise in the audio to the point where it was not usable. In this case it sounded like someone has cranked the amp up too high and it was clipping very badly, even at low output volumes.
 
Old 12-12-2006, 11:34 AM   #3
progrock
LQ Newbie
 
Registered: Dec 2006
Distribution: Slackware 12
Posts: 9

Original Poster
Rep: Reputation: 0
So then how would I go about turning off dmix? If you're not familiar with my distro, just the general idea and I could figure it, most likely. Also, (and I know that is a little off topic)I have an Asus M2N32 mobo that has digital audio outputs, and I'm about to get a receiver that has digital inputs, and I'm really hoping that I won't have to jump through hoops to get that working. What do you think?
 
Old 12-12-2006, 03:45 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
I don't actually know how to tun off dmix! When I was using gentoo some years ago, to make dmix work I had to write a configuration file and put it into my home directory, called ".asoundrc". Since I've been using Ubuntu it "just works" and I've sort of forgotten the process.

The dmix documentation has instructions to test if it's working, and change the configuration if necessary.

My dmix pointer is just a guess - I don't know that it's the problem. Check other avenues as well. One thing which just occurred to me is a simple check of the mixer settings - make sure your PCM and Master volumes are not at 100% - some soundcards can clip a little if one of the other volume's is too high.

For me, I get best results when my PCM is about 85% and master is no more than 90%.

Many apps in Linux will adjust the PCM setting when you change the volume in the app, but some do their own software volume control. In these cases, keep the volume away from the max setting too. In any case, I find putting the volume to max tends to cause some quality problems. Of course this is hardware dependent.

Another thing to do is find out what is your soundcard and google it with ALSA to see if there are any common problems and solutions for them.

Do you know your soundcard make and model (or better still, the chipset it uses?)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to handle kernel paging purej Linux - Newbie 1 09-30-2005 08:49 PM
Kernel upgrade: Unable to handle kernel paging request deviantintegral Debian 4 07-14-2004 04:59 PM
Strange kernel error: "Unable to handle kernel NULL pointer dereference..." EcceVery Debian 4 04-12-2004 06:34 AM
MozillaFirebird Can't Handle Streaming Audio? Crashed_Again Linux - Software 1 10-01-2003 06:58 AM
Kernel Message:unable to handle kernel NULL pointer dereference at virtual address... dave_d Linux - General 0 02-14-2001 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration