Add MIDI and sequencer devices. They seem to work, even.

This commit is contained in:
mycroft 1999-03-22 07:52:56 +00:00
parent a873302b17
commit 8e621ce2ee
2 changed files with 35 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh - #!/bin/sh -
# $NetBSD: MAKEDEV,v 1.36 1999/01/19 22:27:35 thorpej Exp $ # $NetBSD: MAKEDEV,v 1.37 1999/03/22 07:52:56 mycroft Exp $
# #
# Copyright (c) 1990 The Regents of the University of California. # Copyright (c) 1990 The Regents of the University of California.
# All rights reserved. # All rights reserved.
@ -106,6 +106,7 @@ all)
sh $0 random satlink0 speaker local sh $0 random satlink0 speaker local
sh $0 scsibus0 scsibus1 scsibus2 scsibus3 sh $0 scsibus0 scsibus1 scsibus2 scsibus3
sh $0 usbs sh $0 usbs
sh $0 music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7
;; ;;
minimal) minimal)
@ -377,6 +378,29 @@ audio*)
chmod 666 $audio $sound $mixer $audioctl chmod 666 $audio $sound $mixer $audioctl
;; ;;
rmidi*)
unit=${i#rmidi}
major=49
rmidi=rmidi$unit
rm -f $rmidi
mknod $rmidi c $major $unit
chown root.wheel $rmidi
chmod 666 $rmidi
;;
music*)
unit=${i#music}
music=music$unit
sequencer=sequencer$unit
major=50
if [ "$unit" = "" ]; then unit=0; fi
rm -f $sequencer $music
mknod $music c $major $(($unit + 0))
mknod $sequencer c $major $(($unit + 128))
chown root.wheel $music $sequencer
chmod 666 $music $sequencer
;;
lpt*|lpa*) lpt*|lpa*)
case $i in case $i in
lpt*) name=lpt; unit=${i#lpt}; flags=0;; lpt*) name=lpt; unit=${i#lpt}; flags=0;;

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.37 1998/12/08 15:52:31 augustss Exp $ */ /* $NetBSD: conf.c,v 1.38 1999/03/22 07:52:56 mycroft Exp $ */
/*- /*-
* Copyright (c) 1991 The Regents of the University of California. * Copyright (c) 1991 The Regents of the University of California.
@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.37 1998/12/08 15:52:31 augustss Exp $"); __KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.38 1999/03/22 07:52:56 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -152,6 +152,10 @@ cdev_decl(ipl);
cdev_decl(wd); cdev_decl(wd);
#include "satlink.h" #include "satlink.h"
cdev_decl(satlink); cdev_decl(satlink);
#include "midi.h"
cdev_decl(midi);
#include "sequencer.h"
cdev_decl(music);
#include "a12dc.h" #include "a12dc.h"
#include "scc.h" #include "scc.h"
@ -246,6 +250,8 @@ struct cdevsw cdevsw[] =
cdev_usbdev_init(NUHID,uhid), /* 46: USB generic HID */ cdev_usbdev_init(NUHID,uhid), /* 46: USB generic HID */
cdev_lpt_init(NULPT,ulpt), /* 47: USB printer */ cdev_lpt_init(NULPT,ulpt), /* 47: USB printer */
cdev_ugen_init(NUGEN,ugen), /* 48: USB generic driver */ cdev_ugen_init(NUGEN,ugen), /* 48: USB generic driver */
cdev_midi_init(NMIDI,midi), /* 49: MIDI I/O */
cdev_midi_init(NSEQUENCER,sequencer), /* 50: sequencer I/O */
}; };
int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]); int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
@ -336,6 +342,8 @@ static int chrtoblktbl[] = {
/* 46 */ NODEV, /* 46 */ NODEV,
/* 47 */ NODEV, /* 47 */ NODEV,
/* 48 */ NODEV, /* 48 */ NODEV,
/* 49 */ NODEV,
/* 50 */ NODEV,
}; };
/* /*