Re: Need help getting sound working
On Thu, 10 Jul 2003 20:42:36 -0600
Paul E Condon <email@example.com> wrote:
> I'm trying to get sound working on my Woody computer. I have some
> confidence that the hardware is correctly installed because the
> computer plays the ogg vorbis files that are provided with
> Knoppix, but only with the software on the Knoppix demo disk.
I've never used Knoppix, so I don't know how it's set up, or the
software to which you refer. So some of the things I might suggest
could be unnecessary.
1. The first thing to do is make sure it's possible to make
sound at all. To do this, find a simple ULAW .au file and send
it to the Sun-compatible audio device, e.g.
cat somefile.au > /dev/audio
If you don't have an .au file around, let me know and I'll send you
If this step fails, then there are a number of things that could be
wrong (driver not present or configured wrong, permissions wrong, etc.)
that have nothing to do with XMMS. From what you say below about
the cmpci kernel module being loaded, it looks like you have the
correct driver installed; but still, it's a good idea to verify that
you can make sound at all before wondering "what's wrong with XMMS?"
> I have installed xmms debian package and copied the music files
> from the Knoppix CD for testing. When I run xmms I get an error
> message in a Gnome alert box, as follows:
> Couldn't open audio
> Please check that:
> 1. You have the correct output plugin selected.
> 2. No other program is blocking the sound card.
> 3. Your soundcard is configured properly.
> I have difficulty with each of the three suggestions.
> 1. I can't find any info on selecting output plugin. And I can't find
> info on the xmms config file that was installed by the package. The
> config file at ~/.xmms/config contains the line:
> This seems to be an output plugin selection. And there is, indeed, a
> file at that path. But I have no idea how to decide if this is the
> correct plugin? My sound card uses CM8738. My kernel modules include
> cmpci, which is the module loaded by Knoppix. But maybe Woody needs
> a different module (??).
2. "XMMS output plugin" is not the same as "sound card driver/kernel
module." You say that your sound card uses the CM8738 chip, and
that you are using the cmpci kernel module. That all looks right;
it looks like you're running the correct kernel module (sound card
driver) for your sound card's chipset.
"XMMS output plugin" determines where XMMS sends its output -- whether
it sends it directly to the sound card driver (kernel module), or to
an intermediate layer of software, or somewhere else instead.
Assuming you passed the first step above -- that is, assuming that you
could make sound by cat'ing an .au file to /dev/audio as above, and it's
just a function of finding out why XMMS isn't working . . .start XMMS,
right-click on the player somewhere, go to Options, and then Preferences.
Or, alternately, mouse over the player and hit ctrl-P. This should
bring up a preferences window, and the first tab in the preferences
window lets you select input and output plugins.
The input plugins let you enable the ability to handle audio input of
different types, so that xmms can be used to play MP3s, WAVs, directly
play CDs, etc. You can pick as many of these as you want XMMS to be
able to handle; but make sure the ones you need are selected.
Below that is the output plugin, which determines where XMMS sends its
output. You have to pick only one of these, because XMMS sends its
output to only one place. What you pick here sets that "output_plugin"
variable line in XMMS' config file that you note above.
The three choices you probably care most about are "OSS driver," "ALSA
output plugin", and "eSound output plugin" (which is what you currently
have set, according to what you wrote above). The first two cause XMMS
to send its output directly to the driver for your sound card; the
difference between them is that they refer to two different drivers you
might be using. OSS ("Open Sound System") is a set of sound card
drivers for linux; ALSA ("Advanced Linux Sound Architecture") is
another, independent set. Which one you use depends on which drivers
you're using. If you haven't installed ALSA yourself, then you're
almost certainly using OSS drivers, at this point. The fact that you
said "cmpci" was your kernel module, rather than "snd-cmpci", makes
me think you're using OSS drivers as well.
Note that picking OSS or ALSA here is *not* selecting a sound card
driver for the operating system to use. The loading of kernel modules
is a completely separate thing. Selecing OSS or ALSA here is just
telling XMMS two things: a) that you want XMMS to talk to the driver
directly, and b) from which family of drivers you got the driver you
The third choice is "eSound" . . .eSound, or ESD (the "Enlightened
Sound Daemon") is a sound mixing server. It's a program that's intended
to sit between the sound driver and any software that wants to play
sounds. Rather than sending sounds to the driver, software sends
sounds to ESD, and ESD sends it to the driver. Why have that extra
layer in there? Because ESD is a mixer as well -- if more than one
program wants to play a sound at the same time, ESD handles that
gracefully, mixes them together, and sends the output to the driver.
Without a sound mixer, sounds sit in a sort of queue, and can only be
played after the currently-playing sound is finished. Use of mixers
also tends to give you a lot more control over the sound: with
writing to the driver directly, you usually have no more control over
the sound than an overall volume, while mixers allow you to run a mixer
GUI program that talks to the mixer daemon and lets you set all kinds
of things (tone controls, relative volume of computer audio vs. CD
audio, etc.). Against this, there is the drawback that many people
think passing the sound through a mixer daemon on the way to the
driver results in the quality of the sound being degraded. At least,
that's a common complaint about ESD -- people think that sound played
through the ESD mixer daemon sounds crappier than when sent directly to
So, which one of the output plugins do you use? According to what you
write above, XMMS is currently configured to send its output to ESD.
If you're not even running ESD, you're not gonna hear anything. How
do you find out if you're running ESD? Use ps and see if it's running,
% ps -ef | grep -i esd
cmetzler 1103 1 0 08:46 ? 00:00:00 /usr/bin/esd -terminate -nobeeps -as 2 -spawnfd 15
If you don't see esd running, then there's not much point in sending
XMMS' output to it.
BTW, ESD is the sound-mixer-of-choice for Gnome. If you run Gnome, you
almost certainly have ESD running. KDE uses its own sound mixer daemon,
called "arts". Programs that are part of Gnome will want to send their
sound output to ESD, while KDE programs will want to send their sound
output to arts. XMMS is not part of either. I don't run KDE and know
next-to-nothing about arts, or whether there should be an output plugin
for XMMS to talk to arts. Maybe someone here can comment about that.
So, in short, if you're not running ESD, then you want XMMS to use
an output plugin that lets it talk to your sound card driver directly
(which, for a fresh install, will almost certainly be the OSS driver;
so you'll want the OSS output plugin).
If you *are* running ESD, then the most reliable thing to do is to have
XMMS use the eSound output plugin. It's also possible to have XMMS
bypass the ESD daemon and send its output to the sound card driver
directly; but that won't work if ESD is configured to hold on to the sound
card and prevent any other programs from sending to it. So using ESD
is the safest thing to do. But anyway, this brings us to:
> 2. How do I determine that no other program is blocking the sound card?
> I have no programs that I know of, but ignorance is not bliss here.
The device node for most pc audio is /dev/dsp, which is usually a symbolic
link to /dev/dsp0. You can check that for yourself. Running fuser or lsof
on those, e.g.
% fuser /dev/dsp
will give you a list of process IDs (like are shown in the ps command)
that are currently using that device node (and, thus, are talking to the
sound card). If you're not hearing any sound, but some process is shown
as using the sound card, then that process is hanging onto it for some
reason, and it's worth investigating why. If it comes back with no
response, then nothing is.
If it comes back and tells you that ESD is hanging onto the sound card,
then having XMMS write directly to the sound card driver won't work; it
won't be able to get the driver's attention, because ESD is hanging onto
it. In this circumstance, you should be OK if you use the eSound output
plugin with XMMS. But even if you do use the eSound output plugin, it's
still a good idea to reconfigure ESD so that it only grabs the sound
card when it actually has output to send to it, and releases it when
done. But this email is already way too long, so save that for a
> 3. I have no card configuration software. Since the card has only worked
> quite recently, when I tried to use Knoppix, did Knoppix configure it?
> Is there some software that I can use to test sound card for proper
I dunno, because I dunno about Knoppix. In general, though, sound card
configuration software isn't needed. I had a CM8738 on motherboard that
I used for quite a while, and no configuration was necessary -- I just
loaded the cmpci module and it worked.
> Bigger question: I'm trying to get sound working using xmms because
> that is what is used by Knoppix and it worked there, but is there a
> better choise for use in Woody?
Better choice for what? For playing CDs? For playing MP3s? For
streaming audio? These are subjective questions, of course. I use
xmms for just about everything except playing CDs; for that, I use
grip. But that's just me; you're likely to get as many different
answers to this question as there are people who listen to stuff on
I hope all this helps in some way. BTW, you want to look at the
Linux Sound HOWTO, found at:
It attempts to be comprehensive, and as a result provides you with
a lot of information you don't need and not all the information you
do; but it's still very informative and is a good starting point.
Chris Metzler firstname.lastname@example.org
(remove "snip-me." to email)
"As a child I understood how to give; I have forgotten this grace since I
have become civilized." - Chief Luther Standing Bear