diff --git a/webrtc/modules/audio_device/android/audio_device_template.h b/webrtc/modules/audio_device/android/audio_device_template.h
index 6b9cc0b..dc32fef 100644
--- a/webrtc/modules/audio_device/android/audio_device_template.h
+++ b/webrtc/modules/audio_device/android/audio_device_template.h
@@ -276,11 +276,6 @@
     return output_.MinSpeakerVolume(minVolume);
   }
 
-  int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
   int32_t MicrophoneVolumeIsAvailable(bool& available) override{
     available = false;
     return -1;
@@ -306,11 +301,6 @@
     return -1;
   }
 
-  int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
   int32_t SpeakerMuteIsAvailable(bool& available) override {
     FATAL() << "Should never be called";
     return -1;
@@ -341,21 +331,6 @@
     return -1;
   }
 
-  int32_t MicrophoneBoostIsAvailable(bool& available) override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
-  int32_t SetMicrophoneBoost(bool enable) override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
-  int32_t MicrophoneBoost(bool& enabled) const override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
   int32_t StereoPlayoutIsAvailable(bool& available) override {
     LOG(INFO) << __FUNCTION__;
     available = false;
@@ -394,18 +369,6 @@
     return 0;
   }
 
-  int32_t SetPlayoutBuffer(
-      const AudioDeviceModule::BufferType type, uint16_t sizeMS) override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
-  int32_t PlayoutBuffer(
-      AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
   int32_t PlayoutDelay(uint16_t& delay_ms) const override {
     // Best guess we can do is to use half of the estimated total delay.
     delay_ms = audio_manager_->GetDelayEstimateInMilliseconds() / 2;
@@ -421,11 +384,6 @@
     return 0;
   }
 
-  int32_t CPULoad(uint16_t& load) const override {
-    FATAL() << "Should never be called";
-    return -1;
-  }
-
   bool PlayoutWarning() const override {
     return false;
   }
diff --git a/webrtc/modules/audio_device/audio_device_buffer.cc b/webrtc/modules/audio_device/audio_device_buffer.cc
index 905c696..79a0ebc 100644
--- a/webrtc/modules/audio_device/audio_device_buffer.cc
+++ b/webrtc/modules/audio_device/audio_device_buffer.cc
@@ -280,28 +280,6 @@
   clock_drift_ = clock_drift;
 }
 
-int32_t AudioDeviceBuffer::StartInputFileRecording(
-    const char fileName[kAdmMaxFileNameSize]) {
-  LOG(LS_WARNING) << "Not implemented";
-  return 0;
-}
-
-int32_t AudioDeviceBuffer::StopInputFileRecording() {
-  LOG(LS_WARNING) << "Not implemented";
-  return 0;
-}
-
-int32_t AudioDeviceBuffer::StartOutputFileRecording(
-    const char fileName[kAdmMaxFileNameSize]) {
-  LOG(LS_WARNING) << "Not implemented";
-  return 0;
-}
-
-int32_t AudioDeviceBuffer::StopOutputFileRecording() {
-  LOG(LS_WARNING) << "Not implemented";
-  return 0;
-}
-
 int32_t AudioDeviceBuffer::SetRecordedBuffer(const void* audio_buffer,
                                              size_t samples_per_channel) {
   RTC_DCHECK_RUN_ON(&recording_thread_checker_);
diff --git a/webrtc/modules/audio_device/audio_device_buffer.h b/webrtc/modules/audio_device/audio_device_buffer.h
index 2a5a84b..a9163ea 100644
--- a/webrtc/modules/audio_device/audio_device_buffer.h
+++ b/webrtc/modules/audio_device/audio_device_buffer.h
@@ -108,14 +108,6 @@
   virtual int32_t RequestPlayoutData(size_t samples_per_channel);
   virtual int32_t GetPlayoutData(void* audio_buffer);
 
-  // TODO(henrika): these methods should not be used and does not contain any
-  // valid implementation. Investigate the possibility to either remove them
-  // or add a proper implementation if needed.
-  int32_t StartInputFileRecording(const char fileName[kAdmMaxFileNameSize]);
-  int32_t StopInputFileRecording();
-  int32_t StartOutputFileRecording(const char fileName[kAdmMaxFileNameSize]);
-  int32_t StopOutputFileRecording();
-
   int32_t SetTypingStatus(bool typing_status);
 
   // Called on iOS where the native audio layer can be interrupted by other
diff --git a/webrtc/modules/audio_device/audio_device_data_observer.cc b/webrtc/modules/audio_device/audio_device_data_observer.cc
index 60ea1cd..23c3b9d 100644
--- a/webrtc/modules/audio_device/audio_device_data_observer.cc
+++ b/webrtc/modules/audio_device/audio_device_data_observer.cc
@@ -202,9 +202,6 @@
   int32_t MinSpeakerVolume(uint32_t* min_volume) const override {
     return impl_->MinSpeakerVolume(min_volume);
   }
-  int32_t SpeakerVolumeStepSize(uint16_t* step_size) const override {
-    return impl_->SpeakerVolumeStepSize(step_size);
-  }
   int32_t MicrophoneVolumeIsAvailable(bool* available) override {
     return impl_->MicrophoneVolumeIsAvailable(available);
   }
@@ -220,9 +217,6 @@
   int32_t MinMicrophoneVolume(uint32_t* min_volume) const override {
     return impl_->MinMicrophoneVolume(min_volume);
   }
-  int32_t MicrophoneVolumeStepSize(uint16_t* step_size) const override {
-    return impl_->MicrophoneVolumeStepSize(step_size);
-  }
   int32_t SpeakerMuteIsAvailable(bool* available) override {
     return impl_->SpeakerMuteIsAvailable(available);
   }
@@ -241,15 +235,6 @@
   int32_t MicrophoneMute(bool* enabled) const override {
     return impl_->MicrophoneMute(enabled);
   }
-  int32_t MicrophoneBoostIsAvailable(bool* available) override {
-    return impl_->MicrophoneBoostIsAvailable(available);
-  }
-  int32_t SetMicrophoneBoost(bool enable) override {
-    return impl_->SetMicrophoneBoost(enable);
-  }
-  int32_t MicrophoneBoost(bool* enabled) const override {
-    return impl_->MicrophoneBoost(enabled);
-  }
   int32_t StereoPlayoutIsAvailable(bool* available) const override {
     return impl_->StereoPlayoutIsAvailable(available);
   }
@@ -274,35 +259,12 @@
   int32_t RecordingChannel(ChannelType* channel) const override {
     return impl_->RecordingChannel(channel);
   }
-  int32_t SetPlayoutBuffer(const BufferType type, uint16_t size_ms) override {
-    return impl_->SetPlayoutBuffer(type, size_ms);
-  }
-  int32_t PlayoutBuffer(BufferType* type, uint16_t* size_ms) const override {
-    return impl_->PlayoutBuffer(type, size_ms);
-  }
   int32_t PlayoutDelay(uint16_t* delay_ms) const override {
     return impl_->PlayoutDelay(delay_ms);
   }
   int32_t RecordingDelay(uint16_t* delay_ms) const override {
     return impl_->RecordingDelay(delay_ms);
   }
-  int32_t CPULoad(uint16_t* load) const override {
-    return impl_->CPULoad(load);
-  }
-  int32_t StartRawOutputFileRecording(
-      const char pcm_file_name_utf8[kAdmMaxFileNameSize]) override {
-    return impl_->StartRawOutputFileRecording(pcm_file_name_utf8);
-  }
-  int32_t StopRawOutputFileRecording() override {
-    return impl_->StopRawOutputFileRecording();
-  }
-  int32_t StartRawInputFileRecording(
-      const char pcm_file_name_utf8[kAdmMaxFileNameSize]) override {
-    return impl_->StartRawInputFileRecording(pcm_file_name_utf8);
-  }
-  int32_t StopRawInputFileRecording() override {
-    return impl_->StopRawInputFileRecording();
-  }
   int32_t SetRecordingSampleRate(const uint32_t samples_per_sec) override {
     return impl_->SetRecordingSampleRate(samples_per_sec);
   }
@@ -315,7 +277,6 @@
   int32_t PlayoutSampleRate(uint32_t* samples_per_sec) const override {
     return impl_->PlayoutSampleRate(samples_per_sec);
   }
-  int32_t ResetAudioDevice() override { return impl_->ResetAudioDevice(); }
   int32_t SetLoudspeakerStatus(bool enable) override {
     return impl_->SetLoudspeakerStatus(enable);
   }
diff --git a/webrtc/modules/audio_device/audio_device_generic.cc b/webrtc/modules/audio_device/audio_device_generic.cc
index e1c6e6f..f865d03 100644
--- a/webrtc/modules/audio_device/audio_device_generic.cc
+++ b/webrtc/modules/audio_device/audio_device_generic.cc
@@ -34,19 +34,6 @@
   return -1;
 }
 
-int32_t AudioDeviceGeneric::ResetAudioDevice() {
-  LOG_F(LS_ERROR) << "Not supported on this platform";
-  return -1;
-}
-
-int32_t AudioDeviceGeneric::SoundDeviceControl(unsigned int par1,
-                                               unsigned int par2,
-                                               unsigned int par3,
-                                               unsigned int par4) {
-  LOG_F(LS_ERROR) << "Not supported on this platform";
-  return -1;
-}
-
 bool AudioDeviceGeneric::BuiltInAECIsAvailable() const {
   LOG_F(LS_ERROR) << "Not supported on this platform";
   return false;
diff --git a/webrtc/modules/audio_device/audio_device_generic.h b/webrtc/modules/audio_device/audio_device_generic.h
index ca31327..cdcb934 100644
--- a/webrtc/modules/audio_device/audio_device_generic.h
+++ b/webrtc/modules/audio_device/audio_device_generic.h
@@ -87,7 +87,6 @@
   virtual int32_t SpeakerVolume(uint32_t& volume) const = 0;
   virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const = 0;
   virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const = 0;
-  virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const = 0;
 
   // Microphone volume controls
   virtual int32_t MicrophoneVolumeIsAvailable(bool& available) = 0;
@@ -95,7 +94,6 @@
   virtual int32_t MicrophoneVolume(uint32_t& volume) const = 0;
   virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const = 0;
   virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const = 0;
-  virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const = 0;
 
   // Speaker mute control
   virtual int32_t SpeakerMuteIsAvailable(bool& available) = 0;
@@ -107,11 +105,6 @@
   virtual int32_t SetMicrophoneMute(bool enable) = 0;
   virtual int32_t MicrophoneMute(bool& enabled) const = 0;
 
-  // Microphone boost control
-  virtual int32_t MicrophoneBoostIsAvailable(bool& available) = 0;
-  virtual int32_t SetMicrophoneBoost(bool enable) = 0;
-  virtual int32_t MicrophoneBoost(bool& enabled) const = 0;
-
   // Stereo support
   virtual int32_t StereoPlayoutIsAvailable(bool& available) = 0;
   virtual int32_t SetStereoPlayout(bool enable) = 0;
@@ -121,16 +114,9 @@
   virtual int32_t StereoRecording(bool& enabled) const = 0;
 
   // Delay information and control
-  virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
-                                   uint16_t sizeMS = 0) = 0;
-  virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                                uint16_t& sizeMS) const = 0;
   virtual int32_t PlayoutDelay(uint16_t& delayMS) const = 0;
   virtual int32_t RecordingDelay(uint16_t& delayMS) const = 0;
 
-  // CPU load
-  virtual int32_t CPULoad(uint16_t& load) const = 0;
-
   // Native sample rate controls (samples/sec)
   virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec);
   virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec);
@@ -139,15 +125,6 @@
   virtual int32_t SetLoudspeakerStatus(bool enable);
   virtual int32_t GetLoudspeakerStatus(bool& enable) const;
 
-  // Reset Audio Device (for mobile devices)
-  virtual int32_t ResetAudioDevice();
-
-  // Sound Audio Device control (for WinCE only)
-  virtual int32_t SoundDeviceControl(unsigned int par1 = 0,
-                                     unsigned int par2 = 0,
-                                     unsigned int par3 = 0,
-                                     unsigned int par4 = 0);
-
   // Android only
   virtual bool BuiltInAECIsAvailable() const;
   virtual bool BuiltInAGCIsAvailable() const;
diff --git a/webrtc/modules/audio_device/audio_device_impl.cc b/webrtc/modules/audio_device/audio_device_impl.cc
index bae4f6a..e8a3a72 100644
--- a/webrtc/modules/audio_device/audio_device_impl.cc
+++ b/webrtc/modules/audio_device/audio_device_impl.cc
@@ -636,26 +636,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  SpeakerVolumeStepSize
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::SpeakerVolumeStepSize(uint16_t* stepSize) const {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  uint16_t delta(0);
-
-  if (_ptrAudioDevice->SpeakerVolumeStepSize(delta) == -1) {
-    LOG(LERROR) << "failed to retrieve the speaker-volume step size";
-    return -1;
-  }
-
-  *stepSize = delta;
-  LOG(INFO) << "output: " << *stepSize;
-  return (0);
-}
-
-// ----------------------------------------------------------------------------
 //  SpeakerMuteIsAvailable
 // ----------------------------------------------------------------------------
 
