23 #include <asm/uaccess.h>
26 static int emu8000_reset_addr;
28 MODULE_PARM_DESC(emu8000_reset_addr,
"reset write address at each time (makes slowdown)");
75 #define BLANK_LOOP_START 4
76 #define BLANK_LOOP_END 8
77 #define BLANK_LOOP_SIZE 12
78 #define BLANK_HEAD_SIZE 48
93 #ifdef SNDRV_LITTLE_ENDIAN
133 if (emu8000_reset_addr) {
134 if (emu8000_reset_addr > 1)
135 snd_emu8000_write_wait(emu);
149 const void __user *data,
long count)
166 if (sp->
v.loopstart > sp->
v.loopend) {
167 int tmp = sp->
v.loopstart;
168 sp->
v.loopstart = sp->
v.loopend;
173 truesize = sp->
v.size;
175 truesize += sp->
v.loopend - sp->
v.loopstart;
195 sp->
v.end -= sp->
v.start;
196 sp->
v.loopstart -= sp->
v.start;
197 sp->
v.loopend -= sp->
v.start;
202 dram_start = dram_offset;
205 sp->
v.truesize = truesize * 2;
212 snd_emu8000_write_wait(emu);
219 if (! sp->
block->offset) {
221 write_word(emu, &dram_offset, 0);
227 for (i = 0; i < sp->
v.size; i++) {
230 s = read_word(data, offset, sp->
v.mode_flags);
232 write_word(emu, &dram_offset, s);
239 if (i == sp->
v.loopend &&
242 int looplen = sp->
v.loopend - sp->
v.loopstart;
246 for (k = 1; k <= looplen; k++) {
247 s = read_word(data, offset - k, sp->
v.mode_flags);
248 write_word(emu, &dram_offset, s);
251 sp->
v.loopend += looplen;
253 sp->
v.loopstart += looplen;
254 sp->
v.loopend += looplen;
256 sp->
v.end += looplen;
263 write_word(emu, &dram_offset, 0);
272 sp->
v.start += dram_start;
273 sp->
v.end += dram_start;
274 sp->
v.loopstart += dram_start;
275 sp->
v.loopend += dram_start;
277 snd_emu8000_close_dma(emu);