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

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

diff -u --recursive --new-file v2.1.131/linux/drivers/sound/sb_audio.c linux/drivers/sound/sb_audio.c
@@ -91,6 +91,14 @@
 {
 	sb_devc *devc = audio_devs[dev]->devc;
 
+	/* if we did dma juggling put the right dmap in the right place */
+	if(devc->duplex && audio_devs[dev]->dmap_out->dma != devc->dma8)
+	{
+		struct dma_buffparms *dmap_temp;
+		dmap_temp = audio_devs[dev]->dmap_out;
+		audio_devs[dev]->dmap_out = audio_devs[dev]->dmap_in;
+		audio_devs[dev]->dmap_in = dmap_temp;
+	}
 	audio_devs[dev]->dmap_out->dma = devc->dma8;
 	audio_devs[dev]->dmap_in->dma = ( devc->duplex ) ?
 		devc->dma16 : devc->dma8;
@@ -1136,6 +1144,12 @@
 	}
 }
 
+static void
+sb16_audio_mmap(int dev)
+{
+	sb_devc       *devc = audio_devs[dev]->devc;
+	devc->fullduplex = 0;
+}
 
 static struct audio_driver sb1_audio_driver =	/* SB1.x */
 {
@@ -1254,7 +1268,10 @@
 	sb16_audio_trigger,
 	sb16_audio_set_speed,
 	sb16_audio_set_bits,
-	sbpro_audio_set_channels
+	sbpro_audio_set_channels,
+	NULL,
+	NULL,
+	sb16_audio_mmap
 };
 
 static struct audio_driver ess_audio_driver =	/* ESS ES688/1688 */

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