NavigationUser loginSpam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
Etch AudioHi Guys. I am having problems with audio. When I use Skype, and choose Logitech USB Headset from the Devices menu, I get the audio through my headset. If I play something through Mplayer, I don't hear anything. If I go to Preferences > Sound, and play a sound, I don't hear anything either. So: Although an easy fix would be good, it still doesn't really help me understand "how" or "why" the audio works in Linux, or what files are used in configuration, so if someone could point me to a reasonably easy to understand "how Linux sound & audio works" site, I'd really appreciate it. If some output is required to help, let me know what commands to use... Cheers |
Etch Audio
Linux sound isn't quite sorted out yet - it's only slightly better than the PC-DOS days where your favorite games were invariably tied to only a few types of audio cards.
For Linux you have two main sets of sound drivers - the older "Open Sound System" (OSS) and the newer ALSA (Advanced Linux Sound Architecture). OSS still lives on a variety of UNIX including several of the BSDs but it has been deprecated in Linux in favor of the clearly superior Alsa.
If you look within your /dev tree you will see audio devices; these may be OSS or Alsa depending on your setup. In the earlier days programs fought over control for these devices. Once a program opened a sound device it locked out all others. Many programs still work that way (unfortunately). A slightly later development was the 'sound daemon' such as 'ESD', ArtsD, and others. Software which uses those sound daemons can share the sound device; the daemon does all the 'mixing' and so on and ultimately it has sole control of the audio device. Some software will try to grab the device directly and some will try to work with a specific sound daemon. Trying to support several sound daemons is something of a nightmare so software usually only works with one sound daemon, which means it either doesn't work with the sound daemon you happened to install or else it makes a desperate attempt to work by making a direct grab for the sound device.
So, there's any number of things that can go wrong with your sound. Things to check are:
1. does the sound device get the same name with each reboot? Sometimes not, and that can make your system appear not to work even when everything is OK. For 2.6.12 kernels and later, have a look at the udev docs, use 'udevinfo' to help you identify devices, and edit udev scripts to ensure consistent naming of the audio devices. As an example of a udevinfo command:
udevinfo -a -p /sys/class/sound/controlC0
The '-a -p /sys/some/pathname' form is probably the most useful. Man pages for udevinfo are badly out of date but you'll be OK if you just remember '-a -p'. I haven't got a bookmark for that udev 'howto' page; good luck with 'google'.
2. Have a good look at each software you're interested in. Does it attempt to use the devices directly? Is it expecting an OSS or an Alsa device? Alsa has an OSS emulation so it is trivial to get an OSS-only software to work with Alsa. Is it expecting a particular sound daemon?
Etch Audio
pinniped, thanks for your help. I will investigate the udev docs as a start anyway.. in general it does seem that audio issues are a pretty common issue with Linux. The tricky part seems to be that there are so many different issues, rather than a single, consistant problem.
Cheers
Weird Change
My g/f has a system running Etch with Gnome as her default GUI. We where running XMMS with the OSS driver, which apparently is rather old, but that point aside, it worked..
well we ran some installs last night that should not have affected xmms. I installed Adept aswell as K3B, I also added a user to Smbpasswd. none of which should have affected the audio drivers or devices. now XMMS and Gnome refuse to run on anything other than ESD, which sounds fine, but seems to swallow up the system resources..
I loaded up KDE which is my prefered GUI and it allowed me to set ALSA as the audio device and run XMMS useing that... But gnome won't budge.
she is attached to Gnome so I need to get it to put out Audio without eating up the resources
Thanks
Teddy B
Weird Change
If your soundcard doesn't support hardware mixing, and you want the software to mix the channels, I got results by making the dmix ALSA plugin a default via a config file. I'll give you a link to a Gentoo page, but it helped me out even as a different distro. Be sure to check if your card has any specific stuff. Look in the dmix section, you're looking to make a asoundrc.conf file.
Click Me!
However, I am still having some issues with this, as the GNOME system sounds are currently insisting on using ESD. This keeps them locked out.
If anyone can figure out how to force ESD to go through ALSA, or make the system sounds use ALSA instead, that'd be awesome.
Also, might I suggest audacious instead of XMMS? I hear XMMS isn't supported anymore, but that aside, it tends to play nicer with other programs, and doesn't fight off dmix so much. They're extremely similar, too.