APM: forward mute state in APM to AF
With ring_my_car we pass the mute state together with the actual index
to AudioFlinger
Flag: com.android.media.audio.ring_my_car
Test: dumpsys + logs
Bug: 319515324
Change-Id: I7b219f9c4917b58a84fd51c0431098a77896887a
diff --git a/services/audiopolicy/AudioPolicyInterface.h b/services/audiopolicy/AudioPolicyInterface.h
index edcb805..3539f00 100644
--- a/services/audiopolicy/AudioPolicyInterface.h
+++ b/services/audiopolicy/AudioPolicyInterface.h
@@ -148,7 +148,8 @@
output_type_t *outputType,
bool *isSpatialized,
bool *isBitPerfect,
- float *volume) = 0;
+ float *volume,
+ bool *muted) = 0;
// indicates to the audio policy manager that the output starts being used by corresponding
// stream.
virtual status_t startOutput(audio_port_handle_t portId) = 0;
@@ -197,6 +198,7 @@
// setting volume for all devices
virtual status_t setStreamVolumeIndex(audio_stream_type_t stream,
int index,
+ bool muted,
audio_devices_t device) = 0;
// retrieve current volume index for the specified stream and the
@@ -208,6 +210,7 @@
virtual status_t setVolumeIndexForAttributes(const audio_attributes_t &attr,
int index,
+ bool muted,
audio_devices_t device) = 0;
virtual status_t getVolumeIndexForAttributes(const audio_attributes_t &attr,
int &index,
@@ -514,7 +517,7 @@
// set a stream volume for a particular output. For the same user setting, a given stream type
// can have different volumes
// for each output (destination device) it is attached to.
- virtual status_t setStreamVolume(audio_stream_type_t stream, float volume,
+ virtual status_t setStreamVolume(audio_stream_type_t stream, float volume, bool muted,
audio_io_handle_t output, int delayMs = 0) = 0;
/**
* Set volume for given AudioTrack port ids for a particular output.
@@ -522,12 +525,13 @@
* can have different volumes for each output (destination device) it is attached to.
* @param ports to consider
* @param volume to apply
+ * @param muted to apply
* @param output to consider
* @param delayMs to use
* @return NO_ERROR if successful
*/
virtual status_t setPortsVolume(const std::vector<audio_port_handle_t>& ports, float volume,
- audio_io_handle_t output, int delayMs = 0) = 0;
+ bool muted, audio_io_handle_t output, int delayMs = 0) = 0;
// function enabling to send proprietary informations directly from audio policy manager to
// audio hardware interface.