summaryrefslogtreecommitdiffstats
path: root/include/hardware/audio.h
diff options
context:
space:
mode:
authorJohn Grossman <johngro@google.com>2012-07-17 11:54:04 -0700
committerJohn Grossman <johngro@google.com>2012-08-07 15:59:07 -0700
commit47bf3d7ea5f6c98e615e0a1f93497d241c79cc05 (patch)
treebfdee3940621969112f8aa6bbdc062e074a7179f /include/hardware/audio.h
parentf9d6cd7dee62789b220033c926c87deab8991bde (diff)
downloadhardware_libhardware-47bf3d7ea5f6c98e615e0a1f93497d241c79cc05.zip
hardware_libhardware-47bf3d7ea5f6c98e615e0a1f93497d241c79cc05.tar.gz
hardware_libhardware-47bf3d7ea5f6c98e615e0a1f93497d241c79cc05.tar.bz2
Extend the audio HAL interface to support get/set master mute
(cherry picked from commit d245968b7ef0be5c776c9aefff3eca9e293d1b35) > Extend the audio HAL interface to support get/set master mute > > Hand merge from ics-aah > > > Extend the audio HAL interface to support get/set master mute: DO NOT MERGE > > > > Extend the audio HAL interface to allow HALs to optionally support HW > > level master mute. This follows the same pattern as master volume and > > is part of the fix for bug 6828363. Because of the divergences > > between ICS and master, this change will need to be merged by hand. > > > > Signed-off-by: John Grossman <johngro@google.com> > > Change-Id: Ica6f5e37e13d13dde60463966f41f271ffa104fd > > Change-Id: I5e7aea6d7da0012dcc077281f9077fc04cfb9889 > Signed-off-by: John Grossman <johngro@google.com> Change-Id: I2011cc5bc41ca7081ce255a4bfba65f36f899bc4 Signed-off-by: John Grossman <johngro@google.com>
Diffstat (limited to 'include/hardware/audio.h')
-rw-r--r--include/hardware/audio.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index 0a917e2..26e9ea9 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -352,7 +352,7 @@ struct audio_hw_device {
* 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. HALs which do not support
- * this method should may leave it set to NULL.
+ * this method may leave it set to NULL.
*/
int (*get_master_volume)(struct audio_hw_device *dev, float *volume);
@@ -407,6 +407,21 @@ struct audio_hw_device {
/** This method dumps the state of the audio hardware */
int (*dump)(const struct audio_hw_device *dev, int fd);
+
+ /**
+ * set the audio mute status for all audio activities. If any value other
+ * than 0 is returned, the software mixer will emulate this capability.
+ */
+ int (*set_master_mute)(struct audio_hw_device *dev, bool mute);
+
+ /**
+ * Get the current master mute status for the HAL, if the HAL supports
+ * master mute control. AudioFlinger will query this value from the primary
+ * audio HAL when the service starts and use the value for setting the
+ * initial master mute across all HALs. HALs which do not support this
+ * method may leave it set to NULL.
+ */
+ int (*get_master_mute)(struct audio_hw_device *dev, bool *mute);
};
typedef struct audio_hw_device audio_hw_device_t;