add rewind-safeguard parameter

Rewinding the ring buffer completely causes audible issues with DMAs.
Previous solution didn't work with tsched=0, and used tsched_watermark
for guardband, which isn't linked to hardware and could become really high
if underflows occurred.

Added separate parameter that can be tuned to hardware limitations and size
of DMA bursts.
This commit is contained in:
Pierre-Louis Bossart 2010-04-29 10:48:11 -05:00 committed by Lennart Poettering
parent f081c152f3
commit 4df443bbe6
2 changed files with 17 additions and 5 deletions

View file

@ -54,7 +54,8 @@ PA_MODULE_USAGE(
"tsched_buffer_size=<buffer size when using timer based scheduling> "
"tsched_buffer_watermark=<lower fill watermark> "
"ignore_dB=<ignore dB information from the device?> "
"control=<name of mixer control>");
"control=<name of mixer control>"
"rewind_safeguard=<number of bytes that cannot be rewound");
static const char* const valid_modargs[] = {
"name",
@ -74,6 +75,7 @@ static const char* const valid_modargs[] = {
"tsched_buffer_watermark",
"ignore_dB",
"control",
"rewind_safeguard",
NULL
};