@@ -752,54 +732,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  MicrophoneBoostIsAvailable
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::MicrophoneBoostIsAvailable(bool* available) {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  bool isAvailable(0);
-
-  if (_ptrAudioDevice->MicrophoneBoostIsAvailable(isAvailable) == -1) {
-    return -1;
-  }
-
-  *available = isAvailable;
-  LOG(INFO) << "output: " << isAvailable;
-  return (0);
-}
-
-// ----------------------------------------------------------------------------
-//  SetMicrophoneBoost
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::SetMicrophoneBoost(bool enable) {
-  LOG(INFO) << __FUNCTION__ << "(" << enable << ")";
-  CHECK_INITIALIZED();
-  return (_ptrAudioDevice->SetMicrophoneBoost(enable));
-}
-
-// ----------------------------------------------------------------------------
-//  MicrophoneBoost
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::MicrophoneBoost(bool* enabled) const {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  bool onOff(false);
-
-  if (_ptrAudioDevice->MicrophoneBoost(onOff) == -1) {
-    return -1;
-  }
-
-  *enabled = onOff;
-  LOG(INFO) << "output: " << onOff;
-  return (0);
-}
-
-// ----------------------------------------------------------------------------
 //  MicrophoneVolumeIsAvailable
 // ----------------------------------------------------------------------------
 
@@ -1121,26 +1053,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  MicrophoneVolumeStepSize
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::MicrophoneVolumeStepSize(
-    uint16_t* stepSize) const {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  uint16_t delta(0);
-
-  if (_ptrAudioDevice->MicrophoneVolumeStepSize(delta) == -1) {
-    return -1;
-  }
-
-  *stepSize = delta;
-  LOG(INFO) << "output: " << *stepSize;
-  return (0);
-}
-
-// ----------------------------------------------------------------------------
 //  PlayoutDevices
 // ----------------------------------------------------------------------------
 
@@ -1433,123 +1345,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  StartRawInputFileRecording
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::StartRawInputFileRecording(
-    const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  if (NULL == pcmFileNameUTF8) {
-    return -1;
-  }
-
-  return (_audioDeviceBuffer.StartInputFileRecording(pcmFileNameUTF8));
-}
-
-// ----------------------------------------------------------------------------
-//  StopRawInputFileRecording
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::StopRawInputFileRecording() {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  return (_audioDeviceBuffer.StopInputFileRecording());
-}
-
-// ----------------------------------------------------------------------------
-//  StartRawOutputFileRecording
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::StartRawOutputFileRecording(
-    const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  if (NULL == pcmFileNameUTF8) {
-    return -1;
-  }
-
-  return (_audioDeviceBuffer.StartOutputFileRecording(pcmFileNameUTF8));
-}
-
-// ----------------------------------------------------------------------------
-//  StopRawOutputFileRecording
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::StopRawOutputFileRecording() {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  return (_audioDeviceBuffer.StopOutputFileRecording());
-}
-
-// ----------------------------------------------------------------------------
-//  SetPlayoutBuffer
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::SetPlayoutBuffer(const BufferType type,
-                                                uint16_t sizeMS) {
-  if (type == kFixedBufferSize) {
-    LOG(INFO) << __FUNCTION__ << "(fixed buffer, " << sizeMS << "ms)";
-  } else if (type == kAdaptiveBufferSize) {
-    LOG(INFO) << __FUNCTION__ << "(adaptive buffer, " << sizeMS << "ms)";
-  } else {
-    LOG(INFO) << __FUNCTION__ << "(?, " << sizeMS << "ms)";
-  }
-  CHECK_INITIALIZED();
-
-  if (_ptrAudioDevice->PlayoutIsInitialized()) {
-    LOG(LERROR) << "unable to modify the playout buffer while playing side is "
-                   "initialized";
-    return -1;
-  }
-
-  int32_t ret(0);
-
-  if (kFixedBufferSize == type) {
-    if (sizeMS < kAdmMinPlayoutBufferSizeMs ||
-        sizeMS > kAdmMaxPlayoutBufferSizeMs) {
-      LOG(LERROR) << "size parameter is out of range";
-      return -1;
-    }
-  }
-
-  if ((ret = _ptrAudioDevice->SetPlayoutBuffer(type, sizeMS)) == -1) {
-    LOG(LERROR) << "failed to set the playout buffer (error: " << LastError()
-                << ")";
-  }
-
-  return ret;
-}
-
-// ----------------------------------------------------------------------------
-//  PlayoutBuffer
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::PlayoutBuffer(BufferType* type,
-                                             uint16_t* sizeMS) const {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  BufferType bufType;
-  uint16_t size(0);
-
-  if (_ptrAudioDevice->PlayoutBuffer(bufType, size) == -1) {
-    LOG(LERROR) << "failed to retrieve the buffer type and size";
-    return -1;
-  }
-
-  *type = bufType;
-  *sizeMS = size;
-
-  LOG(INFO) << "output: type = " << *type << ", sizeMS = " << *sizeMS;
-  return (0);
-}
-
-// ----------------------------------------------------------------------------
 //  PlayoutDelay
 // ----------------------------------------------------------------------------
 
@@ -1588,26 +1383,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  CPULoad
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::CPULoad(uint16_t* load) const {
-  LOG(INFO) << __FUNCTION__;
-  CHECK_INITIALIZED();
-
-  uint16_t cpuLoad(0);
-
-  if (_ptrAudioDevice->CPULoad(cpuLoad) == -1) {
-    LOG(LERROR) << "failed to retrieve the CPU load";
-    return -1;
-  }
-
-  *load = cpuLoad;
-  LOG(INFO) << "output: " << *load;
-  return (0);
-}
-
-// ----------------------------------------------------------------------------
 //  SetRecordingSampleRate
 // ----------------------------------------------------------------------------
 
@@ -1682,16 +1457,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  ResetAudioDevice
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceModuleImpl::ResetAudioDevice() {
-  LOG(INFO) << __FUNCTION__;
-  FATAL() << "Should never be called";
-  return -1;
-}
-
-// ----------------------------------------------------------------------------
 //  SetLoudspeakerStatus
 // ----------------------------------------------------------------------------
 
diff --git a/webrtc/modules/audio_device/audio_device_impl.h b/webrtc/modules/audio_device/audio_device_impl.h
index 9fdc93b..69e32d4 100644
--- a/webrtc/modules/audio_device/audio_device_impl.h
+++ b/webrtc/modules/audio_device/audio_device_impl.h
@@ -110,7 +110,6 @@
   int32_t SpeakerVolume(uint32_t* volume) const override;
   int32_t MaxSpeakerVolume(uint32_t* maxVolume) const override;
   int32_t MinSpeakerVolume(uint32_t* minVolume) const override;
-  int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const override;
 
   // Microphone volume controls
   int32_t MicrophoneVolumeIsAvailable(bool* available) override;
@@ -118,7 +117,6 @@
   int32_t MicrophoneVolume(uint32_t* volume) const override;
   int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override;
   int32_t MinMicrophoneVolume(uint32_t* minVolume) const override;
-  int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const override;
 
   // Speaker mute control
   int32_t SpeakerMuteIsAvailable(bool* available) override;
@@ -130,11 +128,6 @@
   int32_t SetMicrophoneMute(bool enable) override;
   int32_t MicrophoneMute(bool* enabled) const override;
 
-  // Microphone boost control
-  int32_t MicrophoneBoostIsAvailable(bool* available) override;
-  int32_t SetMicrophoneBoost(bool enable) override;
-  int32_t MicrophoneBoost(bool* enabled) const override;
-
   // Stereo support
   int32_t StereoPlayoutIsAvailable(bool* available) const override;
   int32_t SetStereoPlayout(bool enable) override;
@@ -146,22 +139,9 @@
   int32_t RecordingChannel(ChannelType* channel) const override;
 
   // Delay information and control
-  int32_t SetPlayoutBuffer(const BufferType type, uint16_t sizeMS = 0) override;
-  int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const override;
   int32_t PlayoutDelay(uint16_t* delayMS) const override;
   int32_t RecordingDelay(uint16_t* delayMS) const override;
 
-  // CPU load
-  int32_t CPULoad(uint16_t* load) const override;
-
-  // Recording of raw PCM data
-  int32_t StartRawOutputFileRecording(
-      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) override;
-  int32_t StopRawOutputFileRecording() override;
-  int32_t StartRawInputFileRecording(
-      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) override;
-  int32_t StopRawInputFileRecording() override;
-
   // Native sample rate controls (samples/sec)
   int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) override;
   int32_t RecordingSampleRate(uint32_t* samplesPerSec) const override;
@@ -169,7 +149,6 @@
   int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const override;
 
   // Mobile device specific functions
-  int32_t ResetAudioDevice() override;
   int32_t SetLoudspeakerStatus(bool enable) override;
   int32_t GetLoudspeakerStatus(bool* enabled) const override;
 
diff --git a/webrtc/modules/audio_device/dummy/audio_device_dummy.cc b/webrtc/modules/audio_device/dummy/audio_device_dummy.cc
index d954a27..91033b7 100644
--- a/webrtc/modules/audio_device/dummy/audio_device_dummy.cc
+++ b/webrtc/modules/audio_device/dummy/audio_device_dummy.cc
@@ -107,10 +107,6 @@
   return -1;
 }
 
-int32_t AudioDeviceDummy::SpeakerVolumeStepSize(uint16_t& stepSize) const {
-  return -1;
-}
-
 int32_t AudioDeviceDummy::MicrophoneVolumeIsAvailable(bool& available) {
   return -1;
 }
@@ -129,10 +125,6 @@
   return -1;
 }
 
-int32_t AudioDeviceDummy::MicrophoneVolumeStepSize(uint16_t& stepSize) const {
-  return -1;
-}
-
 int32_t AudioDeviceDummy::SpeakerMuteIsAvailable(bool& available) { return -1; }
 
 int32_t AudioDeviceDummy::SetSpeakerMute(bool enable) { return -1; }
@@ -147,14 +139,6 @@
 
 int32_t AudioDeviceDummy::MicrophoneMute(bool& enabled) const { return -1; }
 
-int32_t AudioDeviceDummy::MicrophoneBoostIsAvailable(bool& available) {
-  return -1;
-}
-
-int32_t AudioDeviceDummy::SetMicrophoneBoost(bool enable) { return -1; }
-
-int32_t AudioDeviceDummy::MicrophoneBoost(bool& enabled) const { return -1; }
-
 int32_t AudioDeviceDummy::StereoPlayoutIsAvailable(bool& available) {
   return -1;
 }
@@ -170,23 +154,10 @@
 
 int32_t AudioDeviceDummy::StereoRecording(bool& enabled) const { return -1; }
 
-int32_t AudioDeviceDummy::SetPlayoutBuffer(
-    const AudioDeviceModule::BufferType type,
-    uint16_t sizeMS) {
-  return -1;
-}
-
-int32_t AudioDeviceDummy::PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                                        uint16_t& sizeMS) const {
-  return -1;
-}
-
 int32_t AudioDeviceDummy::PlayoutDelay(uint16_t& delayMS) const { return -1; }
 
 int32_t AudioDeviceDummy::RecordingDelay(uint16_t& delayMS) const { return -1; }
 
-int32_t AudioDeviceDummy::CPULoad(uint16_t& load) const { return -1; }
-
 bool AudioDeviceDummy::PlayoutWarning() const { return false; }
 
 bool AudioDeviceDummy::PlayoutError() const { return false; }
diff --git a/webrtc/modules/audio_device/dummy/audio_device_dummy.h b/webrtc/modules/audio_device/dummy/audio_device_dummy.h
index fd9a915..bbadbdd 100644
--- a/webrtc/modules/audio_device/dummy/audio_device_dummy.h
+++ b/webrtc/modules/audio_device/dummy/audio_device_dummy.h
@@ -81,7 +81,6 @@
   int32_t SpeakerVolume(uint32_t& volume) const override;
   int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
   int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
-  int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
 
   // Microphone volume controls
   int32_t MicrophoneVolumeIsAvailable(bool& available) override;
@@ -89,7 +88,6 @@
   int32_t MicrophoneVolume(uint32_t& volume) const override;
   int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
   int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
-  int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
 
   // Speaker mute control
   int32_t SpeakerMuteIsAvailable(bool& available) override;
@@ -101,11 +99,6 @@
   int32_t SetMicrophoneMute(bool enable) override;
   int32_t MicrophoneMute(bool& enabled) const override;
 
-  // Microphone boost control
-  int32_t MicrophoneBoostIsAvailable(bool& available) override;
-  int32_t SetMicrophoneBoost(bool enable) override;
-  int32_t MicrophoneBoost(bool& enabled) const override;
-
   // Stereo support
   int32_t StereoPlayoutIsAvailable(bool& available) override;
   int32_t SetStereoPlayout(bool enable) override;
