diff options
| author | Glenn Kasten <gkasten@google.com> | 2012-07-19 10:02:15 -0700 |
|---|---|---|
| committer | Glenn Kasten <gkasten@google.com> | 2012-07-19 10:02:15 -0700 |
| commit | 5ad92f620fbbb6a8281f10169a23d38e3601e07a (patch) | |
| tree | c7b3d9ada1999b57f72e02e1e63ad062260d18f1 /services/audioflinger | |
| parent | bb4350d3b9e9485ae59e084de270f86aecef8066 (diff) | |
| download | frameworks_av-5ad92f620fbbb6a8281f10169a23d38e3601e07a.zip frameworks_av-5ad92f620fbbb6a8281f10169a23d38e3601e07a.tar.gz frameworks_av-5ad92f620fbbb6a8281f10169a23d38e3601e07a.tar.bz2 | |
Revert 94479fd5405642c67efd14cebe722feb9cbe6e77
Change-Id: I5ca78d5462badf541868785b2ba2e3f6d0cf492a
Diffstat (limited to 'services/audioflinger')
| -rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index e66abb1..b2aa388 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -1123,7 +1123,7 @@ AudioFlinger::ThreadBase::ThreadBase(const sp<AudioFlinger>& audioFlinger, audio mChannelCount(0), mFrameSize(1), mFormat(AUDIO_FORMAT_INVALID), mParamStatus(NO_ERROR), - mStandby(false), mDevice((audio_devices_t) device), mId(id), + mStandby(false), mDevice(device), mId(id), mDeathRecipient(new PMDeathRecipient(this)) { } @@ -3419,7 +3419,7 @@ bool AudioFlinger::MixerThread::checkForNewParameters_l() #ifdef ADD_BATTERY_DATA // when changing the audio output device, call addBatteryData to notify // the change - if ((int)mDevice != value) { + if (mDevice != value) { uint32_t params = 0; // check whether speaker is on if (value & AUDIO_DEVICE_OUT_SPEAKER) { @@ -3441,7 +3441,7 @@ bool AudioFlinger::MixerThread::checkForNewParameters_l() // forward device change to effects that have requested to be // aware of attached audio device. - mDevice = (audio_devices_t) value; + mDevice = value; for (size_t i = 0; i < mEffectChains.size(); i++) { mEffectChains[i]->setDevice_l(mDevice); } @@ -6468,12 +6468,12 @@ bool AudioFlinger::RecordThread::checkForNewParameters_l() // store input device and output device but do not forward output device to audio HAL. // Note that status is ignored by the caller for output device // (see AudioFlinger::setParameters() - uint32_t /*audio_devices_t*/ newDevice = mDevice; + audio_devices_t newDevice = mDevice; if (value & AUDIO_DEVICE_OUT_ALL) { - newDevice &= (uint32_t)~(value & AUDIO_DEVICE_OUT_ALL); + newDevice &= ~(value & AUDIO_DEVICE_OUT_ALL); status = BAD_VALUE; } else { - newDevice &= (uint32_t)~(value & AUDIO_DEVICE_IN_ALL); + newDevice &= ~(value & AUDIO_DEVICE_IN_ALL); // disable AEC and NS if the device is a BT SCO headset supporting those pre processings if (mTrack != NULL) { bool suspend = audio_is_bluetooth_sco_device( @@ -6483,7 +6483,7 @@ bool AudioFlinger::RecordThread::checkForNewParameters_l() } } newDevice |= value; - mDevice = (audio_devices_t) newDevice; // since mDevice is read by other threads, only write to it once + mDevice = newDevice; // since mDevice is read by other threads, only write to it once } if (status == NO_ERROR) { status = mInput->stream->common.set_parameters(&mInput->stream->common, keyValuePair.string()); |
