patch-1.3.9 linux/drivers/sound/pas2_card.c

Next file: linux/drivers/sound/pas2_midi.c
Previous file: linux/drivers/sound/pas.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.8/linux/drivers/sound/pas2_card.c linux/drivers/sound/pas2_card.c
@@ -44,7 +44,7 @@
 static int      pas_intr_mask = 0;
 static int      pas_irq = 0;
 
-static char     pas_model;
+char            pas_model;
 static char    *pas_model_names[] =
 {"", "Pro AudioSpectrum+", "CDPC", "Pro AudioSpectrum 16", "Pro AudioSpectrum 16D"};
 
@@ -79,13 +79,13 @@
 /******************* Begin of the Interrupt Handler ********************/
 
 void
-pasintr (int unused, struct pt_regs * regs)
+pasintr (INT_HANDLER_PARMS (irq, dummy))
 {
   int             status;
 
   status = pas_read (INTERRUPT_STATUS);
-  pas_write (status, INTERRUPT_STATUS);	/*
-						 * Clear interrupt
+  pas_write (status, INTERRUPT_STATUS);		/*
+						   * Clear interrupt
 						 */
 
   if (status & I_S_PCM_SAMPLE_BUFFER_IRQ)
@@ -117,7 +117,7 @@
 
   if (!pas_intr_mask)
     {
-      if ((err = snd_set_irq_handler (pas_irq, pasintr)) < 0)
+      if ((err = snd_set_irq_handler (pas_irq, pasintr, "PAS16")) < 0)
 	return err;
     }
   pas_intr_mask |= mask;
@@ -182,9 +182,13 @@
   pas_write (S_M_PCM_RESET | S_M_FM_RESET | S_M_SB_RESET | S_M_MIXER_RESET	/*
 										 * |
 										 * S_M_OPL3_DUAL_MONO
-	     	     	     	     	     	     	     	     	     	     	     	     	     	     	     	     										 */ , SERIAL_MIXER);
+										 */ , SERIAL_MIXER);
 
-  pas_write (I_C_1_BOOT_RESET_ENABLE, IO_CONFIGURATION_1);
+  pas_write (I_C_1_BOOT_RESET_ENABLE
+#ifdef PAS_JOYSTICK_ENABLE
+	     | I_C_1_JOYSTICK_ENABLE
+#endif
+	     ,IO_CONFIGURATION_1);
 
   if (pas_irq < 0 || pas_irq > 15)
     {
@@ -219,9 +223,9 @@
     }
 
   /*
- * This fixes the timing problems of the PAS due to the Symphony chipset
- * as per Media Vision.  Only define this if your PAS doesn't work correctly.
- */
+     * This fixes the timing problems of the PAS due to the Symphony chipset
+     * as per Media Vision.  Only define this if your PAS doesn't work correctly.
+   */
 #ifdef SYMPHONY_PAS
   OUTB (0x05, 0xa8);
   OUTB (0x60, 0xa9);
@@ -253,8 +257,8 @@
   else
     pas_write (0, PRESCALE_DIVIDER);
 
-  pas_write (P_M_MV508_ADDRESS | 5, PARALLEL_MIXER);
-  pas_write (5, PARALLEL_MIXER);
+  mix_write (P_M_MV508_ADDRESS | 5, PARALLEL_MIXER);
+  mix_write (5, PARALLEL_MIXER);
 
 #if !defined(EXCLUDE_SB_EMULATION) || !defined(EXCLUDE_SB)
 
@@ -295,6 +299,8 @@
 	pas_write (irq_dma, EMULATION_CONFIGURATION);
       }
   }
+#else
+  pas_write (0x00, COMPATIBILITY_ENABLE);
 #endif
 
   if (!ok)
@@ -348,7 +354,7 @@
 				 */
     return 0;
 
-  pas_model = O_M_1_to_card[pas_read (OPERATION_MODE_1) & 0x0f];
+  pas_model = pas_read (CHIP_REV);
 
   return pas_model;
 }
@@ -361,7 +367,7 @@
   if (detect_pas_hw (hw_config))
     {
 
-      if ((pas_model = O_M_1_to_card[pas_read (OPERATION_MODE_1) & 0x0f]))
+      if (pas_model = pas_read (CHIP_REV))
 	{
 	  printk (" <%s rev %d>", pas_model_names[(int) pas_model], pas_read (BOARD_REV_ID));
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this