Skip to content

Commit

Permalink
ALSA: snd-atmel-ac97c: set correct size for buffer hardware parameter
Browse files Browse the repository at this point in the history
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@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Hans-Christian Egtvedt authored and Takashi Iwai committed Apr 6, 2009
1 parent 128ed6a commit c42eec0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down

0 comments on commit c42eec0

Please sign in to comment.