@@ -115,16 +108,9 @@
   int32_t StereoRecording(bool& enabled) const override;
 
   // Delay information and control
-  int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
-                           uint16_t sizeMS) override;
-  int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                        uint16_t& sizeMS) const override;
   int32_t PlayoutDelay(uint16_t& delayMS) const override;
   int32_t RecordingDelay(uint16_t& delayMS) const override;
 
-  // CPU load
-  int32_t CPULoad(uint16_t& load) const override;
-
   bool PlayoutWarning() const override;
   bool PlayoutError() const override;
   bool RecordingWarning() const override;
diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.cc b/webrtc/modules/audio_device/dummy/file_audio_device.cc
index 0d9885d..4d8e11a 100644
--- a/webrtc/modules/audio_device/dummy/file_audio_device.cc
+++ b/webrtc/modules/audio_device/dummy/file_audio_device.cc
@@ -333,10 +333,6 @@
   return -1;
 }
 
-int32_t FileAudioDevice::SpeakerVolumeStepSize(uint16_t& stepSize) const {
-  return -1;
-}
-
 int32_t FileAudioDevice::MicrophoneVolumeIsAvailable(bool& available) {
   return -1;
 }
@@ -355,10 +351,6 @@
   return -1;
 }
 
-int32_t FileAudioDevice::MicrophoneVolumeStepSize(uint16_t& stepSize) const {
-  return -1;
-}
-
 int32_t FileAudioDevice::SpeakerMuteIsAvailable(bool& available) { return -1; }
 
 int32_t FileAudioDevice::SetSpeakerMute(bool enable) { return -1; }
@@ -373,14 +365,6 @@
 
 int32_t FileAudioDevice::MicrophoneMute(bool& enabled) const { return -1; }
 
-int32_t FileAudioDevice::MicrophoneBoostIsAvailable(bool& available) {
-  return -1;
-}
-
-int32_t FileAudioDevice::SetMicrophoneBoost(bool enable) { return -1; }
-
-int32_t FileAudioDevice::MicrophoneBoost(bool& enabled) const { return -1; }
-
 int32_t FileAudioDevice::StereoPlayoutIsAvailable(bool& available) {
   available = true;
   return 0;
@@ -408,26 +392,12 @@
   return 0;
 }
 
-int32_t FileAudioDevice::SetPlayoutBuffer(
-    const AudioDeviceModule::BufferType type,
-    uint16_t sizeMS) {
-  return 0;
-}
-
-int32_t FileAudioDevice::PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                                        uint16_t& sizeMS) const {
-  type = _playBufType;
-  return 0;
-}
-
 int32_t FileAudioDevice::PlayoutDelay(uint16_t& delayMS) const {
   return 0;
 }
 
 int32_t FileAudioDevice::RecordingDelay(uint16_t& delayMS) const { return -1; }
 
-int32_t FileAudioDevice::CPULoad(uint16_t& load) const { return -1; }
-
 bool FileAudioDevice::PlayoutWarning() const { return false; }
 
 bool FileAudioDevice::PlayoutError() const { return false; }
diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.h b/webrtc/modules/audio_device/dummy/file_audio_device.h
index 63e7e79..615c137 100644
--- a/webrtc/modules/audio_device/dummy/file_audio_device.h
+++ b/webrtc/modules/audio_device/dummy/file_audio_device.h
@@ -102,7 +102,6 @@
   int32_t SpeakerVolume(uint32_t& volume) const override;
   int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
   int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
-  int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
 
   // Microphone volume controls
   int32_t MicrophoneVolumeIsAvailable(bool& available) override;
@@ -110,7 +109,6 @@
   int32_t MicrophoneVolume(uint32_t& volume) const override;
   int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
   int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
-  int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
 
   // Speaker mute control
   int32_t SpeakerMuteIsAvailable(bool& available) override;
@@ -122,11 +120,6 @@
   int32_t SetMicrophoneMute(bool enable) override;
   int32_t MicrophoneMute(bool& enabled) const override;
 
-  // Microphone boost control
-  int32_t MicrophoneBoostIsAvailable(bool& available) override;
-  int32_t SetMicrophoneBoost(bool enable) override;
-  int32_t MicrophoneBoost(bool& enabled) const override;
-
   // Stereo support
   int32_t StereoPlayoutIsAvailable(bool& available) override;
   int32_t SetStereoPlayout(bool enable) override;
@@ -136,16 +129,9 @@
   int32_t StereoRecording(bool& enabled) const override;
 
   // Delay information and control
-  int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
-                           uint16_t sizeMS) override;
-  int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                        uint16_t& sizeMS) const override;
   int32_t PlayoutDelay(uint16_t& delayMS) const override;
   int32_t RecordingDelay(uint16_t& delayMS) const override;
 
-  // CPU load
-  int32_t CPULoad(uint16_t& load) const override;
-
   bool PlayoutWarning() const override;
   bool PlayoutError() const override;
   bool RecordingWarning() const override;
@@ -165,7 +151,6 @@
 
   int32_t _playout_index;
   int32_t _record_index;
-  AudioDeviceModule::BufferType _playBufType;
   AudioDeviceBuffer* _ptrAudioBuffer;
   int8_t* _recordingBuffer;  // In bytes.
   int8_t* _playoutBuffer;  // In bytes.
diff --git a/webrtc/modules/audio_device/include/audio_device.h b/webrtc/modules/audio_device/include/audio_device.h
index a1276d9..1eedf1e 100644
--- a/webrtc/modules/audio_device/include/audio_device.h
+++ b/webrtc/modules/audio_device/include/audio_device.h
@@ -40,6 +40,8 @@
     kDefaultDevice = -2
   };
 
+  // Deprecated.
+  // TODO(henrika): to be removed.
   enum BufferType {
     kFixedBufferSize  = 0,
     kAdaptiveBufferSize = 1
@@ -127,7 +129,9 @@
   virtual int32_t SpeakerVolume(uint32_t* volume) const = 0;
   virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const = 0;
   virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const = 0;
-  virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const = 0;
+  // Deprecated.
+  // TODO(henrika): to be removed.
+  virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const { return -1; }
 
   // Microphone volume controls
   virtual int32_t MicrophoneVolumeIsAvailable(bool* available) = 0;
@@ -135,7 +139,11 @@
   virtual int32_t MicrophoneVolume(uint32_t* volume) const = 0;
   virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const = 0;
   virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const = 0;
-  virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const = 0;
+  // Deprecated.
+  // TODO(henrika): to be removed.
+  virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const {
+    return -1;
+  }
 
   // Speaker mute control
   virtual int32_t SpeakerMuteIsAvailable(bool* available) = 0;
@@ -147,10 +155,11 @@
   virtual int32_t SetMicrophoneMute(bool enable) = 0;
   virtual int32_t MicrophoneMute(bool* enabled) const = 0;
 
-  // Microphone boost control
-  virtual int32_t MicrophoneBoostIsAvailable(bool* available) = 0;
-  virtual int32_t SetMicrophoneBoost(bool enable) = 0;
-  virtual int32_t MicrophoneBoost(bool* enabled) const = 0;
+  // Deprecated.
+  // TODO(henrika): to be removed.
+  virtual int32_t MicrophoneBoostIsAvailable(bool* available) { return -1; }
+  virtual int32_t SetMicrophoneBoost(bool enable) { return -1; }
+  virtual int32_t MicrophoneBoost(bool* enabled) const { return -1; }
 
   // Stereo support
   virtual int32_t StereoPlayoutIsAvailable(bool* available) const = 0;
@@ -162,23 +171,29 @@
   virtual int32_t SetRecordingChannel(const ChannelType channel) = 0;
   virtual int32_t RecordingChannel(ChannelType* channel) const = 0;
 
-  // Delay information and control
+  // Deprecated.
+  // TODO(henrika): to be removed.
   virtual int32_t SetPlayoutBuffer(const BufferType type,
-                                   uint16_t sizeMS = 0) = 0;
-  virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const = 0;
+                                   uint16_t sizeMS = 0) { return -1; }
+  virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
+    return -1;
+  }
+  // Delay information and control
   virtual int32_t PlayoutDelay(uint16_t* delayMS) const = 0;
   virtual int32_t RecordingDelay(uint16_t* delayMS) const = 0;
 
-  // CPU load
-  virtual int32_t CPULoad(uint16_t* load) const = 0;
+  // Deprecated.
+  // TODO(henrika): to be removed.
+  virtual int32_t CPULoad(uint16_t* load) const { return -1; }
 
-  // Recording of raw PCM data
+  // Deprecated.
+  // TODO(henrika): to be removed.
   virtual int32_t StartRawOutputFileRecording(
-      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) = 0;
-  virtual int32_t StopRawOutputFileRecording() = 0;
+      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { return -1; }
+  virtual int32_t StopRawOutputFileRecording() { return -1; }
   virtual int32_t StartRawInputFileRecording(
-      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) = 0;
-  virtual int32_t StopRawInputFileRecording() = 0;
+      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { return -1; }
+  virtual int32_t StopRawInputFileRecording() { return -1; }
 
   // Native sample rate controls (samples/sec)
   virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) = 0;
@@ -186,8 +201,11 @@
   virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) = 0;
   virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const = 0;
 
+  // Deprecated.
+  // TODO(henrika): to be removed.
+  virtual int32_t ResetAudioDevice() { return -1; }
+
   // Mobile device specific functions
-  virtual int32_t ResetAudioDevice() = 0;
   virtual int32_t SetLoudspeakerStatus(bool enable) = 0;
   virtual int32_t GetLoudspeakerStatus(bool* enabled) const = 0;
 
diff --git a/webrtc/modules/audio_device/include/fake_audio_device.h b/webrtc/modules/audio_device/include/fake_audio_device.h
index 444b65c..8b38088 100644
--- a/webrtc/modules/audio_device/include/fake_audio_device.h
+++ b/webrtc/modules/audio_device/include/fake_audio_device.h
@@ -90,24 +90,17 @@
   virtual int32_t SpeakerVolume(uint32_t* volume) const { return 0; }
   virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const { return 0; }
   virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const { return 0; }
-  virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const { return 0; }
   virtual int32_t MicrophoneVolumeIsAvailable(bool* available) { return 0; }
   virtual int32_t SetMicrophoneVolume(uint32_t volume) { return 0; }
   virtual int32_t MicrophoneVolume(uint32_t* volume) const { return 0; }
   virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const { return 0; }
   virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const { return 0; }
-  virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const {
-    return 0;
-  }
   virtual int32_t SpeakerMuteIsAvailable(bool* available) { return 0; }
   virtual int32_t SetSpeakerMute(bool enable) { return 0; }
   virtual int32_t SpeakerMute(bool* enabled) const { return 0; }
   virtual int32_t MicrophoneMuteIsAvailable(bool* available) { return 0; }
   virtual int32_t SetMicrophoneMute(bool enable) { return 0; }
   virtual int32_t MicrophoneMute(bool* enabled) const { return 0; }
-  virtual int32_t MicrophoneBoostIsAvailable(bool* available) { return 0; }
-  virtual int32_t SetMicrophoneBoost(bool enable) { return 0; }
-  virtual int32_t MicrophoneBoost(bool* enabled) const { return 0; }
   virtual int32_t StereoPlayoutIsAvailable(bool* available) const {
     *available = false;
     return 0;
@@ -120,29 +113,11 @@
   virtual int32_t StereoRecording(bool* enabled) const { return 0; }
   virtual int32_t SetRecordingChannel(const ChannelType channel) { return 0; }
   virtual int32_t RecordingChannel(ChannelType* channel) const { return 0; }
-  virtual int32_t SetPlayoutBuffer(const BufferType type,
-                           uint16_t sizeMS = 0) {
-    return 0;
-  }
-  virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
-    return 0;
-  }
   virtual int32_t PlayoutDelay(uint16_t* delayMS) const {
     *delayMS = 0;
     return 0;
   }
   virtual int32_t RecordingDelay(uint16_t* delayMS) const { return 0; }
-  virtual int32_t CPULoad(uint16_t* load) const { return 0; }
-  virtual int32_t StartRawOutputFileRecording(
-      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
-    return 0;
-  }
-  virtual int32_t StopRawOutputFileRecording() { return 0; }
-  virtual int32_t StartRawInputFileRecording(
-      const char pcmFileNameUTF8[kAdmMaxFileNameSize]) {
-    return 0;
-  }
-  virtual int32_t StopRawInputFileRecording() { return 0; }
   virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) {
     return 0;
   }
@@ -153,7 +128,6 @@
     return 0;
   }
   virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const { return 0; }
-  virtual int32_t ResetAudioDevice() { return 0; }
   virtual int32_t SetLoudspeakerStatus(bool enable) { return 0; }
   virtual int32_t GetLoudspeakerStatus(bool* enabled) const { return 0; }
   virtual bool BuiltInAECIsAvailable() const { return false; }
