Dolby:  Add support for Dolby UDC DD/DD+ Decoder

- Add Dolby system property support for devices
  in AudioPolicyManagerBase

Change-Id: I4b931827e1cbc505bdae3b67418f792ed562939c
Audio: Offload video/AV streaming only if property is set

- If the property av.streaming.offload.enable is not defined
  do not offload av streaming
- If the property av.offload.enable is not defined do not
  offload video

CRs-Fixed: 597114

Change-Id: Ibfc3618fa93dedc3201fa9fcbb1551c496b91307
Merge "Dolby:  Add support for Dolby UDC DD/DD+ Decoder"
Merge "Audio: Offload video/AV streaming only if property is set"
wifi: Add driver loading mechanism from system property

Since wlan.ko can't be changed to point to correct one at run time,
add the mechanism to check which driver needed to be loaded from
system property.

Change-Id: Ia06d475e010941dae022949c428fe3f8406217d4
Merge "wifi: Add driver loading mechanism from system property"
audio: Do not offload multi-channel AAC decoding

- Disable compress offload playback for multi-channel
  AAC format.

CRs-Fixed: 595625

Change-Id: I112cb6aea15bf7f955d5c2e5ab3446447e12526e
Merge "audio: Do not offload multi-channel AAC decoding"
Check for monitor_conn existence before accessing the same

Monitor_conn socket gets closed by wifistatemachine and thus
accessing the same in WiFiMonitor thread results in a crash.
Hence check for the same before accessing the same.

Change-Id: I15024fa5324187c6e8dbd483238bfbeea7c4c016
CRs-Fixed: 590655
Audio:  fix for HDMI audio device switch issue

- outputDesc->mDevice in setOutputDevice is not
  updated if requested device is 0. Device routing
  is not changed in some scenario since requested
  device is same as current device.
- Fix this issue by updating outputDesc->mDevice without
  checking if requested device is 0

Change-Id: If4f1845db0378b643392bec591cbd95fbe114634
CRs-Fixed: 606004
audio: Fix to update devices for all non-primary outputs

-Incorrect routing is observed, after call disconnection, due to
 devices not being updated for non-primary outputs.
-Update devices for non-primary outputs as well.

Change-Id: I424f980e3a26f57e7655b5fd10bb54e73cca3a57
CRs-Fixed: 592604
hardware/libhardware_legacy: Cleanup of Dolby integration code

Correct copyright dates
Remove de-selection of a code section when Dolby code is built

Change-Id: I71f33f0e3d0f04ecf407df2af3af95cb4c47102c
audio: update srcOutputs based on current outputs

- Issue: Direct outputs are also opened to query
  for dynamic parameters in checkOutputsForDevice
  and will be closed later by setDeviceConnectionState.
  There is a mismatch between srcOutputs and dstOutputs
  in checkOutputForStrategy which results in a temp
  mute while moving tracks from one output to another
- Fix this issue by updating srcOutputs based on mOutputs
  instead of mPreviousOutputs

Change-Id: Ie716e33606985ae93f31abbf8aac506c935840db
CRs-Fixed: 591339
Merge "Audio:  fix for HDMI audio device switch issue"
Revert "Audio:  fix for HDMI audio device switch issue"

This commit causes BT playback regression. Revert for now
and revisit later.
This reverts commit af03f13cf466bc07a8c56f580baf39776b4306f1.
Audio: Fix HDMI audio device switch issue

- Device routing is not triggered in the following scenario:
  Start playback on HDMI, pause it, unplug and plug the HDMI cable,
  resume playback, music starts on speaker.
- Fix by update outputDesc->mDevice even if the requested device is 0

Change-Id: I4d1c1f76094f4acb20acdb8af68302ea8a1008c5
CRs-Fixed: 606004
Merge "audio: Fix to update devices for all non-primary outputs"
Audio: Add new format and property for PCM offload

- Add string to enum method for PCM offload 16/24 bit
  formats

Change-Id: I8dcc2e35e1c8635a5b8f6f8de15167a40b842767
Merge "audio: update srcOutputs based on current outputs"
Merge "Check for monitor_conn existence before accessing the same"