Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40f2dbfd authored by pavanc's avatar pavanc Committed by Gerrit - the friendly Code Review server
Browse files

audio: Return ENODATA when position is failed to be retreived

out_get_presentation_position returns ENOPERM if it is called
when underlying pcm stream is not opened. This is resulting
in an error log on the client side.

ENODATA is more appropriate in this case as stream is yet
to be opened and is not an error scenario.

CRs-Fixed: 2111532
Change-Id: I29222ba9cc793ebb97f4f317f630627a3b272113
parent 9bcac9cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3799,7 +3799,7 @@ static int out_get_presentation_position(const struct audio_stream_out *stream,
                                   uint64_t *frames, struct timespec *timestamp)
{
    struct stream_out *out = (struct stream_out *)stream;
    int ret = -1;
    int ret = -ENODATA;
    unsigned long dsp_frames;

    /* below piece of code is not guarded against any lock because audioFliner serializes