patch-2.4.20 linux-2.4.20/drivers/sound/emu10k1/recmgr.c
Next file: linux-2.4.20/drivers/sound/emu10k1/recmgr.h
Previous file: linux-2.4.20/drivers/sound/emu10k1/main.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Thu Nov 28 15:53:14 2002
- Orig file:
linux-2.4.19/drivers/sound/emu10k1/recmgr.c
- Orig date:
Fri Aug 2 17:39:44 2002
diff -urN linux-2.4.19/drivers/sound/emu10k1/recmgr.c linux-2.4.20/drivers/sound/emu10k1/recmgr.c
@@ -29,19 +29,28 @@
**********************************************************************
*/
+#include <asm/delay.h>
#include "8010.h"
#include "recmgr.h"
+void emu10k1_reset_record(struct emu10k1_card *card, struct wavein_buffer *buffer)
+{
+ DPF(2, "emu10k1_reset_record()\n");
+
+ sblive_writeptr(card, buffer->sizereg, 0, ADCBS_BUFSIZE_NONE);
+
+ sblive_writeptr(card, buffer->sizereg, 0, buffer->sizeregval);
+
+ while (sblive_readptr(card, buffer->idxreg, 0))
+ udelay(5);
+}
+
void emu10k1_start_record(struct emu10k1_card *card, struct wavein_buffer *buffer)
{
DPF(2, "emu10k1_start_record()\n");
- sblive_writeptr(card, buffer->sizereg, 0, buffer->sizeregval);
-
if (buffer->adcctl)
sblive_writeptr(card, ADCCR, 0, buffer->adcctl);
-
- return;
}
void emu10k1_stop_record(struct emu10k1_card *card, struct wavein_buffer *buffer)
@@ -51,10 +60,6 @@
/* Disable record transfer */
if (buffer->adcctl)
sblive_writeptr(card, ADCCR, 0, 0);
-
- sblive_writeptr(card, buffer->sizereg, 0, ADCBS_BUFSIZE_NONE);
-
- return;
}
void emu10k1_set_record_src(struct emu10k1_card *card, struct wiinst *wiinst)
@@ -130,9 +135,7 @@
break;
}
- DPD(2, "bus addx: %#x\n", (u32) buffer->dma_handle);
-
- sblive_writeptr(card, buffer->addrreg, 0, (u32) buffer->dma_handle);
+ DPD(2, "bus addx: %#lx\n", (unsigned long) buffer->dma_handle);
- return;
+ sblive_writeptr(card, buffer->addrreg, 0, (u32)buffer->dma_handle);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)