Revert "audio: Remove unused screen_state parameter"
We want that to avoid an error message in the log, so revert the
revomal.
This reverts commit cdad20da45269c9c5d7308f7d63de1350e04d94d.
Change-Id: Ic90cd6b02e5b3e8aae73d824153c3084643a8acc
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 97acd48..f92dc74 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -3874,6 +3874,14 @@
adev->voice.bluetooth_nrec = false;
}
+ ret = str_parms_get_str(parms, "screen_state", value, sizeof(value));
+ if (ret >= 0) {
+ if (strcmp(value, AUDIO_PARAMETER_VALUE_ON) == 0)
+ adev->screen_off = false;
+ else
+ adev->screen_off = true;
+ }
+
#if SWAP_SPEAKER_ON_SCREEN_ROTATION
ret = str_parms_get_int(parms, "rotation", &val);
if (ret >= 0) {
diff --git a/audio/audio_hw.h b/audio/audio_hw.h
index 96635ec..8a507ed 100644
--- a/audio/audio_hw.h
+++ b/audio/audio_hw.h
@@ -384,6 +384,7 @@
struct stream_in* active_input;
struct stream_out* primary_output;
bool mic_mute;
+ bool screen_off;
struct voice_data voice;