OSDN Git Service

audio policy: use new audio device representation
authorEric Laurent <elaurent@google.com>
Mon, 17 Mar 2014 19:00:47 +0000 (12:00 -0700)
committerEric Laurent <elaurent@google.com>
Wed, 26 Mar 2014 22:28:33 +0000 (15:28 -0700)
commit3a4311c68348f728558e87b5db67d47605783890
tree920ecdf2868176572b6770200d6e3314c5462dd7
parent172a7a965c21c29ee38c77d53d91780c7dca09bf
audio policy: use new audio device representation

Represent audio devices with more attributes than just the
type (audio_device_t).
This is in preparation for new routing APIs allowing
device selection based on more criteria than just the type
(address, channel mask...)
A new class DeviceDescriptor is created and used by functions
needing more information than just the device type.
Bit fields for available and supported input or output devices are
replaced by vectors of device descriptors.
Each available device is allocated a unique ID for future use.
Removed obsolete mA2dpDeviceAddress, mScoDeviceAddress and mUsbCardAndDevice
fields replaced by address stored in DeviceDescriptor.

Policy decisions like getDeviceForStrategy() are still based
only on the device type.

Change-Id: I5de3b3ffb12ff8dcfb746782ab1e6b15bf040d0c
services/audiopolicy/AudioPolicyManager.cpp
services/audiopolicy/AudioPolicyManager.h