This section explains briefly which and how a PCM device is mapped to a OSS counterpart.The first number from /dev/snd/pcmC{X}D{Y} expression means sound card number and second means device number.
Table 7-1. PCM to OSSDevice mapping
PCMDevice | OSSDevice | Device No. |
|---|---|---|
| /dev/snd/pcmC0D0 | /dev/audio0 (/dev/audio) | minor 4 |
| /dev/snd/pcmC0D0 | /dev/dsp0 (/dev/dsp) | minor 3 |
| /dev/snd/pcmC0D1 | /dev/adsp0 (/dev/adsp) | minor 12 |
| /dev/snd/pcmC1D0 | /dev/audio1 | minor 4+16 = 20 |
| /dev/snd/pcmC1D0 | /dev/dsp1 | minor 3+16 =19 |
| /dev/snd/pcmC1D1 | /dev/adsp1 | minor 12+16 =28 |
| /dev/snd/pcmC2D0 | /dev/audio2 | minor 4+32 = 36 |
| /dev/snd/pcmC2D0 | /dev/dsp2 | minor 3+32 =39 |
| /dev/snd/pcmC2D1 | /dev/adsp2 | minor 12+32= 44 |
Some of the applications using OSS PCM may have problems with ALSA OSS emulation with the default settings. Or, some may need more (or less) fragment buffer size. The ALSA OSS emulation can change parameters automatically for each application.
For obtaining the current setting, read the appropriate proc file. For setting parameters, write a string to the proc file instead. The syntax is as follows:
Playback <app_name> <fragments&62; <fragment_size> [options]
Capture <app_name> <fragments> <fragment_size> [options]
<app_name>
name of application with (higher priority) or without path If this is given with path (e.g. /usr/games/bin/quake), the application is searched without path.
<fragments>
number of fragments or zero if auto
<fragment_size>
size of fragment in bytes or zero if auto
[options]
disable
the application tries to open a pcm device for this channel but does not want to use it.(Cause a bug or mmap needs).It's good for Quake etc...
block
force block mode (rvplayer)
non-block
force non-block mode
echo Playback x11amp 128 16384 > /proc/asound/0/pcmD0o
echo Playback squake 0 0 disable > /proc/asound/0/pcm0Do
echo Playback rvplayer 0 0 block > /proc/asound/0/pcm0Do
For removing these additional settings, give <erase> or <clean> in app_name: that is,
echo Playback erase > /proc/asound/0/pcmD0o
echo Capture erase > /proc/asound/0/pcmD0o
The ALSA driver fully supports the devfs extension. You should add the following lines to your devfsd.conf file to make things work properly:
Tip: LOOKUP EXECUTE snd /sbin/modprobe snd
REGISTER sound/.* PERMISSIONS root.audio 660
REGISTER snd/.* PERMISSIONS root.audio 660