hal: typecasting variable to avoid multiplication overflow error
-> typecasting variable in order to avoid mul overflow leading
to SIGABORT
Change-Id: I58ccdd55908f4844d5228d1723f86bf569cbd4aa
diff --git a/hal/audio_extn/soundtrigger.c b/hal/audio_extn/soundtrigger.c
index d7bbb2f..d7c4b03 100644
--- a/hal/audio_extn/soundtrigger.c
+++ b/hal/audio_extn/soundtrigger.c
@@ -429,7 +429,7 @@
in->is_st_session_active = false;
memset(buffer, 0, bytes);
ALOGV("%s: read failed status %d - sleep", __func__, ret);
- usleep((bytes * 1000000) / (audio_stream_in_frame_size((struct audio_stream_in *)in) *
+ usleep(((useconds_t)bytes * 1000000) / (audio_stream_in_frame_size((struct audio_stream_in *)in) *
in->config.rate));
}
return ret;