summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hardware_legacy/AudioHardwareBase.h1
-rw-r--r--include/hardware_legacy/AudioHardwareInterface.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/hardware_legacy/AudioHardwareBase.h b/include/hardware_legacy/AudioHardwareBase.h
index 3dec357..eac40dc 100644
--- a/include/hardware_legacy/AudioHardwareBase.h
+++ b/include/hardware_legacy/AudioHardwareBase.h
@@ -46,6 +46,7 @@ public:
virtual String8 getParameters(const String8& keys);
virtual size_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount);
+ virtual status_t getMasterVolume(float *volume);
/**This method dumps the state of the audio hardware */
virtual status_t dumpState(int fd, const Vector<String16>& args);
diff --git a/include/hardware_legacy/AudioHardwareInterface.h b/include/hardware_legacy/AudioHardwareInterface.h
index c781218..31d6b99 100644
--- a/include/hardware_legacy/AudioHardwareInterface.h
+++ b/include/hardware_legacy/AudioHardwareInterface.h
@@ -210,6 +210,14 @@ public:
virtual status_t setMasterVolume(float volume) = 0;
/**
+ * Get the current master volume value for the HAL, if the HAL supports
+ * master volume control. AudioFlinger will query this value from the
+ * primary audio HAL when the service starts and use the value for setting
+ * the initial master volume across all HALs.
+ */
+ virtual status_t getMasterVolume(float *volume) = 0;
+
+ /**
* setMode is called when the audio mode changes. NORMAL mode is for
* standard audio playback, RINGTONE when a ringtone is playing, and IN_CALL
* when a call is in progress.