hal : send audio cal using v6 api with fe id
* Since kernel is fetching app type and topo info using fe id,
hal is expected to send fe id as usecase value aligned with kernel.
* V6 api is used and audio cal is sent along with fe id.
* For dynamic modification of fe id, audio_platform_info.xml
can be used.
Change-Id: I6869baf11864907f163b9016ad4c95e8ff305fc7
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
diff --git a/hal/platform_info.c b/hal/platform_info.c
index de7f187..d9aabbf 100644
--- a/hal/platform_info.c
+++ b/hal/platform_info.c
@@ -389,11 +389,18 @@
goto done;
}
- int id = atoi((char *)attr[5]);
+ int pcm_id = atoi((char *)attr[5]);
- if (platform_set_usecase_pcm_id(index, type, id) < 0) {
- ALOGE("%s: usecase %s type %d id %d was not set!",
- __func__, attr[1], type, id);
+ if (strcmp(attr[6], "fe") != 0) {
+ ALOGE("%s: fe id not mentioned", __func__);
+ goto done;
+ }
+
+ int fe_id = atoi((char *)attr[7]);
+
+ if (platform_set_usecase_pcm_id(index, type, pcm_id, fe_id) < 0) {
+ ALOGE("%s: usecase %s type %d pcm_id %d fe_id %d was not set!",
+ __func__, attr[1], type, pcm_id, fe_id);
goto done;
}