diff --git a/webrtc/modules/audio_device/include/mock_audio_device.h b/webrtc/modules/audio_device/include/mock_audio_device.h
index 424e5d5..1b80f7e 100644
--- a/webrtc/modules/audio_device/include/mock_audio_device.h
+++ b/webrtc/modules/audio_device/include/mock_audio_device.h
@@ -72,22 +72,17 @@
   MOCK_CONST_METHOD1(SpeakerVolume, int32_t(uint32_t* volume));
   MOCK_CONST_METHOD1(MaxSpeakerVolume, int32_t(uint32_t* maxVolume));
   MOCK_CONST_METHOD1(MinSpeakerVolume, int32_t(uint32_t* minVolume));
-  MOCK_CONST_METHOD1(SpeakerVolumeStepSize, int32_t(uint16_t* stepSize));
   MOCK_METHOD1(MicrophoneVolumeIsAvailable, int32_t(bool* available));
   MOCK_METHOD1(SetMicrophoneVolume, int32_t(uint32_t volume));
   MOCK_CONST_METHOD1(MicrophoneVolume, int32_t(uint32_t* volume));
   MOCK_CONST_METHOD1(MaxMicrophoneVolume, int32_t(uint32_t* maxVolume));
   MOCK_CONST_METHOD1(MinMicrophoneVolume, int32_t(uint32_t* minVolume));
-  MOCK_CONST_METHOD1(MicrophoneVolumeStepSize, int32_t(uint16_t* stepSize));
   MOCK_METHOD1(SpeakerMuteIsAvailable, int32_t(bool* available));
   MOCK_METHOD1(SetSpeakerMute, int32_t(bool enable));
   MOCK_CONST_METHOD1(SpeakerMute, int32_t(bool* enabled));
   MOCK_METHOD1(MicrophoneMuteIsAvailable, int32_t(bool* available));
   MOCK_METHOD1(SetMicrophoneMute, int32_t(bool enable));
   MOCK_CONST_METHOD1(MicrophoneMute, int32_t(bool* enabled));
-  MOCK_METHOD1(MicrophoneBoostIsAvailable, int32_t(bool* available));
-  MOCK_METHOD1(SetMicrophoneBoost, int32_t(bool enable));
-  MOCK_CONST_METHOD1(MicrophoneBoost, int32_t(bool* enabled));
   MOCK_CONST_METHOD1(StereoPlayoutIsAvailable, int32_t(bool* available));
   MOCK_METHOD1(SetStereoPlayout, int32_t(bool enable));
   MOCK_CONST_METHOD1(StereoPlayout, int32_t(bool* enabled));
@@ -96,24 +91,12 @@
   MOCK_CONST_METHOD1(StereoRecording, int32_t(bool* enabled));
   MOCK_METHOD1(SetRecordingChannel, int32_t(const ChannelType channel));
   MOCK_CONST_METHOD1(RecordingChannel, int32_t(ChannelType* channel));
-  MOCK_METHOD2(SetPlayoutBuffer, int32_t(const BufferType type,
-                                         uint16_t sizeMS));
-  MOCK_CONST_METHOD2(PlayoutBuffer, int32_t(BufferType* type,
-                                            uint16_t* sizeMS));
   MOCK_CONST_METHOD1(PlayoutDelay, int32_t(uint16_t* delayMS));
   MOCK_CONST_METHOD1(RecordingDelay, int32_t(uint16_t* delayMS));
-  MOCK_CONST_METHOD1(CPULoad, int32_t(uint16_t* load));
-  MOCK_METHOD1(StartRawOutputFileRecording,
-               int32_t(const char pcmFileNameUTF8[kAdmMaxFileNameSize]));
-  MOCK_METHOD0(StopRawOutputFileRecording, int32_t());
-  MOCK_METHOD1(StartRawInputFileRecording,
-               int32_t(const char pcmFileNameUTF8[kAdmMaxFileNameSize]));
-  MOCK_METHOD0(StopRawInputFileRecording, int32_t());
   MOCK_METHOD1(SetRecordingSampleRate, int32_t(const uint32_t samplesPerSec));
   MOCK_CONST_METHOD1(RecordingSampleRate, int32_t(uint32_t* samplesPerSec));
   MOCK_METHOD1(SetPlayoutSampleRate, int32_t(const uint32_t samplesPerSec));
   MOCK_CONST_METHOD1(PlayoutSampleRate, int32_t(uint32_t* samplesPerSec));
-  MOCK_METHOD0(ResetAudioDevice, int32_t());
   MOCK_METHOD1(SetLoudspeakerStatus, int32_t(bool enable));
   MOCK_CONST_METHOD1(GetLoudspeakerStatus, int32_t(bool* enabled));
   MOCK_CONST_METHOD0(BuiltInAECIsAvailable, bool());
diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.h b/webrtc/modules/audio_device/ios/audio_device_ios.h
index 6ce2c69..7cccc16 100644
--- a/webrtc/modules/audio_device/ios/audio_device_ios.h
+++ b/webrtc/modules/audio_device/ios/audio_device_ios.h
@@ -93,11 +93,8 @@
   // These methods are currently not fully implemented on iOS:
 
   // See audio_device_not_implemented.cc for trivial implementations.
-  int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                        uint16_t& sizeMS) const override;
   int32_t ActiveAudioLayer(
       AudioDeviceModule::AudioLayer& audioLayer) const override;
-  int32_t ResetAudioDevice() override;
   int32_t PlayoutIsAvailable(bool& available) override;
   int32_t RecordingIsAvailable(bool& available) override;
   int32_t SetAGC(bool enable) override;
@@ -125,31 +122,23 @@
   int32_t SpeakerVolume(uint32_t& volume) const override;
   int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
   int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
-  int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
   int32_t MicrophoneVolumeIsAvailable(bool& available) override;
   int32_t SetMicrophoneVolume(uint32_t volume) override;
   int32_t MicrophoneVolume(uint32_t& volume) const override;
   int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
   int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
-  int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
   int32_t MicrophoneMuteIsAvailable(bool& available) override;
   int32_t SetMicrophoneMute(bool enable) override;
   int32_t MicrophoneMute(bool& enabled) const override;
   int32_t SpeakerMuteIsAvailable(bool& available) override;
   int32_t SetSpeakerMute(bool enable) override;
   int32_t SpeakerMute(bool& enabled) const override;
-  int32_t MicrophoneBoostIsAvailable(bool& available) override;
-  int32_t SetMicrophoneBoost(bool enable) override;
-  int32_t MicrophoneBoost(bool& enabled) const override;
   int32_t StereoPlayoutIsAvailable(bool& available) override;
   int32_t SetStereoPlayout(bool enable) override;
   int32_t StereoPlayout(bool& enabled) const override;
   int32_t StereoRecordingIsAvailable(bool& available) override;
   int32_t SetStereoRecording(bool enable) override;
   int32_t StereoRecording(bool& enabled) const override;
-  int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
-                           uint16_t sizeMS) override;
-  int32_t CPULoad(uint16_t& load) const override;
   bool PlayoutWarning() const override;
   bool PlayoutError() const override;
   bool RecordingWarning() const override;
diff --git a/webrtc/modules/audio_device/ios/audio_device_not_implemented_ios.mm b/webrtc/modules/audio_device/ios/audio_device_not_implemented_ios.mm
index e975f4d..f67c0a9 100644
--- a/webrtc/modules/audio_device/ios/audio_device_not_implemented_ios.mm
+++ b/webrtc/modules/audio_device/ios/audio_device_not_implemented_ios.mm
@@ -15,23 +15,12 @@
 
 namespace webrtc {
 
-int32_t AudioDeviceIOS::PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                                      uint16_t& sizeMS) const {
-  RTC_NOTREACHED() << "Not implemented";
-  return -1;
-}
-
 int32_t AudioDeviceIOS::ActiveAudioLayer(
     AudioDeviceModule::AudioLayer& audioLayer) const {
   audioLayer = AudioDeviceModule::kPlatformDefaultAudio;
   return 0;
 }
 
-int32_t AudioDeviceIOS::ResetAudioDevice() {
-  RTC_NOTREACHED() << "Not implemented";
-  return -1;
-}
-
 int16_t AudioDeviceIOS::PlayoutDevices() {
   // TODO(henrika): improve.
   LOG_F(LS_WARNING) << "Not implemented";
@@ -77,11 +66,6 @@
   return -1;
 }
 
-int32_t AudioDeviceIOS::SpeakerVolumeStepSize(uint16_t& stepSize) const {
-  RTC_NOTREACHED() << "Not implemented";
-  return -1;
-}
-
 int32_t AudioDeviceIOS::SpeakerMuteIsAvailable(bool& available) {
   available = false;
   return 0;
@@ -146,21 +130,6 @@
   return -1;
 }
 
-int32_t AudioDeviceIOS::MicrophoneBoostIsAvailable(bool& available) {
-  available = false;
-  return 0;
-}
-
-int32_t AudioDeviceIOS::SetMicrophoneBoost(bool enable) {
-  RTC_NOTREACHED() << "Not implemented";
-  return -1;
-}
-
-int32_t AudioDeviceIOS::MicrophoneBoost(bool& enabled) const {
-  enabled = false;
-  return 0;
-}
-
 int32_t AudioDeviceIOS::StereoRecordingIsAvailable(bool& available) {
   available = false;
   return 0;
@@ -227,11 +196,6 @@
   return -1;
 }
 
-int32_t AudioDeviceIOS::MicrophoneVolumeStepSize(uint16_t& stepSize) const {
-  RTC_NOTREACHED() << "Not implemented";
-  return -1;
-}
-
 int32_t AudioDeviceIOS::PlayoutDeviceName(uint16_t index,
                                           char name[kAdmMaxDeviceNameSize],
                                           char guid[kAdmMaxGuidSize]) {
@@ -267,16 +231,4 @@
   return 0;
 }
 
-int32_t AudioDeviceIOS::SetPlayoutBuffer(
-    const AudioDeviceModule::BufferType type,
-    uint16_t sizeMS) {
-  RTC_NOTREACHED() << "Not implemented";
-  return -1;
-}
-
-int32_t AudioDeviceIOS::CPULoad(uint16_t&) const {
-  RTC_NOTREACHED() << "Not implemented";
-  return -1;
-}
-
 }  // namespace webrtc
diff --git a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
index cd13466..9e2c5b1 100644
--- a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
@@ -82,7 +82,6 @@
     _playoutBuffer(NULL),
     _recordingFramesLeft(0),
     _playoutFramesLeft(0),
-    _playBufType(AudioDeviceModule::kFixedBufferSize),
     _initialized(false),
     _recording(false),
     _playing(false),
@@ -94,9 +93,7 @@
     _playWarning(0),
     _playError(0),
     _recWarning(0),
-    _recError(0),
-    _playBufDelay(80),
-    _playBufDelayFixed(80)
+    _recError(0)
 {
     memset(_oldKeyState, 0, sizeof(_oldKeyState));
     LOG(LS_INFO) << __FUNCTION__ << " created";
@@ -353,22 +350,6 @@
     return 0;
 }
 
-int32_t AudioDeviceLinuxALSA::SpeakerVolumeStepSize(
-    uint16_t& stepSize) const
-{
-
-    uint16_t delta(0);
-
-    if (_mixerManager.SpeakerVolumeStepSize(delta) == -1)
-    {
-        return -1;
-    }
-
-    stepSize = delta;
-
-    return 0;
-}
-
 int32_t AudioDeviceLinuxALSA::SpeakerMuteIsAvailable(bool& available)
 {
 
@@ -477,58 +458,6 @@
     return 0;
 }
 
-int32_t AudioDeviceLinuxALSA::MicrophoneBoostIsAvailable(bool& available)
-{
-
-    bool isAvailable(false);
-    bool wasInitialized = _mixerManager.MicrophoneIsInitialized();
-
-    // Enumerate all avaliable microphone and make an attempt to open up the
-    // input mixer corresponding to the currently selected input device.
-    //
-    if (!wasInitialized && InitMicrophone() == -1)
-    {
-        // If we end up here it means that the selected microphone has no volume
-        // control, hence it is safe to state that there is no boost control
-        // already at this stage.
-        available = false;
-        return 0;
-    }
-
-    // Check if the selected microphone has a boost control
-    _mixerManager.MicrophoneBoostIsAvailable(isAvailable);
-    available = isAvailable;
-
-    // Close the initialized input mixer
-    if (!wasInitialized)
-    {
-        _mixerManager.CloseMicrophone();
-    }
-
-    return 0;
-}
-
-int32_t AudioDeviceLinuxALSA::SetMicrophoneBoost(bool enable)
-{
-
-    return (_mixerManager.SetMicrophoneBoost(enable));
-}
-
-int32_t AudioDeviceLinuxALSA::MicrophoneBoost(bool& enabled) const
-{
-
-    bool onOff(0);
-
-    if (_mixerManager.MicrophoneBoost(onOff) == -1)
-    {
-        return -1;
-    }
-
-    enabled = onOff;
-
-    return 0;
-}
-
 int32_t AudioDeviceLinuxALSA::StereoRecordingIsAvailable(bool& available)
 {
 
@@ -769,22 +698,6 @@
     return 0;
 }
 
-int32_t AudioDeviceLinuxALSA::MicrophoneVolumeStepSize(
-    uint16_t& stepSize) const
-{
-
-    uint16_t delta(0);
-
-    if (_mixerManager.MicrophoneVolumeStepSize(delta) == -1)
-    {
-        return -1;
-    }
-
-    stepSize = delta;
-
-    return 0;
-}
-
 int16_t AudioDeviceLinuxALSA::PlayoutDevices()
 {
 
@@ -1533,45 +1446,6 @@
 {
     return (_playing);
 }
-// ----------------------------------------------------------------------------
-//  SetPlayoutBuffer
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceLinuxALSA::SetPlayoutBuffer(
-    const AudioDeviceModule::BufferType type,
-    uint16_t sizeMS)
-{
-    _playBufType = type;
-    if (type == AudioDeviceModule::kFixedBufferSize)
-    {
-        _playBufDelayFixed = sizeMS;
-    }
-    return 0;
-}
-
-int32_t AudioDeviceLinuxALSA::PlayoutBuffer(
-    AudioDeviceModule::BufferType& type,
-    uint16_t& sizeMS) const
-{
-    type = _playBufType;
-    if (type == AudioDeviceModule::kFixedBufferSize)
-    {
-        sizeMS = _playBufDelayFixed;
-    }
-    else
-    {
-        sizeMS = _playBufDelay;
-    }
-
-    return 0;
-}
-
-int32_t AudioDeviceLinuxALSA::CPULoad(uint16_t& load) const
-{
-
-    LOG(LS_WARNING) << "API call not supported on this platform";
-    return -1;
-}
 
 bool AudioDeviceLinuxALSA::PlayoutWarning() const
 {
diff --git a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h
index f7fb9a9..2648465 100644
--- a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h
+++ b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.h
@@ -95,7 +95,6 @@
     int32_t SpeakerVolume(uint32_t& volume) const override;
     int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
     int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
-    int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
 
     // Microphone volume controls
     int32_t MicrophoneVolumeIsAvailable(bool& available) override;
@@ -103,7 +102,6 @@
     int32_t MicrophoneVolume(uint32_t& volume) const override;
     int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
     int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
-    int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
 
     // Speaker mute control
     int32_t SpeakerMuteIsAvailable(bool& available) override;
@@ -115,11 +113,6 @@
     int32_t SetMicrophoneMute(bool enable) override;
     int32_t MicrophoneMute(bool& enabled) const override;
 
-    // Microphone boost control
-    int32_t MicrophoneBoostIsAvailable(bool& available) override;
-    int32_t SetMicrophoneBoost(bool enable) override;
-    int32_t MicrophoneBoost(bool& enabled) const override;
-
     // Stereo support
     int32_t StereoPlayoutIsAvailable(bool& available) override;
     int32_t SetStereoPlayout(bool enable) override;
@@ -129,26 +122,19 @@
     int32_t StereoRecording(bool& enabled) const override;
 
     // Delay information and control
-    int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
-                             uint16_t sizeMS) override;
-    int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                          uint16_t& sizeMS) const override;
     int32_t PlayoutDelay(uint16_t& delayMS) const override;
     int32_t RecordingDelay(uint16_t& delayMS) const override;
 
-    // CPU load
-    int32_t CPULoad(uint16_t& load) const override;
+    bool PlayoutWarning() const override;
+    bool PlayoutError() const override;
+    bool RecordingWarning() const override;
+    bool RecordingError() const override;
+    void ClearPlayoutWarning() override;
+    void ClearPlayoutError() override;
+    void ClearRecordingWarning() override;
+    void ClearRecordingError() override;
 
- bool PlayoutWarning() const override;
- bool PlayoutError() const override;
- bool RecordingWarning() const override;
- bool RecordingError() const override;
- void ClearPlayoutWarning() override;
- void ClearPlayoutError() override;
- void ClearRecordingWarning() override;
- void ClearRecordingError() override;
-
- void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
+    void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
 
 private:
     int32_t GetDevicesInfo(const int32_t function,
@@ -210,8 +196,6 @@
     uint32_t _recordingFramesLeft;
     uint32_t _playoutFramesLeft;
 
-    AudioDeviceModule::BufferType _playBufType;
-
     bool _initialized;
     bool _recording;
     bool _playing;
@@ -227,9 +211,6 @@
     uint16_t _recWarning;
     uint16_t _recError;
 
-    uint16_t _playBufDelay;                 // playback delay
-    uint16_t _playBufDelayFixed;            // fixed playback delay
-
     char _oldKeyState[32];
 #if defined(USE_X11)
     Display* _XDisplay;
diff --git a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc
index 8760980..0e03932 100644
--- a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc
@@ -40,7 +40,6 @@
       sample_rate_hz_(0),
       _recChannels(1),
       _playChannels(1),
-      _playBufType(AudioDeviceModule::kFixedBufferSize),
       _initialized(false),
       _recording(false),
       _playing(false),
@@ -52,7 +51,6 @@
       _stopPlay(false),
       _AGC(false),
       update_speaker_volume_at_startup_(false),
-      _playBufDelayFixed(20),
       _sndCardPlayDelay(0),
       _sndCardRecDelay(0),
       _writeErrors(0),
@@ -398,19 +396,6 @@
   return 0;
 }
 
-int32_t AudioDeviceLinuxPulse::SpeakerVolumeStepSize(uint16_t& stepSize) const {
-  RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  uint16_t delta(0);
-
-  if (_mixerManager.SpeakerVolumeStepSize(delta) == -1) {
-    return -1;
-  }
-
-  stepSize = delta;
-
-  return 0;
-}
-
 int32_t AudioDeviceLinuxPulse::SpeakerMuteIsAvailable(bool& available) {
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
   bool isAvailable(false);
@@ -502,52 +487,6 @@
   return 0;
 }
 
-int32_t AudioDeviceLinuxPulse::MicrophoneBoostIsAvailable(bool& available) {
-  RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  bool isAvailable(false);
-  bool wasInitialized = _mixerManager.MicrophoneIsInitialized();
-
-  // Enumerate all avaliable microphone and make an attempt to open up the
-  // input mixer corresponding to the currently selected input device.
-  //
-  if (!wasInitialized && InitMicrophone() == -1) {
-    // If we end up here it means that the selected microphone has no
-    // volume control, hence it is safe to state that there is no
-    // boost control already at this stage.
-    available = false;
-    return 0;
-  }
-
-  // Check if the selected microphone has a boost control
-  _mixerManager.MicrophoneBoostIsAvailable(isAvailable);
-  available = isAvailable;
-
-  // Close the initialized input mixer
-  if (!wasInitialized) {
-    _mixerManager.CloseMicrophone();
-  }
-
-  return 0;
-}
-
-int32_t AudioDeviceLinuxPulse::SetMicrophoneBoost(bool enable) {
-  RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  return (_mixerManager.SetMicrophoneBoost(enable));
-}
-
-int32_t AudioDeviceLinuxPulse::MicrophoneBoost(bool& enabled) const {
-  RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  bool onOff(0);
-
-  if (_mixerManager.MicrophoneBoost(onOff) == -1) {
-    return -1;
-  }
-
-  enabled = onOff;
-
-  return 0;
-}
-
 int32_t AudioDeviceLinuxPulse::StereoRecordingIsAvailable(bool& available) {
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
   if (_recChannels == 2 && _recording) {
@@ -727,20 +666,6 @@
   return 0;
 }
 
-int32_t AudioDeviceLinuxPulse::MicrophoneVolumeStepSize(
-    uint16_t& stepSize) const {
-  RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  uint16_t delta(0);
-
-  if (_mixerManager.MicrophoneVolumeStepSize(delta) == -1) {
-    return -1;
-  }
-
-  stepSize = delta;
-
-  return 0;
-}
-
 int16_t AudioDeviceLinuxPulse::PlayoutDevices() {
   PaLock();
 
@@ -1367,36 +1292,6 @@
   return (_playing);
 }
 
-int32_t AudioDeviceLinuxPulse::SetPlayoutBuffer(
-    const AudioDeviceModule::BufferType type,
-    uint16_t sizeMS) {
-  RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  if (type != AudioDeviceModule::kFixedBufferSize) {
-    LOG(LS_ERROR) << "Adaptive buffer size not supported on this platform";
-    return -1;
-  }
-
-  _playBufType = type;
-  _playBufDelayFixed = sizeMS;
-
-  return 0;
-}
-
-int32_t AudioDeviceLinuxPulse::PlayoutBuffer(
-    AudioDeviceModule::BufferType& type,
-    uint16_t& sizeMS) const {
-  RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  type = _playBufType;
-  sizeMS = _playBufDelayFixed;
-
-  return 0;
-}
-
-int32_t AudioDeviceLinuxPulse::CPULoad(uint16_t& /*load*/) const {
-  LOG(LS_WARNING) << "API call not supported on this platform";
-  return -1;
-}
-
 bool AudioDeviceLinuxPulse::PlayoutWarning() const {
   rtc::CritScope lock(&_critSect);
   return (_playWarning > 0);
diff --git a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h
index 00ed547..7e8d683 100644
--- a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h
+++ b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.h
@@ -157,7 +157,6 @@
     int32_t SpeakerVolume(uint32_t& volume) const override;
     int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
     int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
-    int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
 
     // Microphone volume controls
     int32_t MicrophoneVolumeIsAvailable(bool& available) override;
@@ -165,7 +164,6 @@
     int32_t MicrophoneVolume(uint32_t& volume) const override;
     int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
     int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
-    int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
 
     // Speaker mute control
     int32_t SpeakerMuteIsAvailable(bool& available) override;
@@ -177,11 +175,6 @@
     int32_t SetMicrophoneMute(bool enable) override;
     int32_t MicrophoneMute(bool& enabled) const override;
 
-    // Microphone boost control
-    int32_t MicrophoneBoostIsAvailable(bool& available) override;
-    int32_t SetMicrophoneBoost(bool enable) override;
-    int32_t MicrophoneBoost(bool& enabled) const override;
-
     // Stereo support
     int32_t StereoPlayoutIsAvailable(bool& available) override;
     int32_t SetStereoPlayout(bool enable) override;
@@ -191,16 +184,9 @@
     int32_t StereoRecording(bool& enabled) const override;
 
     // Delay information and control
-    int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
-                             uint16_t sizeMS) override;
-    int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                          uint16_t& sizeMS) const override;
     int32_t PlayoutDelay(uint16_t& delayMS) const override;
     int32_t RecordingDelay(uint16_t& delayMS) const override;
 
-    // CPU load
-    int32_t CPULoad(uint16_t& load) const override;
-
     bool PlayoutWarning() const override;
     bool PlayoutError() const override;
     bool RecordingWarning() const override;
@@ -295,8 +281,6 @@
     uint8_t _recChannels;
     uint8_t _playChannels;
 
-    AudioDeviceModule::BufferType _playBufType;
-
     // Stores thread ID in constructor.
     // We can then use ThreadChecker::CalledOnValidThread() to ensure that
     // other methods are called from the same thread.
@@ -315,8 +299,6 @@
     bool _AGC;
     bool update_speaker_volume_at_startup_;
 
-    uint16_t _playBufDelayFixed; // fixed playback delay
-
     uint32_t _sndCardPlayDelay;
     uint32_t _sndCardRecDelay;
 
diff --git a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
index 8bc63c3..9ce0ca1 100644
--- a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
@@ -534,22 +534,6 @@
  }
  */
 
-int32_t AudioMixerManagerLinuxALSA::SpeakerVolumeStepSize(
-    uint16_t& stepSize) const
-{
-
-    if (_outputMixerHandle == NULL)
-    {
-        LOG(LS_WARNING) << "no avaliable output mixer exists";
-        return -1;
-    }
-
-    // The step size is always 1 for ALSA
-    stepSize = 1;
-
-    return 0;
-}
-
 int32_t AudioMixerManagerLinuxALSA::SpeakerVolumeIsAvailable(
     bool& available)
 {
@@ -743,63 +727,6 @@
     return 0;
 }
 
