fix output buffer check

We have to leave a 188 byte gap between writer
and consumer. So, we need at least 2*188 bytes to be able to write.
This commit is contained in:
Ralph Metzler 2018-01-21 11:54:09 +01:00
parent 4f622ec27c
commit 67e36cdef0
1 changed files with 2 additions and 2 deletions

View File

@ -622,12 +622,12 @@ static u32 ddb_output_free(struct ddb_output *output)
if (output->dma->cbuf != idx) {
if ((((output->dma->cbuf + 1) % output->dma->num) == idx) &&
(output->dma->size - output->dma->coff <= 188))
(output->dma->size - output->dma->coff <= 2*188))
return 0;
return 188;
}
diff = off - output->dma->coff;
if (diff <= 0 || diff > 188)
if (diff <= 0 || diff > 2*188)
return 188;
return 0;
}