audiopolicy: engine: Add Volume Groups to common Engine
This CL adds the concept of Volume Group to the engine.
It generalizes the volume management today controled by stream types
and hard coded into AOSP.
The goal is to control the volume per attributes, being able to define
a group of attributes that follow the same volume curves.
It intends to replace the concept of aliases in AudioService.
Bug: 124767636
Test: build
Change-Id: Icd079374cc1680d074b01836eca0bceb0b0c5247
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
diff --git a/media/libaudioclient/AudioAttributes.cpp b/media/libaudioclient/AudioAttributes.cpp
index 0f327cf..1ee6930 100644
--- a/media/libaudioclient/AudioAttributes.cpp
+++ b/media/libaudioclient/AudioAttributes.cpp
@@ -43,7 +43,7 @@
strcpy(mAttributes.tags, "");
}
mStreamType = static_cast<audio_stream_type_t>(parcel->readInt32());
- mGroupId = parcel->readUint32();
+ mGroupId = static_cast<volume_group_t>(parcel->readUint32());
return NO_ERROR;
}
@@ -60,7 +60,7 @@
parcel->writeUtf8AsUtf16(mAttributes.tags);
}
parcel->writeInt32(static_cast<int32_t>(mStreamType));
- parcel->writeUint32(mGroupId);
+ parcel->writeUint32(static_cast<uint32_t>(mGroupId));
return NO_ERROR;
}