]> git.alsa-project.org Git - alsa-oss.git/commitdiff
Signed-off-by: Florian Schmidt <mista.tapas@gmx.net>
authorFlorian Schmidt <mista.tapas@gmx.net>
Fri, 13 Aug 2004 12:26:52 +0000 (12:26 +0000)
committerJaroslav Kysela <perex@perex.cz>
Fri, 13 Aug 2004 12:26:52 +0000 (12:26 +0000)
The below patch [also attached] fixes the check for device files in
/dev/sound/ [for users of devfs who have configured their apps to use
/dev/sound/dsp, etc..] and  adds a note to the aoss manpage
about the state of mmap support.

alsa/aoss.1
alsa/mixer.c
alsa/pcm.c

index 64ec38383216f1fc2665eebf6763198cee816cf9..febb7895964e488cc4b1807a874c6e7f883c25e1 100644 (file)
@@ -30,6 +30,8 @@ pcm.dsp0 {
 
 In the above configuration examples, the pcm.dsp0 definition is used to wrap calls do /dev/dsp0. You can also wrap usage of /dev/dsp1, /dev/dsp2, etc. by defining pcm.dsp1, pcm.dsp2, etc..
 
+Note on mmap: aoss mmap support might be buggy. Your results may vary when trying to use an application that uses mmap'ing to access the OSS device files.
+
 
 .SS Arguments
 .TP
index f018362a6adce61c49b561d0a0b3e54597fede5c..44198cc7fb04c370b08f022ce5a4526c1815f557 100644 (file)
@@ -548,6 +548,10 @@ int lib_oss_mixer_open(const char *file, int oflag, ...)
                        minor = (atoi(file + 10) << 4) | OSS_DEVICE_MIXER;
                else if (!strncmp(file, "/dev/amixer", 11))
                        minor = (atoi(file + 11) << 4) | OSS_DEVICE_AMIXER;
+               else if (!strncmp(file, "/dev/sound/mixer", 16))
+                       minor = (atoi(file + 16) << 4) | OSS_DEVICE_MIXER;
+               else if (!strncmp(file, "/dev/sound/amixer", 17))
+                       minor = (atoi(file + 17) << 4) | OSS_DEVICE_AMIXER;
                else {
                        errno = ENOENT;
                        return -1;
index a3b50a003cd0b149df3bc40f9d6cca66a288acc2..f01fa341f5d22c3cb32968292ba67b8374d710b5 100644 (file)
@@ -1651,6 +1651,14 @@ int lib_oss_pcm_open(const char *file, int oflag, ...)
                        minor = (atoi(file + 9) << 4) | OSS_DEVICE_ADSP;
                else if (!strncmp(file, "/dev/audio", 10))
                        minor = (atoi(file + 10) << 4) | OSS_DEVICE_AUDIO;
+               else if (!strncmp(file, "/dev/sound/dsp", 14))
+                       minor = (atoi(file + 14) << 4) | OSS_DEVICE_DSP;
+               else if (!strncmp(file, "/dev/sound/dspW", 15))
+                       minor = (atoi(file + 15) << 4) | OSS_DEVICE_DSPW;
+               else if (!strncmp(file, "/dev/sound/adsp", 15))
+                       minor = (atoi(file + 15) << 4) | OSS_DEVICE_ADSP;
+               else if (!strncmp(file, "/dev/sound/audio", 16))
+                       minor = (atoi(file + 16) << 4) | OSS_DEVICE_AUDIO;
                else {
                        errno = ENOENT;
                        return -1;