OSDN Git Service

Audio HAL: A volume/gain outside of [0,1] is an error
authorKevin Rocard <krocard@google.com>
Tue, 9 May 2017 00:08:11 +0000 (17:08 -0700)
committerKevin Rocard <krocard@google.com>
Tue, 9 May 2017 01:28:12 +0000 (18:28 -0700)
commit4c030024dfa9cdf924cb771580e13d237f1ec813
treece41b12f27000c88e7441a7c7998e700eaf4ef71
parent96f46c4a23e8acce582bba8d6fc6b1d5a61af319
Audio HAL: A volume/gain 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: Ia4880bdff6111cbcdae6a4ebee921eddae141ee4
Signed-off-by: Kevin Rocard <krocard@google.com>
audio/2.0/default/Device.cpp
audio/2.0/default/StreamIn.cpp
audio/2.0/default/StreamOut.cpp
audio/2.0/default/Util.h [new file with mode: 0644]