[alsa-devel] [PATCH v2 4/9] snd-atmel-ac97c: set correct size for buffer hardware parameter
Hans-Christian Egtvedt
hans-christian.egtvedt at atmel.com
Thu Apr 2 08:21:13 CEST 2009
This patch will set a proper maximum bytes for the buffer, which is:
channels * bytes per sample * maximum periods * maximum bytes per period.
It also sets the minimum periods to 6, a value chosen from testing, with
a minimum of 6 periods the system has good time to fill in new audio
data without skipping.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt at atmel.com>
---
sound/atmel/ac97c.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 4e8f66d..c9bc345 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -151,10 +151,10 @@ static struct snd_pcm_hardware atmel_ac97c_hw = {
.rate_max = 48000,
.channels_min = 1,
.channels_max = 2,
- .buffer_bytes_max = 64 * 4096,
+ .buffer_bytes_max = 2 * 2 * 64 * 2048,
.period_bytes_min = 4096,
.period_bytes_max = 4096,
- .periods_min = 4,
+ .periods_min = 6,
.periods_max = 64,
};
--
1.5.6.3
More information about the Alsa-devel
mailing list