From ecd17ce8ba4109c500a1083f4d74f94eb8ae9598 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 9 Feb 2017 10:45:21 +0100 Subject: 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 --- audio/audio_hw.c | 8 ++++++++ audio/audio_hw.h | 1 + 2 files changed, 9 insertions(+) (limited to 'audio') 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 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) 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 audio_device { struct stream_in* active_input; struct stream_out* primary_output; bool mic_mute; + bool screen_off; struct voice_data voice; -- cgit v1.2.3