-int32_t AudioMixerManagerLinuxALSA::MicrophoneBoostIsAvailable(
-    bool& available)
-{
-    if (_inputMixerHandle == NULL)
-    {
-        LOG(LS_WARNING) << "no avaliable input mixer exists";
-        return -1;
-    }
-
-    // Microphone boost cannot be enabled through ALSA Simple Mixer Interface
-    available = false;
-
-    return 0;
-}
-
-int32_t AudioMixerManagerLinuxALSA::SetMicrophoneBoost(bool enable)
-{
-    LOG(LS_VERBOSE) << "AudioMixerManagerLinuxALSA::SetMicrophoneBoost(enable="
-                    << enable << ")";
-
-    rtc::CritScope lock(&_critSect);
-
-    if (_inputMixerHandle == NULL)
-    {
-        LOG(LS_WARNING) << "no avaliable input mixer exists";
-        return -1;
-    }
-
-    // Ensure that the selected microphone destination has a valid mute control.
-    bool available(false);
-    MicrophoneMuteIsAvailable(available);
-    if (!available)
-    {
-        LOG(LS_WARNING) << "it is not possible to enable microphone boost";
-        return -1;
-    }
-
-    // It is assumed that the call above fails!
-
-    return (0);
-}
-
-int32_t AudioMixerManagerLinuxALSA::MicrophoneBoost(bool& enabled) const
-{
-
-    if (_inputMixerHandle == NULL)
-    {
-        LOG(LS_WARNING) << "no avaliable input mixer exists";
-        return -1;
-    }
-
-    // Microphone boost cannot be enabled on this platform!
-    enabled = false;
-
-    return 0;
-}
-
 int32_t AudioMixerManagerLinuxALSA::MicrophoneVolumeIsAvailable(
     bool& available)
 {
@@ -1027,22 +954,6 @@
     return 0;
 }
 
-int32_t AudioMixerManagerLinuxALSA::MicrophoneVolumeStepSize(
-    uint16_t& stepSize) const
-{
-
-    if (_inputMixerHandle == NULL)
-    {
-        LOG(LS_WARNING) << "no avaliable input mixer exists";
-        return -1;
-    }
-
-    // The step size is always 1 for ALSA
-    stepSize = 1;
-
-    return 0;
-}
-
 // ============================================================================
 //                                 Private Methods
 // ============================================================================
diff --git a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h
index 532b66a..58fb400 100644
--- a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h
+++ b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h
@@ -30,7 +30,6 @@
     int32_t SpeakerVolume(uint32_t& volume) const;
     int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
     int32_t MinSpeakerVolume(uint32_t& minVolume) const;
-    int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
     int32_t SpeakerVolumeIsAvailable(bool& available);
     int32_t SpeakerMuteIsAvailable(bool& available);
     int32_t SetSpeakerMute(bool enable);
@@ -38,15 +37,11 @@
     int32_t MicrophoneMuteIsAvailable(bool& available);
     int32_t SetMicrophoneMute(bool enable);
     int32_t MicrophoneMute(bool& enabled) const;
-    int32_t MicrophoneBoostIsAvailable(bool& available);
-    int32_t SetMicrophoneBoost(bool enable);
-    int32_t MicrophoneBoost(bool& enabled) const;
     int32_t MicrophoneVolumeIsAvailable(bool& available);
     int32_t SetMicrophoneVolume(uint32_t volume);
     int32_t MicrophoneVolume(uint32_t& volume) const;
     int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
     int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
-    int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
     int32_t Close();
     int32_t CloseSpeaker();
     int32_t CloseMicrophone();
diff --git a/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc b/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
index c7899a9..afffc1d 100644
--- a/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
@@ -344,27 +344,6 @@
 }
 
 int32_t
-AudioMixerManagerLinuxPulse::SpeakerVolumeStepSize(uint16_t& stepSize) const
-{
-    RTC_DCHECK(thread_checker_.CalledOnValidThread());
-    if (_paOutputDeviceIndex == -1)
-    {
-        LOG(LS_WARNING) << "output device index has not been set";
-        return -1;
-    }
-
-    // The sink input (stream) will always have step size = 1
-    // There are PA_VOLUME_NORM+1 steps
-    stepSize = 1;
-
-    LOG(LS_VERBOSE)
-        << "AudioMixerManagerLinuxPulse::SpeakerVolumeStepSize() => size="
-        << stepSize;
-
-    return 0;
-}
-
-int32_t
 AudioMixerManagerLinuxPulse::SpeakerVolumeIsAvailable(bool& available)
 {
     RTC_DCHECK(thread_checker_.CalledOnValidThread());
@@ -653,65 +632,6 @@
     return 0;
 }
 
-int32_t
-AudioMixerManagerLinuxPulse::MicrophoneBoostIsAvailable(bool& available)
-{
-    RTC_DCHECK(thread_checker_.CalledOnValidThread());
-    if (_paInputDeviceIndex == -1)
-    {
-        LOG(LS_WARNING) << "input device index has not been set";
-        return -1;
-    }
-
-    // Always unavailable in Pulse Audio
-    // Could make it possible to use PA_VOLUME_MAX
-    // but that gives bad audio with some sound cards
-    available = false;
-
-    return 0;
-}
-
-int32_t AudioMixerManagerLinuxPulse::SetMicrophoneBoost(bool enable)
-{
-    RTC_DCHECK(thread_checker_.CalledOnValidThread());
-    LOG(LS_VERBOSE) << "AudioMixerManagerLinuxPulse::SetMicrophoneBoost(enable="
-                    << enable << ")";
-
-    if (_paInputDeviceIndex == -1)
-    {
-        LOG(LS_WARNING) << "input device index has not been set";
-        return -1;
-    }
-
-    // Ensure the selected microphone destination has a valid boost control
-    bool available(false);
-    MicrophoneBoostIsAvailable(available);
-    if (!available)
-    {
-        LOG(LS_WARNING) << "it is not possible to enable microphone boost";
-        return -1;
-    }
-
-    // It is assumed that the call above fails!
-
-    return 0;
-}
-
-int32_t AudioMixerManagerLinuxPulse::MicrophoneBoost(bool& enabled) const
-{
-    RTC_DCHECK(thread_checker_.CalledOnValidThread());
-    if (_paInputDeviceIndex == -1)
-    {
-        LOG(LS_WARNING) << "input device index has not been set";
-        return -1;
-    }
-
-    // Microphone boost cannot be enabled on this platform!
-    enabled = false;
-
-    return 0;
-}
-
 int32_t AudioMixerManagerLinuxPulse::MicrophoneVolumeIsAvailable(
     bool& available)
 {
@@ -875,48 +795,6 @@
     return 0;
 }
 
-int32_t AudioMixerManagerLinuxPulse::MicrophoneVolumeStepSize(
-    uint16_t& stepSize) const
-{
-    RTC_DCHECK(thread_checker_.CalledOnValidThread());
-    if (_paInputDeviceIndex == -1)
-    {
-        LOG(LS_WARNING) << "input device index has not been set";
-        return -1;
-    }
-
-    uint32_t deviceIndex = (uint32_t) _paInputDeviceIndex;
-
-    AutoPulseLock auto_lock(_paMainloop);
-
-    // Get the actual stream device index if we have a connected stream
-    // The device used by the stream can be changed
-    // during the call
-    if (_paRecStream && (LATE(pa_stream_get_state)(_paRecStream)
-        != PA_STREAM_UNCONNECTED))
-    {
-        deviceIndex = LATE(pa_stream_get_device_index)(_paRecStream);
-    }
-
-    pa_operation* paOperation = NULL;
-
-    // Get info for this source
-    paOperation
-        = LATE(pa_context_get_source_info_by_index)(_paContext, deviceIndex,
-                                                    PaSourceInfoCallback,
-                                                    (void*) this);
-
-    WaitForOperationCompletion(paOperation);
-
-    stepSize = static_cast<uint16_t> ((PA_VOLUME_NORM + 1) / _paVolSteps);
-
-    LOG(LS_VERBOSE)
-        << "AudioMixerManagerLinuxPulse::MicrophoneVolumeStepSize() => size="
-        << stepSize;
-
-    return 0;
-}
-
 // ===========================================================================
 //                                 Private Methods
 // ===========================================================================
diff --git a/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h b/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
index 40265d6..f639e82 100644
--- a/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
+++ b/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.h
@@ -37,7 +37,6 @@
     int32_t SpeakerVolume(uint32_t& volume) const;
     int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
     int32_t MinSpeakerVolume(uint32_t& minVolume) const;
-    int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
     int32_t SpeakerVolumeIsAvailable(bool& available);
     int32_t SpeakerMuteIsAvailable(bool& available);
     int32_t SetSpeakerMute(bool enable);
@@ -47,15 +46,11 @@
     int32_t MicrophoneMuteIsAvailable(bool& available);
     int32_t SetMicrophoneMute(bool enable);
     int32_t MicrophoneMute(bool& enabled) const;
-    int32_t MicrophoneBoostIsAvailable(bool& available);
-    int32_t SetMicrophoneBoost(bool enable);
-    int32_t MicrophoneBoost(bool& enabled) const;
     int32_t MicrophoneVolumeIsAvailable(bool& available);
     int32_t SetMicrophoneVolume(uint32_t volume);
     int32_t MicrophoneVolume(uint32_t& volume) const;
     int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
     int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
-    int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
     int32_t SetPulseAudioObjects(pa_threaded_mainloop* mainloop,
                                  pa_context* context);
     int32_t Close();
diff --git a/webrtc/modules/audio_device/mac/audio_device_mac.cc b/webrtc/modules/audio_device/mac/audio_device_mac.cc
index 2b48930..0de5009 100644
--- a/webrtc/modules/audio_device/mac/audio_device_mac.cc
+++ b/webrtc/modules/audio_device/mac/audio_device_mac.cc
@@ -125,7 +125,6 @@
       _playChannels(N_PLAY_CHANNELS),
       _captureBufData(NULL),
       _renderBufData(NULL),
-      _playBufType(AudioDeviceModule::kFixedBufferSize),
       _initialized(false),
       _isShutDown(false),
       _recording(false),
@@ -145,7 +144,6 @@
       _captureDelayUs(0),
       _renderDelayUs(0),
       _renderDelayOffsetSamples(0),
-      _playBufDelayFixed(20),
       _playWarning(0),
       _playError(0),
       _recWarning(0),
@@ -570,17 +568,6 @@
   return 0;
 }
 
-int32_t AudioDeviceMac::SpeakerVolumeStepSize(uint16_t& stepSize) const {
-  uint16_t delta(0);
-
-  if (_mixerManager.SpeakerVolumeStepSize(delta) == -1) {
-    return -1;
-  }
-
-  stepSize = delta;
-  return 0;
-}
-
 int32_t AudioDeviceMac::SpeakerMuteIsAvailable(bool& available) {
   bool isAvailable(false);
   bool wasInitialized = _mixerManager.SpeakerIsInitialized();
@@ -670,50 +657,6 @@
   return 0;
 }
 
-int32_t AudioDeviceMac::MicrophoneBoostIsAvailable(bool& available) {
-  bool isAvailable(false);
-  bool wasInitialized = _mixerManager.MicrophoneIsInitialized();
-
-  // Enumerate all avaliable microphone and make an attempt to open up the
-  // input mixer corresponding to the currently selected input device.
-  //
-  if (!wasInitialized && InitMicrophone() == -1) {
-    // If we end up here it means that the selected microphone has no volume
-    // control, hence it is safe to state that there is no boost control
-    // already at this stage.
-    available = false;
-    return 0;
-  }
-
-  // Check if the selected microphone has a boost control
-  //
-  _mixerManager.MicrophoneBoostIsAvailable(isAvailable);
-  available = isAvailable;
-
-  // Close the initialized input mixer
-  //
-  if (!wasInitialized) {
-    _mixerManager.CloseMicrophone();
-  }
-
-  return 0;
-}
-
-int32_t AudioDeviceMac::SetMicrophoneBoost(bool enable) {
-  return (_mixerManager.SetMicrophoneBoost(enable));
-}
-
-int32_t AudioDeviceMac::MicrophoneBoost(bool& enabled) const {
-  bool onOff(0);
-
-  if (_mixerManager.MicrophoneBoost(onOff) == -1) {
-    return -1;
-  }
-
-  enabled = onOff;
-  return 0;
-}
-
 int32_t AudioDeviceMac::StereoRecordingIsAvailable(bool& available) {
   bool isAvailable(false);
   bool wasInitialized = _mixerManager.MicrophoneIsInitialized();
@@ -873,17 +816,6 @@
   return 0;
 }
 
-int32_t AudioDeviceMac::MicrophoneVolumeStepSize(uint16_t& stepSize) const {
-  uint16_t delta(0);
-
-  if (_mixerManager.MicrophoneVolumeStepSize(delta) == -1) {
-    return -1;
-  }
-
-  stepSize = delta;
-  return 0;
-}
-
 int16_t AudioDeviceMac::PlayoutDevices() {
   AudioDeviceID playDevices[MaxNumberDevices];
   return GetNumberDevices(kAudioDevicePropertyScopeOutput, playDevices,
@@ -1623,34 +1555,6 @@
   return (_playing);
 }
 
-int32_t AudioDeviceMac::SetPlayoutBuffer(
-    const AudioDeviceModule::BufferType type,
-    uint16_t sizeMS) {
-  if (type != AudioDeviceModule::kFixedBufferSize) {
-    LOG(LS_ERROR) << "Adaptive buffer size not supported on this platform";
-    return -1;
-  }
-
-  _playBufType = type;
-  _playBufDelayFixed = sizeMS;
-  return 0;
-}
-
-int32_t AudioDeviceMac::PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                                      uint16_t& sizeMS) const {
-  type = _playBufType;
-  sizeMS = _playBufDelayFixed;
-
-  return 0;
-}
-
-// Not implemented for Mac.
-int32_t AudioDeviceMac::CPULoad(uint16_t& /*load*/) const {
-  LOG(LS_WARNING) << "API call not supported on this platform";
-
-  return -1;
-}
-
 bool AudioDeviceMac::PlayoutWarning() const {
   return (_playWarning > 0);
 }
