1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Add audio mixer ioctls.

Only writing to the mixer is implemented.
This commit is contained in:
Sujal Patel 1996-11-05 02:04:37 +00:00
parent f078c9c9bc
commit e89054370f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19414
4 changed files with 184 additions and 4 deletions

View File

@ -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

View File

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

View File

@ -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

View File

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