Add kernel hooks for /dev/vatio -- a minimalistic BSD audio driver emulator

created by Amancio Hasty (specificly, this, in conjunction with his sound
driver mods for dual-mode DMA will allow VAT compiled for BSD/386 1.1 to
run under FreeBSD 2.x.)
This commit is contained in:
Paul Traina 1994-11-01 01:47:22 +00:00
parent 0a87b23329
commit 5ea2be93cd
5 changed files with 42 additions and 9 deletions

View File

@ -69,8 +69,9 @@
# snd* various sound cards
# pcaudio PCM audio driver
# socksys iBCS2 socket system driver
* vat VAT compatibility audio driver (requires snd*)
#
# $Id: MAKEDEV,v 1.44 1994/10/26 01:30:47 phk Exp $
# $Id: MAKEDEV,v 1.45 1994/10/29 10:03:37 phk Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:
@ -586,6 +587,13 @@ snd*)
chmod 666 audio1
;;
vat)
rm -f vatio
mknod vatio c 25 128
chown root.wheel vatio
chmod 660 vatio
;;
apm)
rm -f apm
mknod apm c 39 0

View File

@ -69,8 +69,9 @@
# snd* various sound cards
# pcaudio PCM audio driver
# socksys iBCS2 socket system driver
* vat VAT compatibility audio driver (requires snd*)
#
# $Id: MAKEDEV,v 1.44 1994/10/26 01:30:47 phk Exp $
# $Id: MAKEDEV,v 1.45 1994/10/29 10:03:37 phk Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:
@ -586,6 +587,13 @@ snd*)
chmod 666 audio1
;;
vat)
rm -f vatio
mknod vatio c 25 128
chown root.wheel vatio
chmod 660 vatio
;;
apm)
rm -f apm
mknod apm c 39 0

View File

@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
# $Id: files.i386,v 1.56 1994/10/27 20:44:27 jkh Exp $
# $Id: files.i386,v 1.57 1994/10/28 15:09:38 jkh Exp $
#
i386/apm/apm.c optional apm device-driver
i386/apm/apm_setup.s optional apm
@ -109,6 +109,7 @@ i386/isa/sound/sound_timer.c optional snd device-driver
i386/isa/sound/soundcard.c optional snd device-driver
i386/isa/sound/sys_timer.c optional snd device-driver
i386/isa/sound/uart6850.c optional snd device-driver
i386/isa/sound/vat_audio.c optional vat_audio
i386/isa/spkr.c optional speaker
i386/isa/tw.c optional tw device-driver
i386/isa/ultra14f.c optional uha device-driver

View File

@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
# $Id: files.i386,v 1.56 1994/10/27 20:44:27 jkh Exp $
# $Id: files.i386,v 1.57 1994/10/28 15:09:38 jkh Exp $
#
i386/apm/apm.c optional apm device-driver
i386/apm/apm_setup.s optional apm
@ -109,6 +109,7 @@ i386/isa/sound/sound_timer.c optional snd device-driver
i386/isa/sound/soundcard.c optional snd device-driver
i386/isa/sound/sys_timer.c optional snd device-driver
i386/isa/sound/uart6850.c optional snd device-driver
i386/isa/sound/vat_audio.c optional vat_audio
i386/isa/spkr.c optional speaker
i386/isa/tw.c optional tw device-driver
i386/isa/ultra14f.c optional uha device-driver

View File

@ -41,7 +41,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.c 5.8 (Berkeley) 5/12/91
* $Id: conf.c,v 1.38 1994/10/13 20:17:06 sos Exp $
* $Id: conf.c,v 1.39 1994/10/31 17:20:12 joerg Exp $
*/
#include <sys/param.h>
@ -426,6 +426,22 @@ d_select_t sndselect;
#define sndselect seltrue
#endif
#include "vat_audio.h" /* BSD audio driver emulator for voxware */
#if NVAT_AUDIO > 0 /* not general purpose, just vat */
d_open_t vaopen;
d_close_t vaclose;
d_ioctl_t vaioctl;
d_rdwr_t varead, vawrite;
d_select_t vaselect;
#else
#define vaopen (d_open_t *)enxio
#define vaclose (d_close_t *)enxio
#define vaioctl (d_ioctl_t *)enxio
#define varead (d_rdwr_t *)enxio
#define vawrite (d_rdwr_t *)enxio
#define vaselect seltrue
#endif
/* /dev/fd/NNN */
d_open_t fdopen;
@ -665,10 +681,9 @@ struct cdevsw cdevsw[] =
{ pcaopen, pcaclose, noread, pcawrite, /*24*/
pcaioctl, nostop, nullreset, NULL, /* pcaudio */
pcaselect, nommap, NULL },
{ (d_open_t *)enxio, (d_close_t *)enxio, (d_rdwr_t *)enxio, /*25*/
(d_rdwr_t *)enxio, (d_ioctl_t *)enxio, (d_stop_t *)enxio, /* unused */
(d_reset_t *)enxio, NULL, (d_select_t *)enxio,
(d_mmap_t *)enxio, NULL },
{ vaopen, vaclose, varead, vawrite, /*25*/
vaioctl, nostop, nullreset, NULL, /* vat driver */
vaselect, nommap, NULL },
{ spkropen, spkrclose, noread, spkrwrite, /*26*/
spkrioctl, nostop, nullreset, NULL, /* spkr */
seltrue, nommap, NULL },