patch-2.3.99-pre8 linux/drivers/sound/maestro.c

Next file: linux/drivers/sound/via82cxxx_audio.c
Previous file: linux/drivers/s390/net/iucv.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre7/linux/drivers/sound/maestro.c linux/drivers/sound/maestro.c
@@ -2381,8 +2381,20 @@
 	struct ess_state *s = (struct ess_state *)file->private_data;
 	unsigned long flags;
 	unsigned int mask = 0;
+	int ret;
 
 	VALIDATE_STATE(s);
+
+/* In 0.14 prog_dmabuf always returns success anyway ... */
+	if (file->f_mode & FMODE_WRITE) {
+		if (!s->dma_dac.ready && (ret = prog_dmabuf(s, 0))) 
+			return POLLERR;
+	}
+	if (file->f_mode & FMODE_READ) {
+	  	if (!s->dma_adc.ready && (ret = prog_dmabuf(s, 1)))
+			return POLLERR;
+	}
+
 	if (file->f_mode & FMODE_WRITE)
 		poll_wait(file, &s->dma_dac.wait, wait);
 	if (file->f_mode & FMODE_READ)

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