Revert "audio: Remove unused screen_state parameter"
authorAndreas Schneider <asn@cryptomilk.org>
Thu, 9 Feb 2017 09:45:21 +0000 (10:45 +0100)
committerChristopher N. Hesse <raymanfx@gmail.com>
Fri, 10 Feb 2017 20:33:14 +0000 (21:33 +0100)
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
audio/audio_hw.h

index 97acd48fc22c9d691010d31f2a9b19bc9bec5859..f92dc74e9e262d4e7fefe082d4d9dbf40990bad5 100644 (file)
@@ -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) {
index 96635ecbc4df04c7db7ac6db406735a12d157efe..8a507ed3006434b5e693da9532cbfd2ff0542638 100644 (file)
@@ -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;