audio policy: support platforms with no audio devices
Remove requirement to declare an AUDIO_DEVICE_OUT_SPEAKER device
for platforms without audio output.
By convention:
- platforms without audio output should declare a single output
device of type AUDIO_DEVICE_OUT_STUB also declared as default
output device
- platforms without audio input should declare a single input
device of type AUDIO_DEVICE_IN_STUB
Platforms with no audio at all can use stub audio policy configuration
file and audio HAL with the following instructions in device.mk file:
USE_XML_AUDIO_POLICY_CONF := 1
PRODUCT_PACKAGES += \
audio.stub.default
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/audio_policy_configuration_stub.xml:system/etc/audio_policy_configuration.xml
Bug: 25075342
Change-Id: Id700978559427edd3c7cc38d98f2fd52928367ed
diff --git a/services/audiopolicy/AudioPolicyInterface.h b/services/audiopolicy/AudioPolicyInterface.h
index b1347f4..a215b95 100644
--- a/services/audiopolicy/AudioPolicyInterface.h
+++ b/services/audiopolicy/AudioPolicyInterface.h
@@ -158,14 +158,14 @@
int indexMax) = 0;
// sets the new stream volume at a level corresponding to the supplied index for the
- // supplied device. By convention, specifying AUDIO_DEVICE_OUT_DEFAULT means
+ // supplied device. By convention, specifying AUDIO_DEVICE_OUT_DEFAULT_FOR_VOLUME means
// setting volume for all devices
virtual status_t setStreamVolumeIndex(audio_stream_type_t stream,
int index,
audio_devices_t device) = 0;
// retrieve current volume index for the specified stream and the
- // specified device. By convention, specifying AUDIO_DEVICE_OUT_DEFAULT means
+ // specified device. By convention, specifying AUDIO_DEVICE_OUT_DEFAULT_FOR_VOLUME means
// querying the volume of the active device.
virtual status_t getStreamVolumeIndex(audio_stream_type_t stream,
int *index,