patch-2.1.132 linux/drivers/sound/es1370.c

Next file: linux/drivers/sound/es1371.c
Previous file: linux/drivers/sound/dmasound.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/drivers/sound/es1370.c linux/drivers/sound/es1370.c
@@ -79,6 +79,7 @@
  *    31.08.98   0.13  Fix realplayer problems - dac.count issues
  *    08.10.98   0.14  Joystick support fixed
  *		       -- Oliver Neukum <c188@org.chemie.uni-muenchen.de>
+ *    10.12.98   0.15  Fix drain_dac trying to wait on not yet initialized DMA
  *
  * some important things missing in Ensoniq documentation:
  *
@@ -998,7 +999,7 @@
 	unsigned long flags;
 	int count, tmo;
 	
-	if (s->dma_dac1.mapped)
+	if (s->dma_dac1.mapped || !s->dma_dac1.ready)
 		return 0;
         current->state = TASK_INTERRUPTIBLE;
         add_wait_queue(&s->dma_dac1.wait, &wait);
@@ -1033,7 +1034,7 @@
 	unsigned long flags;
 	int count, tmo;
 
-	if (s->dma_dac2.mapped)
+	if (s->dma_dac2.mapped || !s->dma_dac2.ready)
 		return 0;
         current->state = TASK_INTERRUPTIBLE;
         add_wait_queue(&s->dma_dac2.wait, &wait);
@@ -2276,7 +2277,7 @@
 
 	if (!pci_present())   /* No PCI bus in this machine! */
 		return -ENODEV;
-	printk(KERN_INFO "es1370: version v0.13 time " __TIME__ " " __DATE__ "\n");
+	printk(KERN_INFO "es1370: version v0.15 time " __TIME__ " " __DATE__ "\n");
 	while (index < NR_DEVICE && 
 	       (pcidev = pci_find_device(PCI_VENDOR_ID_ENSONIQ, PCI_DEVICE_ID_ENSONIQ_ES1370, pcidev))) {
 		if (pcidev->base_address[0] == 0 || 
@@ -2401,8 +2402,6 @@
 		synchronize_irq();
 		free_irq(s->irq, s);
 		release_region(s->io, ES1370_EXTENT);
-		if (s->ctrl & CTRL_JYSTK_EN)
-			release_region(0x200, JOY_EXTENT);
 		unregister_sound_dsp(s->dev_audio);
 		unregister_sound_mixer(s->dev_mixer);
 		unregister_sound_dsp(s->dev_dac);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov