Audio Policy: Parametrize encoded formats supported by device
For various reasons, we need to store the list of audio
formats supported by devices. Here we add support for this
into DeviceDescriptor. We don't read them yet from
the APM config file, but we will eventually.
Also in this change, use the formats list for parametrizing
the behavior of surround sound configuration. The special
logic for AC3 and IEC69137 formats used to be hardcoded
into 'filterSurroundFormats' function, now it is
parametrized by the device descriptor information.
Fix behavior of 'filterSurroundFormats' in 'manual'
mode, where it was removing PCM formats from the list.
Rename 'filterSurround...' functions to 'modifySurround...'
since they can both add and remove items from the provided
list.
Bug: 67479735
Bug: 117602867
Test: compare A/B APM dumps while modifying Surround Sound
settings; tested with a HDMI sink that doesn't support
any surround, and with an AV receiver
Change-Id: Ie46480d5e9519366b1f3553645c9ca20f64bdc80
4 files changed