diff options
author | bde <bde@FreeBSD.org> | 1998-10-22 05:58:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-10-22 05:58:45 +0000 |
commit | df88297cad3e438e774e13137af8eaff53c0fc7f (patch) | |
tree | d694ec5d94b6e29be85865e36be61cbb2bea66dc /sys/i386/isa/sound | |
parent | 7a07480a8f242db0c438040f3beb4ce7b2c7cde2 (diff) | |
download | FreeBSD-src-df88297cad3e438e774e13137af8eaff53c0fc7f.zip FreeBSD-src-df88297cad3e438e774e13137af8eaff53c0fc7f.tar.gz |
Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c. Use a different hack in isa_device.h
so that a new config(8) is not required yet.
pc98 parts approved by: kato
Diffstat (limited to 'sys/i386/isa/sound')
-rw-r--r-- | sys/i386/isa/sound/sound_calls.h | 7 | ||||
-rw-r--r-- | sys/i386/isa/sound/soundcard.c | 25 |
2 files changed, 29 insertions, 3 deletions
diff --git a/sys/i386/isa/sound/sound_calls.h b/sys/i386/isa/sound/sound_calls.h index 62d9548..cb00e30 100644 --- a/sys/i386/isa/sound/sound_calls.h +++ b/sys/i386/isa/sound/sound_calls.h @@ -99,6 +99,7 @@ int sb_dsp_detect (struct address_info *hw_config); void sb_dsp_init (struct address_info *hw_config); void sb_dsp_disable_midi(void); int sb_dsp_command (u_char val); +ointhand2_t sbintr; int sb_reset_dsp (void); /* From sb16_dsp.c */ @@ -140,6 +141,7 @@ int probe_adlib(struct address_info *hw_config); /* From pas_card.c */ void attach_pas_card(struct address_info *hw_config); int probe_pas(struct address_info *hw_config); +ointhand2_t pasintr; int pas_set_intr(int mask); int pas_remove_intr(int mask); u_char pas_read(int ioaddr); @@ -160,7 +162,7 @@ void pas_midi_interrupt(void); void attach_gus_card(struct address_info * hw_config); int probe_gus(struct address_info *hw_config); int gus_set_midi_irq(int num); -/*void gusintr(int irq); */ +ointhand2_t gusintr; void attach_gus_db16(struct address_info * hw_config); int probe_gus_db16(struct address_info *hw_config); @@ -186,6 +188,7 @@ void mpuintr(int irq); /* From uart6850.c */ void attach_uart6850(struct address_info * hw_config); +ointhand2_t m6850intr; int probe_uart6850(struct address_info *hw_config); /* From opl3.c */ @@ -209,6 +212,7 @@ void sound_timer_syncinterval(u_int new_usecs); /* From ad1848.c */ void ad1848_init (char *name, int io_base, int irq, int dma_playback, int dma_capture, int share_dma, sound_os_info *osp); +ointhand2_t adintr; int ad1848_detect (int io_base, int *flags, sound_os_info *osp); #define AD_F_CS4231 0x0001 /* Returned if a CS4232 (or compatible) detected */ @@ -233,6 +237,7 @@ int probe_sscape (struct address_info *hw_config); void attach_sscape (struct address_info *hw_config); int probe_ss_mss(struct address_info *hw_config); void attach_ss_mss(struct address_info * hw_config); +ointhand2_t sscapeintr; int pss_read (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); int pss_write (int dev, struct fileinfo *file, snd_rw_buf *buf, int count); diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index 52428b4..43649c0 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -130,6 +130,8 @@ struct isa_driver sscape_mssdriver = {sndprobe, sndattach, "sscape_mss"}; short ipri_to_irq(u_short ipri); +static ointhand2_t sndintr; + u_long get_time(void) { @@ -396,8 +398,27 @@ sndattach(struct isa_device * dev) static int midi_initialized = 0; static int seq_initialized = 0; struct address_info hw_config; + char *dname; void *tmp; - + + /* XXX this is probably incomplete. */ + dname = dev->id_driver->name; + if (strcmp(dname, "css") == 0 || strcmp(dname, "gusxvi") == 0 || + strcmp(dname, "mss") == 0) + dev->id_ointr = adintr; + if (strcmp(dname, "gus") == 0) + dev->id_ointr = gusintr; + if (strcmp(dname, "pas") == 0) + dev->id_ointr = pasintr; + if (strcmp(dname, "sb") == 0) + dev->id_ointr = sbintr; + if (strcmp(dname, "sscape_mss") == 0) + dev->id_ointr = sndintr; + if (strcmp(dname, "sscape") == 0 || strcmp(dname, "trix") == 0) + dev->id_ointr = sscapeintr; + if (strcmp(dname, "uart0") == 0) + dev->id_ointr = m6850intr; + unit = driver_to_voxunit(dev->id_driver); hw_config.io_base = dev->id_iobase; hw_config.irq = ipri_to_irq(dev->id_irq); @@ -576,7 +597,7 @@ snd_set_irq_handler(int int_lvl, void (*hndlr) (int), sound_os_info * osp) return 1; } -void +static void sndintr(int unit) { if ( (unit >= MAX_UNIT) || (irq_proc[unit] == NULL) ) |