All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Schmidt <mista.tapas@gmx.net>
To: alsa-devel@alsa-project.org
Subject: aoss [patch: /dev/sound, man page]
Date: Thu, 5 Aug 2004 01:44:57 +0200	[thread overview]
Message-ID: <20040805014457.49395908@mango.fruits.de> (raw)

[-- 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;

             reply	other threads:[~2004-08-04 23:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04 23:44 Florian Schmidt [this message]
2004-08-13 12:11 ` aoss [patch: /dev/sound, man page] 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040805014457.49395908@mango.fruits.de \
    --to=mista.tapas@gmx.net \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.