summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmpatel <smpatel@FreeBSD.org>1996-11-05 02:04:37 +0000
committersmpatel <smpatel@FreeBSD.org>1996-11-05 02:04:37 +0000
commit216fc55e6b7e92bd53156df727cfc4efa4b70c55 (patch)
tree0316aa99c801956874680f5c920f65cb31948c77
parentff98acfec90d368b9d6b2fed18b2dbb0f9dd03b5 (diff)
downloadFreeBSD-src-216fc55e6b7e92bd53156df727cfc4efa4b70c55.zip
FreeBSD-src-216fc55e6b7e92bd53156df727cfc4efa4b70c55.tar.gz
Add audio mixer ioctls.
Only writing to the mixer is implemented.
-rw-r--r--sys/alpha/linux/linux.h20
-rw-r--r--sys/compat/linux/linux_ioctl.c74
-rw-r--r--sys/i386/linux/linux.h20
-rw-r--r--sys/i386/linux/linux_ioctl.c74
4 files changed, 184 insertions, 4 deletions
diff --git a/sys/alpha/linux/linux.h b/sys/alpha/linux/linux.h
index d62bd62..45dc927 100644
--- a/sys/alpha/linux/linux.h
+++ b/sys/alpha/linux/linux.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux.h,v 1.9 1996/10/15 19:22:29 bde Exp $
+ * $Id: linux.h,v 1.10 1996/10/25 16:20:22 bde Exp $
*/
#ifndef _I386_LINUX_LINUX_H_
@@ -483,6 +483,24 @@ struct trapframe;
#define LINUX_SNDCTL_DSP_GETOSPACE 0x500C
#define LINUX_SNDCTL_DSP_GETISPACE 0x500D
#define LINUX_SNDCTL_DSP_NONBLOCK 0x500E
+#define LINUX_SOUND_MIXER_WRITE_VOLUME 0x4d00
+#define LINUX_SOUND_MIXER_WRITE_BASS 0x4d01
+#define LINUX_SOUND_MIXER_WRITE_TREBLE 0x4d02
+#define LINUX_SOUND_MIXER_WRITE_SYNTH 0x4d03
+#define LINUX_SOUND_MIXER_WRITE_PCM 0x4d04
+#define LINUX_SOUND_MIXER_WRITE_SPEAKER 0x4d05
+#define LINUX_SOUND_MIXER_WRITE_LINE 0x4d06
+#define LINUX_SOUND_MIXER_WRITE_MIC 0x4d07
+#define LINUX_SOUND_MIXER_WRITE_CD 0x4d08
+#define LINUX_SOUND_MIXER_WRITE_IMIX 0x4d09
+#define LINUX_SOUND_MIXER_WRITE_ALTPCM 0x4d0A
+#define LINUX_SOUND_MIXER_WRITE_RECLEV 0x4d0B
+#define LINUX_SOUND_MIXER_WRITE_IGAIN 0x4d0C
+#define LINUX_SOUND_MIXER_WRITE_OGAIN 0x4d0D
+#define LINUX_SOUND_MIXER_WRITE_LINE1 0x4d0E
+#define LINUX_SOUND_MIXER_WRITE_LINE2 0x4d0F
+#define LINUX_SOUND_MIXER_WRITE_LINE3 0x4d10
+#define LINUX_SOUND_MIXER_READ_DEVMASK 0x4dfe
/* Socket system defines */
#define LINUX_SIOCGIFCONF 0x8912
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 90a14b5..e4d8f66 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_ioctl.c,v 1.10 1996/06/12 05:06:27 gpalmer Exp $
+ * $Id: linux_ioctl.c,v 1.11 1996/06/23 17:08:11 bde Exp $
*/
#include <sys/param.h>
@@ -691,6 +691,78 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
args->cmd = SNDCTL_DSP_NONBLOCK;
return ioctl(p, (struct ioctl_args *)args, retval);
+ case LINUX_SOUND_MIXER_WRITE_VOLUME:
+ args->cmd = SOUND_MIXER_WRITE_VOLUME;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_BASS:
+ args->cmd = SOUND_MIXER_WRITE_BASS;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_TREBLE:
+ args->cmd = SOUND_MIXER_WRITE_TREBLE;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_SYNTH:
+ args->cmd = SOUND_MIXER_WRITE_SYNTH;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_PCM:
+ args->cmd = SOUND_MIXER_WRITE_PCM;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_SPEAKER:
+ args->cmd = SOUND_MIXER_WRITE_SPEAKER;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE:
+ args->cmd = SOUND_MIXER_WRITE_LINE;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_MIC:
+ args->cmd = SOUND_MIXER_WRITE_MIC;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_CD:
+ args->cmd = SOUND_MIXER_WRITE_CD;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_IMIX:
+ args->cmd = SOUND_MIXER_WRITE_IMIX;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_ALTPCM:
+ args->cmd = SOUND_MIXER_WRITE_ALTPCM;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_RECLEV:
+ args->cmd = SOUND_MIXER_WRITE_RECLEV;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_IGAIN:
+ args->cmd = SOUND_MIXER_WRITE_IGAIN;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_OGAIN:
+ args->cmd = SOUND_MIXER_WRITE_OGAIN;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE1:
+ args->cmd = SOUND_MIXER_WRITE_LINE1;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE2:
+ args->cmd = SOUND_MIXER_WRITE_LINE2;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE3:
+ args->cmd = SOUND_MIXER_WRITE_LINE3;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_READ_DEVMASK:
+ args->cmd = SOUND_MIXER_READ_DEVMASK;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
case LINUX_TIOCGSERIAL:
linux_tiocgserial(fp, (struct linux_serial_struct *)args->arg);
return 0;
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index d62bd62..45dc927 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux.h,v 1.9 1996/10/15 19:22:29 bde Exp $
+ * $Id: linux.h,v 1.10 1996/10/25 16:20:22 bde Exp $
*/
#ifndef _I386_LINUX_LINUX_H_
@@ -483,6 +483,24 @@ struct trapframe;
#define LINUX_SNDCTL_DSP_GETOSPACE 0x500C
#define LINUX_SNDCTL_DSP_GETISPACE 0x500D
#define LINUX_SNDCTL_DSP_NONBLOCK 0x500E
+#define LINUX_SOUND_MIXER_WRITE_VOLUME 0x4d00
+#define LINUX_SOUND_MIXER_WRITE_BASS 0x4d01
+#define LINUX_SOUND_MIXER_WRITE_TREBLE 0x4d02
+#define LINUX_SOUND_MIXER_WRITE_SYNTH 0x4d03
+#define LINUX_SOUND_MIXER_WRITE_PCM 0x4d04
+#define LINUX_SOUND_MIXER_WRITE_SPEAKER 0x4d05
+#define LINUX_SOUND_MIXER_WRITE_LINE 0x4d06
+#define LINUX_SOUND_MIXER_WRITE_MIC 0x4d07
+#define LINUX_SOUND_MIXER_WRITE_CD 0x4d08
+#define LINUX_SOUND_MIXER_WRITE_IMIX 0x4d09
+#define LINUX_SOUND_MIXER_WRITE_ALTPCM 0x4d0A
+#define LINUX_SOUND_MIXER_WRITE_RECLEV 0x4d0B
+#define LINUX_SOUND_MIXER_WRITE_IGAIN 0x4d0C
+#define LINUX_SOUND_MIXER_WRITE_OGAIN 0x4d0D
+#define LINUX_SOUND_MIXER_WRITE_LINE1 0x4d0E
+#define LINUX_SOUND_MIXER_WRITE_LINE2 0x4d0F
+#define LINUX_SOUND_MIXER_WRITE_LINE3 0x4d10
+#define LINUX_SOUND_MIXER_READ_DEVMASK 0x4dfe
/* Socket system defines */
#define LINUX_SIOCGIFCONF 0x8912
diff --git a/sys/i386/linux/linux_ioctl.c b/sys/i386/linux/linux_ioctl.c
index 90a14b5..e4d8f66 100644
--- a/sys/i386/linux/linux_ioctl.c
+++ b/sys/i386/linux/linux_ioctl.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_ioctl.c,v 1.10 1996/06/12 05:06:27 gpalmer Exp $
+ * $Id: linux_ioctl.c,v 1.11 1996/06/23 17:08:11 bde Exp $
*/
#include <sys/param.h>
@@ -691,6 +691,78 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
args->cmd = SNDCTL_DSP_NONBLOCK;
return ioctl(p, (struct ioctl_args *)args, retval);
+ case LINUX_SOUND_MIXER_WRITE_VOLUME:
+ args->cmd = SOUND_MIXER_WRITE_VOLUME;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_BASS:
+ args->cmd = SOUND_MIXER_WRITE_BASS;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_TREBLE:
+ args->cmd = SOUND_MIXER_WRITE_TREBLE;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_SYNTH:
+ args->cmd = SOUND_MIXER_WRITE_SYNTH;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_PCM:
+ args->cmd = SOUND_MIXER_WRITE_PCM;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_SPEAKER:
+ args->cmd = SOUND_MIXER_WRITE_SPEAKER;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE:
+ args->cmd = SOUND_MIXER_WRITE_LINE;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_MIC:
+ args->cmd = SOUND_MIXER_WRITE_MIC;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_CD:
+ args->cmd = SOUND_MIXER_WRITE_CD;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_IMIX:
+ args->cmd = SOUND_MIXER_WRITE_IMIX;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_ALTPCM:
+ args->cmd = SOUND_MIXER_WRITE_ALTPCM;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_RECLEV:
+ args->cmd = SOUND_MIXER_WRITE_RECLEV;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_IGAIN:
+ args->cmd = SOUND_MIXER_WRITE_IGAIN;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_OGAIN:
+ args->cmd = SOUND_MIXER_WRITE_OGAIN;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE1:
+ args->cmd = SOUND_MIXER_WRITE_LINE1;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE2:
+ args->cmd = SOUND_MIXER_WRITE_LINE2;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_WRITE_LINE3:
+ args->cmd = SOUND_MIXER_WRITE_LINE3;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
+ case LINUX_SOUND_MIXER_READ_DEVMASK:
+ args->cmd = SOUND_MIXER_READ_DEVMASK;
+ return ioctl(p, (struct ioctl_args *)args, retval);
+
case LINUX_TIOCGSERIAL:
linux_tiocgserial(fp, (struct linux_serial_struct *)args->arg);
return 0;
OpenPOWER on IntegriCloud