diff options
author | John Grossman <johngro@google.com> | 2012-07-17 11:54:04 -0700 |
---|---|---|
committer | John Grossman <johngro@google.com> | 2012-08-07 15:59:07 -0700 |
commit | 47bf3d7ea5f6c98e615e0a1f93497d241c79cc05 (patch) | |
tree | bfdee3940621969112f8aa6bbdc062e074a7179f /modules/audio | |
parent | f9d6cd7dee62789b220033c926c87deab8991bde (diff) | |
download | hardware_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 'modules/audio')
-rw-r--r-- | modules/audio/audio_hw.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c index 15e9920..e4fb711 100644 --- a/modules/audio/audio_hw.c +++ b/modules/audio/audio_hw.c @@ -287,8 +287,17 @@ static int adev_set_master_volume(struct audio_hw_device *dev, float volume) return -ENOSYS; } -static int adev_get_master_volume(struct audio_hw_device *dev, - float *volume) +static int adev_get_master_volume(struct audio_hw_device *dev, float *volume) +{ + return -ENOSYS; +} + +static int adev_set_master_mute(struct audio_hw_device *dev, bool muted) +{ + return -ENOSYS; +} + +static int adev_get_master_mute(struct audio_hw_device *dev, bool *muted) { return -ENOSYS; } @@ -416,6 +425,8 @@ static int adev_open(const hw_module_t* module, const char* name, adev->device.set_voice_volume = adev_set_voice_volume; adev->device.set_master_volume = adev_set_master_volume; adev->device.get_master_volume = adev_get_master_volume; + adev->device.set_master_mute = adev_set_master_mute; + adev->device.get_master_mute = adev_get_master_mute; adev->device.set_mode = adev_set_mode; adev->device.set_mic_mute = adev_set_mic_mute; adev->device.get_mic_mute = adev_get_mic_mute; |