diff options
author | Eric Laurent <elaurent@google.com> | 2014-09-14 12:11:52 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-09-15 09:10:36 -0700 |
commit | 2f035f59d1e28728d38d18a7f0f7a9c6e8b0c11b (patch) | |
tree | 790ddf009cc4207fd4faa14bf8aa1dc3a59775cf /services | |
parent | f0b31e6333839972afb2e374f6d8824180d29fc2 (diff) | |
download | frameworks_av-2f035f59d1e28728d38d18a7f0f7a9c6e8b0c11b.zip frameworks_av-2f035f59d1e28728d38d18a7f0f7a9c6e8b0c11b.tar.gz frameworks_av-2f035f59d1e28728d38d18a7f0f7a9c6e8b0c11b.tar.bz2 |
audioflinger: send mic mute command to all audio HALs
Mic mute should be sent to all audio HALs, not
only the primary HAL as telephony can use
capture devices on other HALs (e.g USB)
Bug: 17321604.
Change-Id: I658f6084d5b5cdc5a70784661d5cea0b6f81c3a9
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 1843722..cee7feb 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -796,9 +796,14 @@ status_t AudioFlinger::setMicMute(bool state) } AutoMutex lock(mHardwareLock); - audio_hw_device_t *dev = mPrimaryHardwareDev->hwDevice(); mHardwareStatus = AUDIO_HW_SET_MIC_MUTE; - ret = dev->set_mic_mute(dev, state); + for (size_t i = 0; i < mAudioHwDevs.size(); i++) { + audio_hw_device_t *dev = mAudioHwDevs.valueAt(i)->hwDevice(); + status_t result = dev->set_mic_mute(dev, state); + if (result != NO_ERROR) { + ret = result; + } + } mHardwareStatus = AUDIO_HW_IDLE; return ret; } |