summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn Grossman <johngro@google.com>2011-08-22 13:25:06 -0700
committerMike Lockwood <lockwood@android.com>2011-10-27 17:35:43 -0400
commit617c80a82e5620b2f16348e4bd3d7fc3b76e9021 (patch)
treed1ff4dd3adceed4324466c54eef21a1b6ab5ac68 /include
parent497fb4566204c88bd247aafc2412ddef8f85e480 (diff)
downloadhardware_libhardware_legacy-617c80a82e5620b2f16348e4bd3d7fc3b76e9021.zip
hardware_libhardware_legacy-617c80a82e5620b2f16348e4bd3d7fc3b76e9021.tar.gz
hardware_libhardware_legacy-617c80a82e5620b2f16348e4bd3d7fc3b76e9021.tar.bz2
Add a bridge implementation of get_master_volume.
Add an implementation of the new get_master_volume method to bridge from the new C only audio HAL to the old C++ legacy audio HAL. Change-Id: I5c29814623b5141b0c69927ea60be9873c8a5dab
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 847fe6b..425b0a5 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.