HAL: Align error code with HIDL wrapper am: 75d41bfb50
am: 204baa2d8f
Change-Id: I78e4b43849cf5148eedde8f517e681e0a554b689
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index ba2d909..081682d 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2378,7 +2378,7 @@
pthread_mutex_unlock(&out->lock);
return 0;
} else
- return -EINVAL;
+ return -ENODATA;
}
static int out_add_audio_effect(const struct audio_stream *stream __unused,
@@ -2396,14 +2396,14 @@
static int out_get_next_write_timestamp(const struct audio_stream_out *stream __unused,
int64_t *timestamp __unused)
{
- return -EINVAL;
+ return -ENOSYS;
}
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 = -EINVAL;
+ int ret = -ENODATA;
unsigned long dsp_frames;
lock_output_stream(out);
@@ -2828,7 +2828,7 @@
static int in_set_gain(struct audio_stream_in *stream __unused, float gain __unused)
{
- return 0;
+ return -ENOSYS;
}
static void in_snd_mon_cb(void * stream, struct str_parms * parms)