diff options
| author | MarcKe <herderkewitz@googlemail.com> | 2015-02-27 08:56:11 +0100 | 
|---|---|---|
| committer | forkbomb <keepcalm444@gmail.com> | 2015-11-25 08:07:32 +1100 | 
| commit | 86804d71af3566765f6dce93333c7f21fa87d068 (patch) | |
| tree | fba754344b41749d63fb926e3ef07b16ebdcf659 | |
| parent | 35c6591185b6ec102af73916cf9939f6500c8cc5 (diff) | |
| download | device_samsung_i9300-86804d71af3566765f6dce93333c7f21fa87d068.zip device_samsung_i9300-86804d71af3566765f6dce93333c7f21fa87d068.tar.gz device_samsung_i9300-86804d71af3566765f6dce93333c7f21fa87d068.tar.bz2  | |
audio: remove deprecated audio_stream_frame_size
Change-Id: I8593343012faf5b528df03cc9ed098bf44b66888
| -rw-r--r-- | audio/audio_hw.c | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index e957458..e3cf20a 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -768,7 +768,7 @@ static int start_output_stream_low_latency(struct m0_stream_out *out)      if (success) {          out->buffer_frames = pcm_config_tones.period_size * 2;          if (out->buffer == NULL) -            out->buffer = malloc(out->buffer_frames * audio_stream_frame_size(&out->stream.common)); +            out->buffer = malloc(out->buffer_frames * audio_stream_out_frame_size(&out->stream.common));          if (adev->echo_reference != NULL)              out->echo_reference = adev->echo_reference; @@ -968,7 +968,7 @@ static size_t out_get_buffer_size_low_latency(const struct audio_stream *stream)      from pcm_config_tones.rate. */      size_t size = (SHORT_PERIOD_SIZE * DEFAULT_OUT_SAMPLING_RATE) / pcm_config_tones.rate;      size = ((size + 15) / 16) * 16; -    return size * audio_stream_frame_size((struct audio_stream *)stream); +    return size * audio_stream_out_frame_size((struct audio_stream *)stream);  }  static size_t out_get_buffer_size_deep_buffer(const struct audio_stream *stream) @@ -982,7 +982,7 @@ static size_t out_get_buffer_size_deep_buffer(const struct audio_stream *stream)      size_t size = (DEEP_BUFFER_SHORT_PERIOD_SIZE * DEFAULT_OUT_SAMPLING_RATE) /                          pcm_config_mm.rate;      size = ((size + 15) / 16) * 16; -    return size * audio_stream_frame_size((struct audio_stream *)stream); +    return size * audio_stream_out_frame_size((struct audio_stream *)stream);  }  static audio_channel_mask_t out_get_channels(const struct audio_stream *stream) @@ -1206,7 +1206,7 @@ static ssize_t out_write_low_latency(struct audio_stream_out *stream, const void      int ret;      struct m0_stream_out *out = (struct m0_stream_out *)stream;      struct m0_audio_device *adev = out->dev; -    size_t frame_size = audio_stream_frame_size(&out->stream.common); +    size_t frame_size = audio_stream_out_frame_size(&out->stream.common);      size_t in_frames = bytes / frame_size;      size_t out_frames = in_frames;      bool force_input_standby = false; @@ -1274,7 +1274,7 @@ exit:      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->common) /                 out_get_sample_rate(&stream->common));      } @@ -1298,7 +1298,7 @@ static ssize_t out_write_deep_buffer(struct audio_stream_out *stream, const void      int ret;      struct m0_stream_out *out = (struct m0_stream_out *)stream;      struct m0_audio_device *adev = out->dev; -    size_t frame_size = audio_stream_frame_size(&out->stream.common); +    size_t frame_size = audio_stream_out_frame_size(&out->stream.common);      size_t in_frames = bytes / frame_size;      size_t out_frames;      bool use_long_periods; @@ -1377,7 +1377,7 @@ exit:      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->common) /                 out_get_sample_rate(&stream->common));      } @@ -1989,7 +1989,7 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer,      int ret = 0;      struct m0_stream_in *in = (struct m0_stream_in *)stream;      struct m0_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->common);      /* acquiring hw device mutex systematically is useful if a low priority thread is waiting       * on the input stream mutex - e.g. executing select_mode() while holding the hw device @@ -2022,7 +2022,7 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer,  exit:      if (ret < 0) -        usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) / +        usleep(bytes * 1000000 / audio_stream_in_frame_size(&stream->common) /                 in_get_sample_rate(&stream->common));      pthread_mutex_unlock(&in->lock);  | 
