Skip to content

Commit c42eec0

Browse files
Hans-Christian Egtvedttiwai
Hans-Christian Egtvedt
authored andcommitted
ALSA: snd-atmel-ac97c: set correct size for buffer hardware parameter
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 128ed6a commit c42eec0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/atmel/ac97c.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ static struct snd_pcm_hardware atmel_ac97c_hw = {
151151
.rate_max = 48000,
152152
.channels_min = 1,
153153
.channels_max = 2,
154-
.buffer_bytes_max = 64 * 4096,
154+
.buffer_bytes_max = 2 * 2 * 64 * 2048,
155155
.period_bytes_min = 4096,
156156
.period_bytes_max = 4096,
157-
.periods_min = 4,
157+
.periods_min = 6,
158158
.periods_max = 64,
159159
};
160160

0 commit comments

Comments
 (0)