patch-1.3.71 linux/drivers/sound/dmabuf.c
Next file: linux/drivers/sound/gus_wave.c
Previous file: linux/drivers/sound/dev_table.h
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Fri Mar 1 19:20:28 1996
- Orig file:
v1.3.70/linux/drivers/sound/dmabuf.c
- Orig date:
Wed Feb 28 11:50:07 1996
diff -u --recursive --new-file v1.3.70/linux/drivers/sound/dmabuf.c linux/drivers/sound/dmabuf.c
@@ -738,7 +738,13 @@
case SNDCTL_DSP_GETBLKSIZE:
if (!(dmap_out->flags & DMA_ALLOC_DONE))
- reorganize_buffers (dev, dmap_out, 0);
+ {
+ reorganize_buffers (dev, dmap_out,
+ (audio_devs[dev]->open_mode == OPEN_READ));
+ if (audio_devs[dev]->flags & DMA_DUPLEX)
+ reorganize_buffers (dev, dmap_in,
+ (audio_devs[dev]->open_mode == OPEN_READ));
+ }
return snd_ioctl_return ((int *) arg, dmap_out->fragment_size);
break;
@@ -1403,6 +1409,7 @@
dmap->cfrag = -1;
dmap->flags |= DMA_EMPTY;
+ dmap->counts[dmap->qtail] = dmap->fragment_size;
}
}
@@ -1410,6 +1417,10 @@
{
if (!(audio_devs[dev]->flags & DMA_AUTOMODE))
{
+
+ if (dmap->counts[dmap->qhead] == 0)
+ dmap->counts[dmap->qhead] = dmap->fragment_size;
+
audio_devs[dev]->output_block (dev, dmap->raw_buf_phys +
dmap->qhead * dmap->fragment_size,
dmap->counts[dmap->qhead], 1,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this