audio: deprecate audio_stream_frame_size()
Bug: 15000850.
Change-Id: I153f06dae54eacbed14e2be59c011928bebf5dcc
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 3042fc3..96dfd8e 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -868,7 +868,7 @@
static ssize_t read_frames(struct stream_in *in, void *buffer, ssize_t frames)
{
ssize_t frames_wr = 0;
- size_t frame_size = audio_stream_frame_size(&in->stream.common);
+ size_t frame_size = audio_stream_in_frame_size(&in->stream);
while (frames_wr < frames) {
size_t frames_rd = frames - frames_wr;
@@ -921,7 +921,7 @@
struct stream_out *out = (struct stream_out *)stream;
return out->config.period_size *
- audio_stream_frame_size((struct audio_stream *)stream);
+ audio_stream_out_frame_size((const struct audio_stream_out *)stream);
}
static audio_channel_mask_t out_get_channels(const struct audio_stream *stream)
@@ -1177,7 +1177,7 @@
pthread_mutex_unlock(&out->lock);
if (ret != 0) {
- usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) /
+ usleep(bytes * 1000000 / audio_stream_out_frame_size(stream) /
out_get_sample_rate(&stream->common));
}
@@ -1425,7 +1425,7 @@
int ret = 0;
struct stream_in *in = (struct stream_in *)stream;
struct audio_device *adev = in->dev;
- size_t frames_rq = bytes / audio_stream_frame_size(&stream->common);
+ size_t frames_rq = bytes / audio_stream_in_frame_size(stream);
/*
* acquiring hw device mutex systematically is useful if a low
@@ -1465,7 +1465,7 @@
exit:
if (ret < 0)
- usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) /
+ usleep(bytes * 1000000 / audio_stream_in_frame_size(stream) /
in_get_sample_rate(&stream->common));
pthread_mutex_unlock(&in->lock);
@@ -1750,7 +1750,7 @@
in->channel_mask = config->channel_mask;
in->buffer = malloc(pcm_config_in.period_size * pcm_config_in.channels
- * audio_stream_frame_size(&in->stream.common));
+ * audio_stream_in_frame_size(&in->stream));
if (!in->buffer) {
ret = -ENOMEM;