hal: fix VTS failures in audio module
Return proper values from out_get_parameters and
out_get_next_write_timestamp to comply with what
VTS expects to resolve failures in those test cases.
CRs-Fixed: 2036563
Change-Id: I2b851bc009b3c38b49217e7eb9ea23cae636d437
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index df8a9c4..15ebddf 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3120,10 +3120,6 @@
} else {
voice_extn_out_get_parameters(out, query, reply);
str = str_parms_to_str(reply);
- if (str && !strncmp(str, "", sizeof(""))) {
- free(str);
- str = strdup(keys);
- }
}
@@ -3133,7 +3129,7 @@
if (out->flags & AUDIO_OUTPUT_FLAG_DIRECT &&
!(out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD)) {
ALOGV("in direct_pcm");
- strlcat(value, "true", sizeof(value ));
+ strlcat(value, "true", sizeof(value));
} else {
ALOGV("not in direct_pcm");
strlcat(value, "false", sizeof(value));
@@ -3602,7 +3598,7 @@
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,