policy_hal: remove unused function isVirtualInputDevice
- isVirtualInputDevice is a static member function and its implementation should be modified in base class only. - Remove isVirtualInputDevice in policy_hal and modify APM_AUDIO_IN_DEVICE_VIRTUAL_ALL in base class to support FM recording over A2DP headset. Change-Id: Ib0527cfdff170367491feb62b117815558e139e1 CRs-Fixed: 581377
This commit is contained in:
parent
a67109fdfe
commit
eeb9024bef
|
@ -27,9 +27,6 @@
|
|||
#define ALOGVV(a...) do { } while(0)
|
||||
#endif
|
||||
|
||||
// A device mask for all audio input devices that are considered "virtual" when evaluating
|
||||
// active inputs in getActiveInput()
|
||||
#define APM_AUDIO_IN_DEVICE_VIRTUAL_ALL AUDIO_DEVICE_IN_REMOTE_SUBMIX | AUDIO_DEVICE_IN_FM_RX_A2DP
|
||||
// A device mask for all audio output devices that are considered "remote" when evaluating
|
||||
// active output devices in isStreamActiveRemotely()
|
||||
#define APM_AUDIO_OUT_DEVICE_REMOTE_ALL AUDIO_DEVICE_OUT_REMOTE_SUBMIX
|
||||
|
@ -739,16 +736,6 @@ audio_devices_t AudioPolicyManager::getDeviceForInputSource(int inputSource)
|
|||
return device;
|
||||
}
|
||||
|
||||
bool AudioPolicyManager::isVirtualInputDevice(audio_devices_t device)
|
||||
{
|
||||
if ((device & AUDIO_DEVICE_BIT_IN) != 0) {
|
||||
device &= ~AUDIO_DEVICE_BIT_IN;
|
||||
if ((popcount(device) == 1) && ((device & ~APM_AUDIO_IN_DEVICE_VIRTUAL_ALL) == 0))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AudioPolicyManager::device_category AudioPolicyManager::getDeviceCategory(audio_devices_t device)
|
||||
{
|
||||
switch(getDeviceForVolume(device)) {
|
||||
|
|
|
@ -68,8 +68,6 @@ protected:
|
|||
// select input device corresponding to requested audio source
|
||||
virtual audio_devices_t getDeviceForInputSource(int inputSource);
|
||||
|
||||
static bool isVirtualInputDevice(audio_devices_t device);
|
||||
|
||||
// compute the actual volume for a given stream according to the requested index and a particular
|
||||
// device
|
||||
virtual float computeVolume(int stream, int index, audio_io_handle_t output, audio_devices_t device);
|
||||
|
|
Loading…
Reference in New Issue