patch-2.4.15 linux/drivers/sound/trident.c

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

diff -u --recursive --new-file v2.4.14/linux/drivers/sound/trident.c linux/drivers/sound/trident.c
@@ -640,13 +640,21 @@
 static void trident_free_pcm_channel(struct trident_card *card, unsigned int channel)
 {
 	int bank;
+        unsigned char b;
 
 	if (channel < 31 || channel > 63)
 		return;
 
+	if (card->pci_id == PCI_DEVICE_ID_TRIDENT_4DWAVE_DX ||
+            card->pci_id == PCI_DEVICE_ID_TRIDENT_4DWAVE_NX) {
+          b = inb (TRID_REG(card, T4D_REC_CH));
+          if ((b & ~0x80) == channel)
+            outb(0x0, TRID_REG(card, T4D_REC_CH));
+        }
+            
 	bank = channel >> 5;
 	channel = channel & 0x1f;
-
+        
 	card->banks[bank].bitmap &= ~(1 << (channel));
 }
 
@@ -3934,7 +3942,6 @@
 {
 	unsigned long iobase;
 	struct trident_card *card;
-	dma_addr_t mask;
 	u8 bits;
 	u8 revision;
 	int i = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)