Snap for 4765094 from 7780106b569a2daa71ea28b48e20ca4314b07501 to pi-release
Change-Id: I141c8a64606573c685a1808678c76a47d5ae8ce3
diff --git a/hal/audio_extn/cirrus_playback.c b/hal/audio_extn/cirrus_playback.c
index 7c5d4c2..1fd8984 100644
--- a/hal/audio_extn/cirrus_playback.c
+++ b/hal/audio_extn/cirrus_playback.c
@@ -284,10 +284,9 @@
cal_file = fopen(CRUS_CAL_FILE, "wb");
if (cal_file == NULL) {
- ALOGE("%s: Cannot create Cirrus SP calibration file (%s)",
+ ALOGE("%s: Cannot create Cirrus SP calibration file (%s), write cal value to dsp",
__func__, strerror(errno));
- ret = -EINVAL;
- goto exit;
+ goto write_dsp;
}
ret = fwrite(&result, sizeof(result), 1, cal_file);
@@ -306,6 +305,7 @@
__func__);
}
+write_dsp:
header.size = sizeof(header);
header.module_id = CRUS_MODULE_ID_TX;
header.param_id = 0;
diff --git a/hal/platform_info.c b/hal/platform_info.c
index ace57ea..41483f4 100644
--- a/hal/platform_info.c
+++ b/hal/platform_info.c
@@ -522,7 +522,7 @@
ALOGE("%s: frequencies not found", __func__);
goto done;
}
- char *token = strtok((char *)attr[curIdx++], ",");
+ char *token = strtok((char *)attr[curIdx++], " ");
uint32_t num_frequencies = 0;
while (token) {
microphone.frequency_responses[0][num_frequencies++] = atof(token);
@@ -530,14 +530,14 @@
ALOGE("%s: num %u of frequency is too large", __func__, num_frequencies);
goto done;
}
- token = strtok(NULL, ",");
+ token = strtok(NULL, " ");
}
if (strcmp(attr[curIdx++], "responses")) {
ALOGE("%s: responses not found", __func__);
goto done;
}
- token = strtok((char *)attr[curIdx++], ",");
+ token = strtok((char *)attr[curIdx++], " ");
uint32_t num_responses = 0;
while (token) {
microphone.frequency_responses[1][num_responses++] = atof(token);
@@ -545,7 +545,7 @@
ALOGE("%s: num %u of response is too large", __func__, num_responses);
goto done;
}
- token = strtok(NULL, ",");
+ token = strtok(NULL, " ");
}
if (num_frequencies != num_responses
@@ -591,7 +591,7 @@
ALOGE("%s: orientation not found", __func__);
goto done;
}
- char *token = strtok((char *)attr[curIdx++], ",");
+ char *token = strtok((char *)attr[curIdx++], " ");
float orientation[3];
uint32_t idx = 0;
while (token) {
@@ -600,7 +600,7 @@
ALOGE("%s: orientation invalid", __func__);
goto done;
}
- token = strtok(NULL, ",");
+ token = strtok(NULL, " ");
}
if (idx != 3) {
ALOGE("%s: orientation invalid", __func__);
@@ -620,7 +620,7 @@
ALOGE("%s: geometric_location not found", __func__);
goto done;
}
- char *token = strtok((char *)attr[curIdx++], ",");
+ char *token = strtok((char *)attr[curIdx++], " ");
float geometric_location[3];
uint32_t idx = 0;
while (token) {
@@ -629,7 +629,7 @@
ALOGE("%s: geometric_location invalid", __func__);
goto done;
}
- token = strtok(NULL, ",");
+ token = strtok(NULL, " ");
}
if (idx != 3) {
ALOGE("%s: geometric_location invalid", __func__);