@@ -1978,9 +1882,10 @@
   WEBRTC_CA_RETURN_ON_ERR(AudioConverterNew(
       &_outDesiredFormat, &_outStreamFormat, &_renderConverter));
 
-  // Try to set buffer size to desired value (_playBufDelayFixed).
+  // Try to set buffer size to desired value set to 20ms.
+  const uint16_t kPlayBufDelayFixed = 20;
   UInt32 bufByteCount = static_cast<UInt32>(
-      (_outStreamFormat.mSampleRate / 1000.0) * _playBufDelayFixed *
+      (_outStreamFormat.mSampleRate / 1000.0) * kPlayBufDelayFixed *
       _outStreamFormat.mChannelsPerFrame * sizeof(Float32));
   if (_outStreamFormat.mFramesPerPacket != 0) {
     if (bufByteCount % _outStreamFormat.mFramesPerPacket != 0) {
diff --git a/webrtc/modules/audio_device/mac/audio_device_mac.h b/webrtc/modules/audio_device/mac/audio_device_mac.h
index c8a4b20..bdd8d83 100644
--- a/webrtc/modules/audio_device/mac/audio_device_mac.h
+++ b/webrtc/modules/audio_device/mac/audio_device_mac.h
@@ -123,7 +123,6 @@
   virtual int32_t SpeakerVolume(uint32_t& volume) const;
   virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
   virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const;
-  virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
 
   // Microphone volume controls
   virtual int32_t MicrophoneVolumeIsAvailable(bool& available);
@@ -131,7 +130,6 @@
   virtual int32_t MicrophoneVolume(uint32_t& volume) const;
   virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
   virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
-  virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
 
   // Microphone mute control
   virtual int32_t MicrophoneMuteIsAvailable(bool& available);
@@ -143,11 +141,6 @@
   virtual int32_t SetSpeakerMute(bool enable);
   virtual int32_t SpeakerMute(bool& enabled) const;
 
-  // Microphone boost control
-  virtual int32_t MicrophoneBoostIsAvailable(bool& available);
-  virtual int32_t SetMicrophoneBoost(bool enable);
-  virtual int32_t MicrophoneBoost(bool& enabled) const;
-
   // Stereo support
   virtual int32_t StereoPlayoutIsAvailable(bool& available);
   virtual int32_t SetStereoPlayout(bool enable);
@@ -157,16 +150,9 @@
   virtual int32_t StereoRecording(bool& enabled) const;
 
   // Delay information and control
-  virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
-                                   uint16_t sizeMS);
-  virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
-                                uint16_t& sizeMS) const;
   virtual int32_t PlayoutDelay(uint16_t& delayMS) const;
   virtual int32_t RecordingDelay(uint16_t& delayMS) const;
 
-  // CPU load
-  virtual int32_t CPULoad(uint16_t& load) const;
-
   virtual bool PlayoutWarning() const;
   virtual bool PlayoutError() const;
   virtual bool RecordingWarning() const;
@@ -312,8 +298,6 @@
 
   SInt16 _renderConvertData[PLAY_BUF_SIZE_IN_SAMPLES];
 
-  AudioDeviceModule::BufferType _playBufType;
-
   bool _initialized;
   bool _isShutDown;
   bool _recording;
@@ -349,8 +333,6 @@
 
   int32_t _renderDelayOffsetSamples;
 
-  uint16_t _playBufDelayFixed;  // fixed playback delay
-
   uint16_t _playWarning;
   uint16_t _playError;
   uint16_t _recWarning;
diff --git a/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.cc b/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.cc
index 457fd9e..6bf6dbd 100644
--- a/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.cc
+++ b/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.cc
@@ -337,19 +337,6 @@
   return 0;
 }
 
-int32_t AudioMixerManagerMac::SpeakerVolumeStepSize(uint16_t& stepSize) const {
-  if (_outputDeviceID == kAudioObjectUnknown) {
-    LOG(LS_WARNING) << "device ID has not been set";
-    return -1;
-  }
-
-  // volume range is 0.0 to 1.0
-  // we convert that to 0 - 255
-  stepSize = 1;
-
-  return 0;
-}
-
 int32_t AudioMixerManagerMac::SpeakerVolumeIsAvailable(bool& available) {
   if (_outputDeviceID == kAudioObjectUnknown) {
     LOG(LS_WARNING) << "device ID has not been set";
@@ -704,52 +691,6 @@
   return 0;
 }
 
-int32_t AudioMixerManagerMac::MicrophoneBoostIsAvailable(bool& available) {
-  if (_inputDeviceID == kAudioObjectUnknown) {
-    LOG(LS_WARNING) << "device ID has not been set";
-    return -1;
-  }
-
-  available = false;  // No AudioObjectPropertySelector value for Mic Boost
-
-  return 0;
-}
-
-int32_t AudioMixerManagerMac::SetMicrophoneBoost(bool enable) {
-  LOG(LS_VERBOSE) << "AudioMixerManagerMac::SetMicrophoneBoost(enable="
-                  << enable << ")";
-
-  rtc::CritScope lock(&_critSect);
-
-  if (_inputDeviceID == kAudioObjectUnknown) {
-    LOG(LS_WARNING) << "device ID has not been set";
-    return -1;
-  }
-
-  // Ensure that the selected microphone has a valid boost control.
-  bool available(false);
-  MicrophoneBoostIsAvailable(available);
-  if (!available) {
-    LOG(LS_WARNING) << "it is not possible to enable microphone boost";
-    return -1;
-  }
-
-  // It is assumed that the call above fails!
-  return 0;
-}
-
-int32_t AudioMixerManagerMac::MicrophoneBoost(bool& enabled) const {
-  if (_inputDeviceID == kAudioObjectUnknown) {
-    LOG(LS_WARNING) << "device ID has not been set";
-    return -1;
-  }
-
-  // Microphone boost cannot be enabled on this platform!
-  enabled = false;
-
-  return 0;
-}
-
 int32_t AudioMixerManagerMac::MicrophoneVolumeIsAvailable(bool& available) {
   if (_inputDeviceID == kAudioObjectUnknown) {
     LOG(LS_WARNING) << "device ID has not been set";
@@ -929,20 +870,6 @@
   return 0;
 }
 
-int32_t AudioMixerManagerMac::MicrophoneVolumeStepSize(
-    uint16_t& stepSize) const {
-  if (_inputDeviceID == kAudioObjectUnknown) {
-    LOG(LS_WARNING) << "device ID has not been set";
-    return -1;
-  }
-
-  // volume range is 0.0 to 1.0
-  // we convert that to 0 - 10
-  stepSize = 1;
-
-  return 0;
-}
-
 // ============================================================================
 //                                 Private Methods
 // ============================================================================
diff --git a/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h b/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h
index b74fe66..74d17ba 100644
--- a/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h
+++ b/webrtc/modules/audio_device/mac/audio_mixer_manager_mac.h
@@ -28,7 +28,6 @@
   int32_t SpeakerVolume(uint32_t& volume) const;
   int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
   int32_t MinSpeakerVolume(uint32_t& minVolume) const;
-  int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
   int32_t SpeakerVolumeIsAvailable(bool& available);
   int32_t SpeakerMuteIsAvailable(bool& available);
   int32_t SetSpeakerMute(bool enable);
@@ -38,15 +37,11 @@
   int32_t MicrophoneMuteIsAvailable(bool& available);
   int32_t SetMicrophoneMute(bool enable);
   int32_t MicrophoneMute(bool& enabled) const;
-  int32_t MicrophoneBoostIsAvailable(bool& available);
-  int32_t SetMicrophoneBoost(bool enable);
-  int32_t MicrophoneBoost(bool& enabled) const;
   int32_t MicrophoneVolumeIsAvailable(bool& available);
   int32_t SetMicrophoneVolume(uint32_t volume);
   int32_t MicrophoneVolume(uint32_t& volume) const;
   int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
   int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
-  int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
   int32_t Close();
   int32_t CloseSpeaker();
   int32_t CloseMicrophone();
diff --git a/webrtc/modules/audio_device/win/audio_device_core_win.cc b/webrtc/modules/audio_device/win/audio_device_core_win.cc
index c77eacc..0c6d34e 100644
--- a/webrtc/modules/audio_device/win/audio_device_core_win.cc
+++ b/webrtc/modules/audio_device/win/audio_device_core_win.cc
@@ -438,7 +438,6 @@
       _sndCardRecDelay(0),
       _writtenSamples(0),
       _readSamples(0),
-      _playAcc(0),
       _recAudioFrameSize(0),
       _recSampleRate(0),
       _recBlockSize(0),
@@ -469,9 +468,7 @@
       _playError(0),
       _recWarning(0),
       _recError(0),
-      _playBufType(AudioDeviceModule::kAdaptiveBufferSize),
       _playBufDelay(80),
-      _playBufDelayFixed(80),
       _usingInputDeviceIndex(false),
       _usingOutputDeviceIndex(false),
       _inputDevice(AudioDeviceModule::kDefaultCommunicationDevice),
@@ -530,7 +527,6 @@
 
   _perfCounterFreq.QuadPart = 1;
   _perfCounterFactor = 0.0;
-  _avgCPULoad = 0.0;
 
   // list of number of channels to use on recording side
   _recChannelsPrioList[0] = 2;  // stereo is prio 1
@@ -1084,23 +1080,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  SpeakerVolumeStepSize
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::SpeakerVolumeStepSize(uint16_t& stepSize) const
-{
-
-    if (!_speakerIsInitialized)
-    {
-        return -1;
-    }
-
-    stepSize = CORE_SPEAKER_VOLUME_STEP_SIZE;
-
-    return 0;
-}
-
-// ----------------------------------------------------------------------------
 //  SpeakerMuteIsAvailable
 // ----------------------------------------------------------------------------
 
@@ -1328,47 +1307,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  MicrophoneBoostIsAvailable
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::MicrophoneBoostIsAvailable(bool& available)
-{
-
-    available = false;
-    return 0;
-}
-
-// ----------------------------------------------------------------------------
-//  SetMicrophoneBoost
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::SetMicrophoneBoost(bool enable)
-{
-
-    if (!_microphoneIsInitialized)
-    {
-        return -1;
-    }
-
-    return -1;
-}
-
-// ----------------------------------------------------------------------------
-//  MicrophoneBoost
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::MicrophoneBoost(bool& enabled) const
-{
-
-    if (!_microphoneIsInitialized)
-    {
-        return -1;
-    }
-
-    return -1;
-}
-
-// ----------------------------------------------------------------------------
 //  StereoRecordingIsAvailable
 // ----------------------------------------------------------------------------
 
@@ -1651,23 +1589,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//  MicrophoneVolumeStepSize
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::MicrophoneVolumeStepSize(uint16_t& stepSize) const
-{
-
-    if (!_microphoneIsInitialized)
-    {
-        return -1;
-    }
-
-    stepSize = CORE_MICROPHONE_VOLUME_STEP_SIZE;
-
-    return 0;
-}
-
-// ----------------------------------------------------------------------------
 //  PlayoutDevices
 // ----------------------------------------------------------------------------
 
@@ -2827,8 +2748,6 @@
     }
     LOG(LS_VERBOSE) << "capture audio stream has now started...";
 
-    _avgCPULoad = 0.0f;
-    _playAcc = 0;
     _recording = true;
 
     return 0;
@@ -3141,58 +3060,6 @@
 {
     return (_playing);
 }
-// ----------------------------------------------------------------------------
-//  SetPlayoutBuffer
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::SetPlayoutBuffer(const AudioDeviceModule::BufferType type, uint16_t sizeMS)
-{
-
-    rtc::CritScope lock(&_critSect);
-
-    _playBufType = type;
-
-    if (type == AudioDeviceModule::kFixedBufferSize)
-    {
-        _playBufDelayFixed = sizeMS;
-    }
-
-    return 0;
-}
-
-// ----------------------------------------------------------------------------
-//  PlayoutBuffer
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::PlayoutBuffer(AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const
-{
-    rtc::CritScope lock(&_critSect);
-    type = _playBufType;
-
-    if (type == AudioDeviceModule::kFixedBufferSize)
-    {
-        sizeMS = _playBufDelayFixed;
-    }
-    else
-    {
-        // Use same value as for PlayoutDelay
-        sizeMS = static_cast<uint16_t>(_sndCardPlayDelay);
-    }
-
-    return 0;
-}
-
-// ----------------------------------------------------------------------------
-//  CPULoad
-// ----------------------------------------------------------------------------
-
-int32_t AudioDeviceWindowsCore::CPULoad(uint16_t& load) const
-{
-
-    load = static_cast<uint16_t> (100*_avgCPULoad);
-
-    return 0;
-}
 
 // ----------------------------------------------------------------------------
 //  PlayoutWarning
@@ -3388,10 +3255,6 @@
     HRESULT hr = S_OK;
     HANDLE hMmTask = NULL;
 
-    LARGE_INTEGER t1;
-    LARGE_INTEGER t2;
-    int32_t time(0);
-
     // Initialize COM as MTA in this thread.
     ScopedCOMInitializer comInit(ScopedCOMInitializer::kMTA);
     if (!comInit.succeeded()) {
@@ -3558,8 +3421,6 @@
                     _ptrRenderClient->GetBuffer(_playBlockSizeInFrames, &pData);
                 EXIT_ON_ERROR(hr);
 
-                QueryPerformanceCounter(&t1);    // measure time: START
-
                 if (_ptrAudioBuffer)
                 {
                   // Request data to be played out (#bytes =
@@ -3596,10 +3457,6 @@
                     nSamples = _ptrAudioBuffer->GetPlayoutData((int8_t*)pData);
                 }
 
-                QueryPerformanceCounter(&t2);    // measure time: STOP
-                time = (int)(t2.QuadPart-t1.QuadPart);
-                _playAcc += time;
-
                 DWORD dwFlags(0);
                 hr = _ptrRenderClient->ReleaseBuffer(_playBlockSizeInFrames,
                                                      dwFlags);
@@ -3878,8 +3735,6 @@
     HRESULT hr = S_OK;
 
     LARGE_INTEGER t1;
-    LARGE_INTEGER t2;
-    int32_t time(0);
 
     BYTE* syncBuffer = NULL;
     UINT32 syncBufIndex = 0;
@@ -4068,22 +3923,10 @@
 
                         _ptrAudioBuffer->SetTypingStatus(KeyPressed());
 
-                        QueryPerformanceCounter(&t1);    // measure time: START
-
                         _UnLock();  // release lock while making the callback
                         _ptrAudioBuffer->DeliverRecordedData();
                         _Lock();    // restore the lock
 
-                        QueryPerformanceCounter(&t2);    // measure time: STOP
-
-                        // Measure "average CPU load".
-                        // Basically what we do here is to measure how many percent of our 10ms period
-                        // is used for encoding and decoding. This value shuld be used as a warning indicator
-                        // only and not seen as an absolute value. Running at ~100% will lead to bad QoS.
-                        time = (int)(t2.QuadPart - t1.QuadPart);
-                        _avgCPULoad = (float)(_avgCPULoad*.99 + (time + _playAcc) / (double)(_perfCounterFreq.QuadPart));
-                        _playAcc = 0;
-
                         // Sanity check to ensure that essential states are not modified during the unlocked period
                         if (_ptrCaptureClient == NULL || _ptrClientIn == NULL)
                         {
diff --git a/webrtc/modules/audio_device/win/audio_device_core_win.h b/webrtc/modules/audio_device/win/audio_device_core_win.h
index b95da22..34dfee6 100644
--- a/webrtc/modules/audio_device/win/audio_device_core_win.h
+++ b/webrtc/modules/audio_device/win/audio_device_core_win.h
@@ -145,7 +145,6 @@
     virtual int32_t SpeakerVolume(uint32_t& volume) const;
     virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
     virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const;
-    virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
 
     // Microphone volume controls
     virtual int32_t MicrophoneVolumeIsAvailable(bool& available);
@@ -153,7 +152,6 @@
     virtual int32_t MicrophoneVolume(uint32_t& volume) const;
     virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
     virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
-    virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
 
     // Speaker mute control
     virtual int32_t SpeakerMuteIsAvailable(bool& available);
@@ -165,11 +163,6 @@
     virtual int32_t SetMicrophoneMute(bool enable);
     virtual int32_t MicrophoneMute(bool& enabled) const;
 
-    // Microphone boost control
-    virtual int32_t MicrophoneBoostIsAvailable(bool& available);
-    virtual int32_t SetMicrophoneBoost(bool enable);
-    virtual int32_t MicrophoneBoost(bool& enabled) const;
-
     // Stereo support
     virtual int32_t StereoPlayoutIsAvailable(bool& available);
     virtual int32_t SetStereoPlayout(bool enable);
@@ -179,14 +172,9 @@
     virtual int32_t StereoRecording(bool& enabled) const;
 
     // Delay information and control
-    virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type, uint16_t sizeMS);
-    virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type, uint16_t& sizeMS) const;
     virtual int32_t PlayoutDelay(uint16_t& delayMS) const;
     virtual int32_t RecordingDelay(uint16_t& delayMS) const;
 
-    // CPU load
-    virtual int32_t CPULoad(uint16_t& load) const;
-
     virtual int32_t EnableBuiltInAEC(bool enable);
 
 public:
@@ -312,7 +300,6 @@
     uint32_t                          _playChannels;
     uint32_t                          _sndCardPlayDelay;
     UINT64                                  _writtenSamples;
-    LONGLONG                                _playAcc;
 
     UINT                                    _recAudioFrameSize;
     uint32_t                          _recSampleRate;
@@ -326,7 +313,6 @@
 
     LARGE_INTEGER                           _perfCounterFreq;
     double                                  _perfCounterFactor;
-    float                                   _avgCPULoad;
 
 private:
     bool                                    _initialized;
@@ -351,9 +337,7 @@
     uint16_t                          _recWarning;
     uint16_t                          _recError;
 
-    AudioDeviceModule::BufferType           _playBufType;
     uint16_t                          _playBufDelay;
-    uint16_t                          _playBufDelayFixed;
 
     uint16_t                          _newMicLevel;
 
diff --git a/webrtc/pc/test/fakeaudiocapturemodule.cc b/webrtc/pc/test/fakeaudiocapturemodule.cc
index c1ac489..0d367cb 100644
--- a/webrtc/pc/test/fakeaudiocapturemodule.cc
+++ b/webrtc/pc/test/fakeaudiocapturemodule.cc
@@ -323,12 +323,6 @@
   return 0;
 }
 
-int32_t FakeAudioCaptureModule::SpeakerVolumeStepSize(
-    uint16_t* /*step_size*/) const {
-  RTC_NOTREACHED();
-  return 0;
-}
-
 int32_t FakeAudioCaptureModule::MicrophoneVolumeIsAvailable(
     bool* /*available*/) {
   RTC_NOTREACHED();
@@ -359,12 +353,6 @@
   return 0;
 }
 
-int32_t FakeAudioCaptureModule::MicrophoneVolumeStepSize(
-    uint16_t* /*step_size*/) const {
-  RTC_NOTREACHED();
-  return 0;
-}
-
 int32_t FakeAudioCaptureModule::SpeakerMuteIsAvailable(bool* /*available*/) {
   RTC_NOTREACHED();
   return 0;
@@ -395,22 +383,6 @@
   return 0;
 }
 
-int32_t FakeAudioCaptureModule::MicrophoneBoostIsAvailable(
-    bool* /*available*/) {
-  RTC_NOTREACHED();
-  return 0;
-}
-
-int32_t FakeAudioCaptureModule::SetMicrophoneBoost(bool /*enable*/) {
-  RTC_NOTREACHED();
-  return 0;
-}
-
-int32_t FakeAudioCaptureModule::MicrophoneBoost(bool* /*enabled*/) const {
-  RTC_NOTREACHED();
-  return 0;
-}
-
 int32_t FakeAudioCaptureModule::StereoPlayoutIsAvailable(
     bool* available) const {
   // No recording device, just dropping audio. Stereo can be dropped just
@@ -467,18 +439,6 @@
   return 0;
 }
 
-int32_t FakeAudioCaptureModule::SetPlayoutBuffer(const BufferType /*type*/,
-                                                 uint16_t /*size_ms*/) {
-  RTC_NOTREACHED();
-  return 0;
-}
-
-int32_t FakeAudioCaptureModule::PlayoutBuffer(BufferType* /*type*/,
-                                              uint16_t* /*size_ms*/) const {
-  RTC_NOTREACHED();
-  return 0;
-}
-
 int32_t FakeAudioCaptureModule::PlayoutDelay(uint16_t* delay_ms) const {
   // No delay since audio frames are dropped.
   *delay_ms = 0;
@@ -490,33 +450,6 @@
   return 0;
 }
 
-int32_t FakeAudioCaptureModule::CPULoad(uint16_t* /*load*/) const {
-  RTC_NOTREACHED();
-  return 0;
-}
-
-int32_t FakeAudioCaptureModule::StartRawOutputFileRecording(
-    const char /*pcm_file_name_utf8*/[webrtc::kAdmMaxFileNameSize]) {
-  RTC_NOTREACHED();
-  return 0;
-}
-
-int32_t FakeAudioCaptureModule::StopRawOutputFileRecording() {
-  RTC_NOTREACHED();
-  return 0;
-}
-
-int32_t FakeAudioCaptureModule::StartRawInputFileRecording(
-    const char /*pcm_file_name_utf8*/[webrtc::kAdmMaxFileNameSize]) {
-  RTC_NOTREACHED();
-  return 0;
-}
-
-int32_t FakeAudioCaptureModule::StopRawInputFileRecording() {
-  RTC_NOTREACHED();
-  return 0;
-}
-
 int32_t FakeAudioCaptureModule::SetRecordingSampleRate(
     const uint32_t /*samples_per_sec*/) {
   RTC_NOTREACHED();
@@ -541,11 +474,6 @@
   return 0;
 }
 
-int32_t FakeAudioCaptureModule::ResetAudioDevice() {
-  RTC_NOTREACHED();
-  return 0;
-}
-
 int32_t FakeAudioCaptureModule::SetLoudspeakerStatus(bool /*enable*/) {
   RTC_NOTREACHED();
   return 0;
diff --git a/webrtc/pc/test/fakeaudiocapturemodule.h b/webrtc/pc/test/fakeaudiocapturemodule.h
index 1440821..91879b0 100644
--- a/webrtc/pc/test/fakeaudiocapturemodule.h
+++ b/webrtc/pc/test/fakeaudiocapturemodule.h
@@ -114,7 +114,6 @@
   int32_t SpeakerVolume(uint32_t* volume) const override;
   int32_t MaxSpeakerVolume(uint32_t* max_volume) const override;
   int32_t MinSpeakerVolume(uint32_t* min_volume) const override;
-  int32_t SpeakerVolumeStepSize(uint16_t* step_size) const override;
 
   int32_t MicrophoneVolumeIsAvailable(bool* available) override;
   int32_t SetMicrophoneVolume(uint32_t volume) override;
@@ -122,7 +121,6 @@
   int32_t MaxMicrophoneVolume(uint32_t* max_volume) const override;
 
   int32_t MinMicrophoneVolume(uint32_t* min_volume) const override;
-  int32_t MicrophoneVolumeStepSize(uint16_t* step_size) const override;
 
   int32_t SpeakerMuteIsAvailable(bool* available) override;
   int32_t SetSpeakerMute(bool enable) override;
@@ -132,10 +130,6 @@
   int32_t SetMicrophoneMute(bool enable) override;
   int32_t MicrophoneMute(bool* enabled) const override;
 
-  int32_t MicrophoneBoostIsAvailable(bool* available) override;
-  int32_t SetMicrophoneBoost(bool enable) override;
-  int32_t MicrophoneBoost(bool* enabled) const override;
-
   int32_t StereoPlayoutIsAvailable(bool* available) const override;
   int32_t SetStereoPlayout(bool enable) override;
   int32_t StereoPlayout(bool* enabled) const override;
@@ -145,27 +139,14 @@
   int32_t SetRecordingChannel(const ChannelType channel) override;
   int32_t RecordingChannel(ChannelType* channel) const override;
 
-  int32_t SetPlayoutBuffer(const BufferType type,
-                           uint16_t size_ms = 0) override;
-  int32_t PlayoutBuffer(BufferType* type, uint16_t* size_ms) const override;
   int32_t PlayoutDelay(uint16_t* delay_ms) const override;
   int32_t RecordingDelay(uint16_t* delay_ms) const override;
 
-  int32_t CPULoad(uint16_t* load) const override;
-
-  int32_t StartRawOutputFileRecording(
-      const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override;
-  int32_t StopRawOutputFileRecording() override;
-  int32_t StartRawInputFileRecording(
-      const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override;
-  int32_t StopRawInputFileRecording() override;
-
   int32_t SetRecordingSampleRate(const uint32_t samples_per_sec) override;
   int32_t RecordingSampleRate(uint32_t* samples_per_sec) const override;
   int32_t SetPlayoutSampleRate(const uint32_t samples_per_sec) override;
   int32_t PlayoutSampleRate(uint32_t* samples_per_sec) const override;
 
-  int32_t ResetAudioDevice() override;
   int32_t SetLoudspeakerStatus(bool enable) override;
   int32_t GetLoudspeakerStatus(bool* enabled) const override;
   bool BuiltInAECIsAvailable() const override { return false; }
