All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Increase buffer sizes for the CA0106 driver.
@ 2005-03-19 18:26 James Courtier-Dutton
  2005-03-21 19:57 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: James Courtier-Dutton @ 2005-03-19 18:26 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

Hi,

This patch increases the buffer size for the ca0106 driver, so this 
might help prevent over/underruns.

Sign off: James Courtier-Dutton

[-- Attachment #2: ca0106-increase-buffer-sizes.diff.txt --]
[-- Type: text/plain, Size: 1623 bytes --]

Index: alsa-driver/alsa-kernel/pci/ca0106/ca0106_main.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ca0106/ca0106_main.c,v
retrieving revision 1.4
diff -u -r1.4 ca0106_main.c
--- alsa-driver/alsa-kernel/pci/ca0106/ca0106_main.c	14 Feb 2005 13:46:49 -0000	1.4
+++ alsa-driver/alsa-kernel/pci/ca0106/ca0106_main.c	19 Mar 2005 18:23:18 -0000
@@ -187,9 +187,9 @@
 	.rate_max =		192000,
 	.channels_min =		2,  //1,
 	.channels_max =		2,  //6,
-	.buffer_bytes_max =	(32*1024),
+	.buffer_bytes_max =	((65536 - 64) * 8),
 	.period_bytes_min =	64,
-	.period_bytes_max =	(16*1024),
+	.period_bytes_max =	(65536 - 64),
 	.periods_min =		2,
 	.periods_max =		8,
 	.fifo_size =		0,
@@ -206,9 +206,9 @@
 	.rate_max =		48000,
 	.channels_min =		2,
 	.channels_max =		2,
-	.buffer_bytes_max =	(32*1024),
+	.buffer_bytes_max =	((65536 - 64) * 8),
 	.period_bytes_min =	64,
-	.period_bytes_max =	(16*1024),
+	.period_bytes_max =	(65536 - 64),
 	.periods_min =		2,
 	.periods_max =		2,
 	.fifo_size =		0,
@@ -513,6 +513,8 @@
 	snd_ca0106_ptr_write(emu, PLAYBACK_LIST_PTR, channel, 0);
 	snd_ca0106_ptr_write(emu, PLAYBACK_DMA_ADDR, channel, runtime->dma_addr);
 	snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, frames_to_bytes(runtime, runtime->period_size)<<16); // buffer size in bytes
+	/* FIXME  test what 0 bytes does. */
+	snd_ca0106_ptr_write(emu, PLAYBACK_PERIOD_SIZE, channel, 0); // buffer size in bytes
 	snd_ca0106_ptr_write(emu, PLAYBACK_POINTER, channel, 0);
 	snd_ca0106_ptr_write(emu, 0x07, channel, 0x0);
 	snd_ca0106_ptr_write(emu, 0x08, channel, 0);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-21 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-19 18:26 [PATCH] Increase buffer sizes for the CA0106 driver James Courtier-Dutton
2005-03-21 19:57 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.