From: James Courtier-Dutton <James@superbug.co.uk>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: [PATCH] Increase buffer sizes for the CA0106 driver.
Date: Sat, 19 Mar 2005 18:26:17 +0000 [thread overview]
Message-ID: <423C6EC9.5070701@superbug.co.uk> (raw)
[-- 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);
next reply other threads:[~2005-03-19 18:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-19 18:26 James Courtier-Dutton [this message]
2005-03-21 19:57 ` [PATCH] Increase buffer sizes for the CA0106 driver Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=423C6EC9.5070701@superbug.co.uk \
--to=james@superbug.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.