Merge "st-hal: check barge in support flag before update ec"
diff --git a/st_hw_session_lsm.c b/st_hw_session_lsm.c
index f1a915b..929f51b 100644
--- a/st_hw_session_lsm.c
+++ b/st_hw_session_lsm.c
@@ -2,7 +2,7 @@
*
* This file implements the hw session functionality specific to LSM HW
*
- * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2020, 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
@@ -2504,7 +2504,8 @@
goto error_exit;
}
- if (!p_ses->stdev->lpi_enable && !p_ses->stdev->barge_in_mode) {
+ if (!p_ses->stdev->lpi_enable && !p_ses->stdev->barge_in_mode &&
+ p_ses->stdev->support_barge_in_mode) {
status = platform_stdev_update_ec_effect(p_ses->stdev->platform,
false);
if (status) {
@@ -3936,7 +3937,8 @@
goto exit_1;
}
- if (!p_ses->stdev->lpi_enable && !p_ses->stdev->barge_in_mode) {
+ if (!p_ses->stdev->lpi_enable && !p_ses->stdev->barge_in_mode &&
+ p_ses->stdev->support_barge_in_mode) {
status = platform_stdev_update_ec_effect(p_ses->stdev->platform,
false);
if (status) {