ANDROID: GKI: ASoC: msm: fix integer overflow for long duration offload playback
32 bit variable is used for storing number of bytes copied to DSP, which can overflow when playback duration goes beyond 24 hours. Change data type for this variable to uint64_t to prevent overflow and related playback anomaly. Bug: 153747771 Test: compile CRs-Fixed: 877677 Change-Id: Ie4dfa630cf89559bb784d4712c52526665baeca6 Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Meng Wang <mwang@codeaurora.org> (cherry picked from commit 5396710759fcf2595e76e180940f7aa4302ac6dc) Signed-off-by: Will McVicker <willmcvicker@google.com> [willmcvicker: fixed merged conflict in compress_offload.c]
This commit is contained in:
parent
a21df153db
commit
dbad92f6e8
2 changed files with 2 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ struct snd_compr_params {
|
|||
*/
|
||||
struct snd_compr_tstamp {
|
||||
__u32 byte_offset;
|
||||
__u32 copied_total;
|
||||
__u64 copied_total;
|
||||
__u32 pcm_frames;
|
||||
__u32 pcm_io_frames;
|
||||
__u32 sampling_rate;
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ static int snd_compr_update_tstamp(struct snd_compr_stream *stream,
|
|||
if (!stream->ops->pointer)
|
||||
return -ENOTSUPP;
|
||||
stream->ops->pointer(stream, tstamp);
|
||||
pr_debug("dsp consumed till %d total %d bytes\n",
|
||||
pr_debug("dsp consumed till %d total %llu bytes\n",
|
||||
tstamp->byte_offset, tstamp->copied_total);
|
||||
if (stream->direction == SND_COMPRESS_PLAYBACK)
|
||||
stream->runtime->total_bytes_transferred = tstamp->copied_total;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue