All of lore.kernel.org
 help / color / mirror / Atom feed
* aoss [patch: /dev/sound, man page]
@ 2004-08-04 23:44 Florian Schmidt
  2004-08-13 12:11 ` Florian Schmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Schmidt @ 2004-08-04 23:44 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]


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:

----- snip ------
diff -Nru alsa-oss/alsa/aoss.1 alsa-oss.new/alsa/aoss.1
--- alsa-oss/alsa/aoss.1	2004-07-27 18:04:55.000000000 +0200
+++ alsa-oss.new/alsa/aoss.1	2004-08-05 01:09:48.000000000 +0200
@@ -30,6 +30,8 @@
 
 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 does currently not support full mmap support. Your
results may vary when trying to use an application that uses mmap'ing to
access the OSS device files.
+
 
 .SS Arguments
 .TP
diff -Nru alsa-oss/alsa/mixer.c alsa-oss.new/alsa/mixer.c
--- alsa-oss/alsa/mixer.c	2004-02-26 11:52:40.000000000 +0100
+++ alsa-oss.new/alsa/mixer.c	2004-08-05 01:16:52.000000000 +0200
@@ -548,6 +548,10 @@
 			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;
diff -Nru alsa-oss/alsa/pcm.c alsa-oss.new/alsa/pcm.c
--- alsa-oss/alsa/pcm.c	2004-05-04 15:02:03.000000000 +0200
+++ alsa-oss.new/alsa/pcm.c	2004-08-05 01:34:13.000000000 +0200
@@ -1651,6 +1651,14 @@
 			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;


-- 
Palimm Palimm!
http://affenbande.org/~tapas/


[-- Attachment #2: dev_sound_man.patch --]
[-- Type: application/octet-stream, Size: 2037 bytes --]

diff -Nru alsa-oss/alsa/aoss.1 alsa-oss.new/alsa/aoss.1
--- alsa-oss/alsa/aoss.1	2004-07-27 18:04:55.000000000 +0200
+++ alsa-oss.new/alsa/aoss.1	2004-08-05 01:09:48.000000000 +0200
@@ -30,6 +30,8 @@
 
 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 does currently not support full mmap support. Your results may vary when trying to use an application that uses mmap'ing to access the OSS device files.
+
 
 .SS Arguments
 .TP
diff -Nru alsa-oss/alsa/mixer.c alsa-oss.new/alsa/mixer.c
--- alsa-oss/alsa/mixer.c	2004-02-26 11:52:40.000000000 +0100
+++ alsa-oss.new/alsa/mixer.c	2004-08-05 01:16:52.000000000 +0200
@@ -548,6 +548,10 @@
 			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;
diff -Nru alsa-oss/alsa/pcm.c alsa-oss.new/alsa/pcm.c
--- alsa-oss/alsa/pcm.c	2004-05-04 15:02:03.000000000 +0200
+++ alsa-oss.new/alsa/pcm.c	2004-08-05 01:34:13.000000000 +0200
@@ -1651,6 +1651,14 @@
 			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;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-08-16 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-04 23:44 aoss [patch: /dev/sound, man page] Florian Schmidt
2004-08-13 12:11 ` Florian Schmidt
2004-08-13 12:26   ` Jaroslav Kysela
2004-08-13 12:58     ` Florian Schmidt
2004-08-13 12:47       ` Jaroslav Kysela
2004-08-16 10:22         ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.