hal: voice_extn: update error handling for incall music usecase
Update error handling for incall music usecase initialization to
return error when feature is not enabled.
Not returning error was setting output configs to 0 or other
unexpected values, resulting in busy loops and other system errors.
Change-Id: I971b8c49cda407aff5b7986bc285f72e6b56cd99
diff --git a/hal/voice_extn/voice_extn.c b/hal/voice_extn/voice_extn.c
index e6a4ed6..1d7a284 100644
--- a/hal/voice_extn/voice_extn.c
+++ b/hal/voice_extn/voice_extn.c
@@ -753,8 +753,9 @@
out->config.rate = out->sample_rate;
ALOGV("%s: mode=%d, usecase id=%d", __func__, adev->mode, out->usecase);
+ return 0;
}
- return 0;
+ return -ENOSYS;
}