Audio HAL: A speech volume outside of [0,1] is an error

Hals are supposed to received normalized volumes, between 0 and 1.
Previously volumes outside [0,1] were clamp to this range.
This clamping has the capability to hide bugs thus return an error if
such volume is received.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Iab70f9c651540ea2434d10939d28c1c842db19e0
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
index f2e7aac..27f7aa8 100644
--- a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
+++ b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
@@ -1038,16 +1038,12 @@
     for (float value :
          (float[]){-INFINITY, -1.0, 1.0 + std::numeric_limits<float>::epsilon(),
                    2.0, INFINITY, NAN}) {
-        SCOPED_TRACE("value=" + to_string(value));
-        // FIXME: NAN should never be accepted
-        // FIXME: Missing api doc. What should the impl do if the volume is
-        // outside [0,1] ?
-        ASSERT_RESULT(Result::INVALID_ARGUMENTS, setGain(value));
+        EXPECT_RESULT(Result::INVALID_ARGUMENTS, setGain(value)) << "value="
+                                                                 << value;
     }
     // Do not consider -0.0 as an invalid value as it is == with 0.0
     for (float value : {-0.0, 0.0, 0.01, 0.5, 0.09, 1.0 /* Restore volume*/}) {
-        SCOPED_TRACE("value=" + to_string(value));
-        ASSERT_OK(setGain(value));
+        EXPECT_OK(setGain(value)) << "value=" << value;
     }
 }