Commit aaf2d266 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android Git Automerger
Browse files

am 569737c6: Merge "Add USB out_get_presentation_position() for timestamps" into mnc-dev

* commit '569737c6':
  Add USB out_get_presentation_position() for timestamps
parents a7897020 569737c6
......@@ -442,8 +442,16 @@ static int out_get_render_position(const struct audio_stream_out *stream, uint32
static int out_get_presentation_position(const struct audio_stream_out *stream,
uint64_t *frames, struct timespec *timestamp)
{
/* FIXME - This needs to be implemented */
return -EINVAL;
struct stream_out *out = (struct stream_out *)stream; // discard const qualifier
lock_output_stream(out);
const alsa_device_proxy *proxy = &out->proxy;
const int ret = proxy_get_presentation_position(proxy, frames, timestamp);
pthread_mutex_unlock(&out->lock);
ALOGV("out_get_presentation_position() status:%d frames:%llu",
ret, (unsigned long long)*frames);
return ret;
}
static int out_add_audio_effect(const struct audio_stream *stream, effect_handle_t effect)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment