cmd:sndconfig 

Sound configuration for Linux.

sndconfig
man sndconfig
rpm -qilR sndconfig
FILES 
/etc/sysconfig/soundcard Stores current settings
/etc/conf.modules        Stores sound module configuration
/etc/isapnp.conf         Stores PnP configuration

Alsa 

Plug and Play cards

Most modern sound cards for the Intel platform are ISA PnP cards, which is an abbreviation for ''Plug and Play''. This means, that the card has to be configured by the operation system. This has to be done through an initialization routine at boot time. You probably need to configure your card with the PnP-utils-package. Every recent Linux distribution includes these tools. For usage have a look at the Plug-and-Play-HOWTO

If you have a PnP card, you will also need: * the isapnptools software package.

  1. Loading the driver

There are two ways to use the ALSA-sound-modules.

5.1 Inserting with modprobe

Note: If you have a PnP audio-card, you first need to set it to the right (or at least some known) IO/IRQ/DMA. The main part is: do a "modprobe snd-card-<soundcard>". This should do the trick.

For all 16-bit Soundblaster-cards (SoundBlaster 16 (PnP), SoundBlaster AWE 32 (PnP), SoundBlaster AWE 64 (PnP):

/sbin/modprobe snd-card-sb16

However, if you have a 0.3.0-pre4 package, the GUS Classic driver is called “snd-gusclassic” and the SoundBlaster 16 module is called “snd-sb16” (so, without the “card” part).

  1. Testing and using

Now you should test if the sound driver really is available, then try to use it.

6.1 The /proc filesystem

You can find a lot of useful information about your system in the /proc subdirectory.

/proc/modules gives information about loaded modules. Once the ALSA sound drivers are loaded, if you type cat /proc/modules you should see something like:

Installation 

alsa-lib 

./configure
make
make install

alsa-driver 

# do the 2 twisting

./configure
make
make install

Trying History 

Configuration 

./configure --with-isapnp=yes
./configure

— choose without pnp support is because sound card is not the only pnp card that is in my system. So, use the system default isapnp support.

Build 

make
cd kernel/
gcc  -Dunregister_sound_dsp= -Dregister_sound_dsp= -Dunregister_sound_special= -Dregister_sound_special -DALSA_BUILD -O2 -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -I/usr/src/linux/include -I.. -c -o sound_oss.o sound_oss.c
% modprobe snd
/lib/modules/2.2.19/misc/snd.o: unresolved symbol unregister_sound_dsp
/lib/modules/2.2.19/misc/snd.o: unresolved symbol register_sound_dsp
/lib/modules/2.2.19/misc/snd.o: unresolved symbol unregister_sound_special
/lib/modules/2.2.19/misc/snd.o: unresolved symbol register_sound_special
/lib/modules/2.2.19/misc/snd.o: insmod /lib/modules/2.2.19/misc/snd.o failed
/lib/modules/2.2.19/misc/snd.o: insmod snd failed

The are defined in /usr/src/linux/include/linux/sound.h

Help in http://kernelbook.sourceforge.net/kernel-api.html/snddev.html

alsa-lib 0.5.10b 

./configure
make
make[2]: Entering directory `/export/expand/alsa-lib-0.5.10b/src/control'
/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include    -g -O2 -c cards.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -g -O2 -c  -fPIC -DPIC cards.c -o .libs/cards.lo
In file included from cards.c:30:
../../include/asoundlib.h:113: parse error before `snd_pcm_channel_info_t'
../../include/asoundlib.h:212: parse error before `snd_pcm_channel_info_t'
../../include/asoundlib.h:213: parse error before `snd_pcm_channel_params_t'
../../include/asoundlib.h:214: parse error before `snd_pcm_channel_setup_t'
../../include/asoundlib.h:215: parse error before `snd_pcm_channel_status_t'
../../include/asoundlib.h:222: parse error before `snd_pcm_sync_t'
[...]

alsa-lib 0.5.10b 

> > bash-2.04$ cat /proc/asound/sndstat
> > Sound Driver:3.8.1a-980706 (ALSA v0.5.10b emulation code)
> > Kernel: Linux sup3r 2.4.2 #16 Mon Apr 2 09:38:01 UTC 2001 i586
> > Config options: 0
> >
> > Installed drivers:
> > Type 10: ALSA emulation
> >
> > Card config:
> > Sound Blaster 16 at 0x220, irq 10, dma 1&5
> >
> > Audio devices: NOT ENABLED IN CONFIG
> >
> > Synth devices: NOT ENABLED IN CONFIG
> >
> > Midi devices:
> > 1: MPU-401 (UART)
> >
> > Timers:
> > 7: system timer
> >
> > Mixers: ...

I compiled alsa from src (downloaded all three *.tar.gz files namely: alsadriver, alsautils and alsalib) then configure alsadriver using ./configure —with-isapnp=yes, make install, then created ./snddevices, then modprobe snd-card-sb16…also, I already had sound support compiled in my kernel…

C-Media Electronic sound driver 

Symptom 

The sound driver for C-Media Electronic CM8338A that comes along RH7.2 is broken. MP3 and some Wav files sound almost 10 times slower that it should. Sounds terrible.

But I found that some of the files can be played normally. What's the different?

Conclusion 

Only 'Microsoft PCM, 8 bit' sounds are ok. and Macintosh MacBinary too.

Sound access under RH8 

Newsgroups: comp.os.linux.setup
Date: Fri, 13 Dec 2002 19:42:20 GMT
> >> I am having problems playing any sound files as a normal user under
> >> redhat 8. I found that it is because that the /dev/dsp (and /dev/mixer)
> >> is mode 600 and is owned by root, so a normal user can't access it. What
> >> worse is that, I can play mp3 after I chmod them 666, but after reboot
> >> (or something?) their mode get changed back.
> >
> > Ah, I know what's causing it. FYI, it is X.
> >
> > This is a newly setup box and I log in as root, startx, then su to my
> > account to do normal works. Once I realized it, I logged in as me, then
> > startx, now the /dev/dsp and /dev/mixer are owned by me.
> >
> > Hope it will help for somebody in future.
>
> Almost...

Ha, good to know somebody else is also suffering. :-)

> My problem is that the permissions on /dev/dsp and /dev/mixer don't change
> when a second user logs in (I'm using gdm). So, when I log in, the
> /dev/dsp|mixer are owned by me, but when my wife logs in, they're *still*
> owned by me and she doesn't get sound.
> I've worked around the problem by changing perms on /dev/dsp and /dev/mixer
> to 666, but when I reboot (7 days and counting since last reboot, but
> that'll end sometime), I'll have the problem all over again.
> I'd really rather fix it, but nothing in /etc/X11/gdm/gdm.conf is jumping
> out at me as the culprit...

Once we know where to twist, it will be easy to fix. :-)

I assume that your runlevel is 5, which means that your Linux boot into Graphics login. You can write a one line script for your window manager to call in when it starts. I think both kde and gnome have this capability, but I don't use them, so I can't tell you how exactly to do it.

My runlevel is 3, so maybe inserting a chmod line in ~/.Xclients might help…

Tong