asoc: Fix read offset for compress capture with timestamp
In a compress capture usecase, read offset guides to move buffer pointer based on buffer length. When timestamp is enabled read offset also needs to include timestamp header offset along with buffer length. This fix addresses the issue of null memory map handle due to incorrect read offset. Change-Id: I93c3ec588e77d535b6c7a4a0d832c1e7ea5f62a7 Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

부모
d88c1e68dc
커밋
82c2c2ca00
@@ -541,7 +541,7 @@ static int msm_compr_read_buffer(struct msm_compr_audio *prtd)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
prtd->bytes_read += buffer_length;
|
prtd->bytes_read += buffer_length;
|
||||||
prtd->bytes_read_offset += buffer_length;
|
prtd->bytes_read_offset += buffer_length + prtd->ts_header_offset;
|
||||||
if (prtd->bytes_read_offset >= prtd->buffer_size)
|
if (prtd->bytes_read_offset >= prtd->buffer_size)
|
||||||
prtd->bytes_read_offset -= prtd->buffer_size;
|
prtd->bytes_read_offset -= prtd->buffer_size;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user