Merge "configs: kona: Fix build error for a new SP"
diff --git a/hal/audio_extn/ffv.c b/hal/audio_extn/ffv.c
index 145a017..a57f68c 100755
--- a/hal/audio_extn/ffv.c
+++ b/hal/audio_extn/ffv.c
@@ -899,7 +899,6 @@
str_parms_del(parms, AUDIO_PARAMETER_FFV_EC_REF_DEVICE);
} else if (str_parms_get_int(parms, AUDIO_PARAMETER_DEVICE_CONNECT, &val) >= 0) {
ret = 1;
- str_parms_del(parms, AUDIO_PARAMETER_DEVICE_CONNECT);
}
if (ret == 1) {
if (val & AUDIO_DEVICE_OUT_SPEAKER) {
@@ -913,7 +912,6 @@
ret = str_parms_get_int(parms, AUDIO_PARAMETER_DEVICE_DISCONNECT, &val);
if (ret >= 0) {
- str_parms_del(parms, AUDIO_PARAMETER_DEVICE_DISCONNECT);
if (val & AUDIO_DEVICE_OUT_LINE) {
ALOGD("%s: capture ec ref from speaker", __func__);
ffvmod.ec_ref_dev = AUDIO_DEVICE_OUT_SPEAKER;
diff --git a/qahw_api/test/trans_loopback_test.c b/qahw_api/test/trans_loopback_test.c
index e7194f0..df117b2 100644
--- a/qahw_api/test/trans_loopback_test.c
+++ b/qahw_api/test/trans_loopback_test.c
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -135,6 +135,11 @@
transcode_loopback_config_t g_trnscode_loopback_config;
+static int poll_data_event_exit()
+{
+ close(sock_event_fd);
+}
+
void break_signal_handler(int signal __attribute__((unused)))
{
stop_loopback = true;
@@ -492,9 +497,8 @@
fds.fd = sock_event_fd;
fds.events = POLLIN;
fds.revents = 0;
- /* poll wait time modified from wait forever to 5 msec to
- avoid keeping the thread in hang state */
- i = poll(&fds, 1, 5);
+ /* poll wait time modified to wait forever */
+ i = poll(&fds, 1, -1);
if (i > 0 && (fds.revents & POLLIN)) {
count = recv(sock_event_fd, buffer, (64*1024), 0 );
@@ -674,8 +678,8 @@
(void *) process_loopback_data, NULL);
fprintf(log_file,"\nMain thread loop\n");
while(!stop_loopback) {
- usleep(100*1000);
- play_duration_elapsed_msec += 100;
+ usleep(5000*1000);
+ play_duration_elapsed_msec += 5000;
if(play_duration_in_msec <= play_duration_elapsed_msec)
{
stop_loopback = true;
@@ -686,6 +690,7 @@
fprintf(log_file,"\nMain thread loop exit\n");
exit_transcode_loopback_test:
+ poll_data_event_exit();
/* Wait for process thread to exit */
while (!exit_process_thread) {
usleep(10*1000);