patch-2.1.102 linux/drivers/sound/ad1848.c

Next file: linux/drivers/sound/adlib_card.c
Previous file: linux/drivers/sound/README.CONFIG
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.101/linux/drivers/sound/ad1848.c linux/drivers/sound/ad1848.c
@@ -105,7 +105,7 @@
 	-1, -1, -1, -1, -1, -1, -1, -1, -1
 };
 
-#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
+#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS) || defined(MODULE)
 
 static int timer_installed = -1;
 
@@ -141,7 +141,7 @@
 static void     ad1848_halt_output(int dev);
 static void     ad1848_trigger(int dev, int bits);
 
-#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
+#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
 static int ad1848_tmr_install(int dev);
 static void ad1848_tmr_reprogram(int dev);
 
@@ -1048,7 +1048,7 @@
 	restore_flags(flags);
 	devc->xfer_count = 0;
 
-#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
+#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
 	if (dev == timer_installed && devc->timer_running)
 		if ((fs & 0x01) != (old_fs & 0x01))
 		{
@@ -1781,6 +1781,7 @@
 	}
 	
 	audio_devs[my_dev]->portc = portc;
+	audio_devs[my_dev]->mixer_dev = -1;
 	memset((char *) portc, 0, sizeof(*portc));
 
 	nr_ad1848_devs++;
@@ -1828,7 +1829,7 @@
 	} else if (irq < 0)
 		irq2dev[-irq] = devc->dev_no = my_dev;
 
-#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
+#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
 	if (devc->model != MD_1848 &&
 	    devc->model != MD_C930 && devc->irq_ok)
 		ad1848_tmr_install(my_dev);
@@ -2005,7 +2006,7 @@
 		if (devc->model != MD_1848 && alt_stat & 0x40)	/* Timer interrupt */
 		{
 			devc->timer_ticks++;
-#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
+#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
 			if (timer_installed == dev && devc->timer_running)
 				sound_timer_interrupt();
 #endif
@@ -2405,7 +2406,7 @@
 	release_region(hw_config->io_base, 4);
 }
 
-#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
+#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
 
 /*
  * Timer stuff (for /dev/music).
@@ -2576,5 +2577,6 @@
 	if(loaded)
 		unload_ms_sound(&hw_config);
 }
+
 #endif
 #endif

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