From 8e621ce2ee408a8886c1c5cfc20b23ccc8b688aa Mon Sep 17 00:00:00 2001 From: mycroft Date: Mon, 22 Mar 1999 07:52:56 +0000 Subject: [PATCH] Add MIDI and sequencer devices. They seem to work, even. --- etc/etc.alpha/MAKEDEV | 26 +++++++++++++++++++++++++- sys/arch/alpha/alpha/conf.c | 12 ++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/etc/etc.alpha/MAKEDEV b/etc/etc.alpha/MAKEDEV index 795120750ad2..a50993925079 100644 --- a/etc/etc.alpha/MAKEDEV +++ b/etc/etc.alpha/MAKEDEV @@ -1,5 +1,5 @@ #!/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. # All rights reserved. @@ -106,6 +106,7 @@ all) sh $0 random satlink0 speaker local sh $0 scsibus0 scsibus1 scsibus2 scsibus3 sh $0 usbs + sh $0 music rmidi0 rmidi1 rmidi2 rmidi3 rmidi4 rmidi5 rmidi6 rmidi7 ;; minimal) @@ -377,6 +378,29 @@ audio*) 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*) case $i in lpt*) name=lpt; unit=${i#lpt}; flags=0;; diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c index 772b5f0356b7..7be1da558379 100644 --- a/sys/arch/alpha/alpha/conf.c +++ b/sys/arch/alpha/alpha/conf.c @@ -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. @@ -37,7 +37,7 @@ #include /* 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 #include @@ -152,6 +152,10 @@ cdev_decl(ipl); cdev_decl(wd); #include "satlink.h" cdev_decl(satlink); +#include "midi.h" +cdev_decl(midi); +#include "sequencer.h" +cdev_decl(music); #include "a12dc.h" #include "scc.h" @@ -246,6 +250,8 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 46: USB generic HID */ cdev_lpt_init(NULPT,ulpt), /* 47: USB printer */ 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]); @@ -336,6 +342,8 @@ static int chrtoblktbl[] = { /* 46 */ NODEV, /* 47 */ NODEV, /* 48 */ NODEV, + /* 49 */ NODEV, + /* 50 */ NODEV, }; /*