patch-2.2.0-pre5 linux/drivers/sound/pas2_card.c
Next file: linux/drivers/sound/pas2_midi.c
Previous file: linux/drivers/sound/opl3sa2.c
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Mon Jan 4 11:37:30 1999
- Orig file:
v2.2.0-pre4/linux/drivers/sound/pas2_card.c
- Orig date:
Thu Jul 16 18:09:27 1998
diff -u --recursive --new-file v2.2.0-pre4/linux/drivers/sound/pas2_card.c linux/drivers/sound/pas2_card.c
@@ -73,12 +73,12 @@
unsigned char pas_read(int ioaddr)
{
- return inb(ioaddr ^ translate_code);
+ return inb(ioaddr + translate_code);
}
void pas_write(unsigned char data, int ioaddr)
{
- outb((data), ioaddr ^ translate_code);
+ outb((data), ioaddr + translate_code);
}
/******************* Begin of the Interrupt Handler ********************/
@@ -168,7 +168,7 @@
else
{
int_ptrs = pas_read(0xF38A);
- int_ptrs |= irq_bits[pas_irq] & 0xf;
+ int_ptrs = (int_ptrs & 0xf0) | irq_bits[pas_irq];
pas_write(int_ptrs, 0xF38A);
if (!irq_bits[pas_irq])
{
@@ -297,7 +297,7 @@
outb((0xBC), 0x9A01); /* Activate first board */
outb((hw_config->io_base >> 2), 0x9A01); /* Set base address */
- translate_code = 0x388 ^ hw_config->io_base;
+ translate_code = hw_config->io_base - 0x388;
pas_write(1, 0xBF88); /* Select one wait states */
board_id = pas_read(0x0B8B);
@@ -347,7 +347,7 @@
pas_pcm_init(hw_config);
#endif
-#if !defined(DISABLE_SB_EMULATION) && defined(CONFIG_SB)
+#if !defined(MODULE) && !defined(DISABLE_SB_EMULATION) && defined(CONFIG_SB)
sb_dsp_disable_midi(pas_sb_base); /* No MIDI capability */
#endif
@@ -367,8 +367,18 @@
void unload_pas(struct address_info *hw_config)
{
+ extern int pas_audiodev;
+ extern int pas2_mididev;
+
sound_free_dma(hw_config->dma);
free_irq(hw_config->irq, NULL);
+
+ if(pas_audiodev!=-1)
+ sound_unload_mixerdev(audio_devs[pas_audiodev]->mixer_dev);
+ if(pas2_mididev!=-1)
+ sound_unload_mididev(pas2_mididev);
+ if(pas_audiodev)
+ sound_unload_audiodev(pas_audiodev);
}
#ifdef MODULE
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov