diff options
author | jkh <jkh@FreeBSD.org> | 1995-07-28 21:40:49 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-07-28 21:40:49 +0000 |
commit | 19112b8b1d7c4013411f77a8ee48332903ec93ab (patch) | |
tree | 81647a2f70826c19344d26635282f97d889294b9 /sys/i386/isa/sound/dev_table.c | |
parent | ccee31df86151913015fb2d5accc4c61a4a5f822 (diff) | |
download | FreeBSD-src-19112b8b1d7c4013411f77a8ee48332903ec93ab.zip FreeBSD-src-19112b8b1d7c4013411f77a8ee48332903ec93ab.tar.gz |
Update the sound driver to VOXWARE 3.05 with one GUS patch from
Amancio. There is some SoundSource support here that is primitive and
probably doesn't work, but I'll let the two submitters let me know
how my integration of that was since I don't have this card to test.
I've only tested this on my GUS MAX since it's all I have.
This all probably needs to be re-done anyway since we're widely variant
from the original VOXWARE source in the current layout.
Submitted by: Amancio Hasty and Jim Lowe
Obtained from: Hannu Savolainen
Diffstat (limited to 'sys/i386/isa/sound/dev_table.c')
-rw-r--r-- | sys/i386/isa/sound/dev_table.c | 102 |
1 files changed, 52 insertions, 50 deletions
diff --git a/sys/i386/isa/sound/dev_table.c b/sys/i386/isa/sound/dev_table.c index c79b39d..dc80a3d 100644 --- a/sys/i386/isa/sound/dev_table.c +++ b/sys/i386/isa/sound/dev_table.c @@ -25,7 +25,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * dev_table.c,v 1.6 1994/10/01 02:16:31 swallace Exp */ #define _DEV_TABLE_C_ @@ -53,6 +52,8 @@ sndtable_init (long mem_start) int i, n = sizeof (snd_installed_cards) / sizeof (struct card_info); int drv; + printk ("Sound initialization started\n"); + for (i = 0; i < (n - 1); i++) if (snd_installed_cards[i].enabled) if ((drv = snd_find_driver (snd_installed_cards[i].card_type)) == -1) @@ -78,74 +79,75 @@ sndtable_init (long mem_start) snd_installed_cards[i].enabled = 0; /* * Mark as not detected */ + printk ("Sound initialization complete\n"); return mem_start; } int sndtable_probe (int unit, struct address_info *hw_config) - { - int i, n = sizeof (snd_installed_cards) / sizeof (struct card_info); +{ + int i, n = sizeof (snd_installed_cards) / sizeof (struct card_info); - if (!unit) - return TRUE; + if (!unit) + return TRUE; + + for (i = 0; i < (n - 1); i++) + if (snd_installed_cards[i].enabled) + if (snd_installed_cards[i].card_type == unit) + { + int drv; - for (i = 0; i < (n - 1); i++) - if (snd_installed_cards[i].enabled) - if (snd_installed_cards[i].card_type == unit) - { - int drv; - - snd_installed_cards[i].config.io_base = hw_config->io_base; - snd_installed_cards[i].config.irq = hw_config->irq; - snd_installed_cards[i].config.dma = hw_config->dma; - if ((drv = snd_find_driver (snd_installed_cards[i].card_type)) == -1) - snd_installed_cards[i].enabled = 0; /* + snd_installed_cards[i].config.io_base = hw_config->io_base; + snd_installed_cards[i].config.irq = hw_config->irq; + snd_installed_cards[i].config.dma = hw_config->dma; + if ((drv = snd_find_driver (snd_installed_cards[i].card_type)) == -1) + snd_installed_cards[i].enabled = 0; /* * Mark as not * detected */ - else if (sound_drivers[drv].probe (hw_config)) - return 1; - snd_installed_cards[i].enabled = 0; /* + else if (sound_drivers[drv].probe (hw_config)) + return 1; + snd_installed_cards[i].enabled = 0; /* * Mark as not detected */ - return 0; - } + return 0; + } - return FALSE; - } + return FALSE; +} int sndtable_init_card (int unit, struct address_info *hw_config) - { - int i, n = sizeof (snd_installed_cards) / sizeof (struct card_info); +{ + int i, n = sizeof (snd_installed_cards) / sizeof (struct card_info); - if (!unit) - { - if (sndtable_init (0) != 0) - panic ("snd: Invalid memory allocation"); - return TRUE; - } + if (!unit) + { + if (sndtable_init (0) != 0) + panic ("snd: Invalid memory allocation\n"); + return TRUE; + } - for (i = 0; i < (n - 1); i++) - if (snd_installed_cards[i].card_type == unit) - { - int drv; + for (i = 0; i < (n - 1); i++) + if (snd_installed_cards[i].card_type == unit) + { + int drv; - snd_installed_cards[i].config.io_base = hw_config->io_base; - snd_installed_cards[i].config.irq = hw_config->irq; - snd_installed_cards[i].config.dma = hw_config->dma; + snd_installed_cards[i].config.io_base = hw_config->io_base; + snd_installed_cards[i].config.irq = hw_config->irq; + snd_installed_cards[i].config.dma = hw_config->dma; - if ((drv = snd_find_driver (snd_installed_cards[i].card_type)) == -1) - snd_installed_cards[i].enabled = 0; /* + if ((drv = snd_find_driver (snd_installed_cards[i].card_type)) == -1) + snd_installed_cards[i].enabled = 0; /* * Mark as not detected */ - else if (sound_drivers[drv].attach (0, hw_config) != 0) - panic ("snd#: Invalid memory allocation"); - return TRUE; - } + else if (sound_drivers[drv].attach (0, hw_config) != 0) + panic ("snd#: Invalid memory allocation\n"); + return TRUE; + } - return FALSE; - } + return FALSE; +} int sndtable_get_cardcount (void) @@ -160,8 +162,8 @@ sound_setup (char *str, int *ints) int i, n = sizeof (snd_installed_cards) / sizeof (struct card_info); /* - * First disable all drivers - */ + * First disable all drivers + */ for (i = 0; i < n; i++) snd_installed_cards[i].enabled = 0; @@ -169,8 +171,8 @@ sound_setup (char *str, int *ints) if (ints[0] == 0 || ints[1] == 0) return; /* - * Then enable them one by time - */ + * Then enable them one by time + */ for (i = 1; i <= ints[0]; i++) { |