audio: fix no audio when playing dtmf tones

AUDIO_OUTPUT_FLAG_DIRECT is passed for isCompatibleProfile()
which would match incall music profile even for regular dtmf
tones. As a result output stream for incall music case is
selected. Fix by passing the input parameter flags along
with AUDIO_OUTPUT_FLAG_DIRECT.

CRs-fixed: 568696
Change-Id: Ie5a11f21a01c65fb07e9ae1268cf03b6744f9f6e
libhardware_legacy: Add property for A-V playback in offload mode

Add a and check for property for enabline tunnel audio video
playback.

Change-Id: I8ebbfe106feac4a991de05a0db79ac64493d0129
audio: fix no audio playback issue in recorder app

When audio clips recorded using voice recorder app is played,
openoutput() in audio policy manager is called with flags 0 and
will match the incall music profile and try to open incall music
direct output stream. Fix by looking for direct output profiles
only when AUDIO_OUTPUT_FLAG_DIRECT is set in the flags.

Change-Id: I3f6fdec1dfdc4c7642d308108199369cfc6d2409

Conflicts:
	audio/AudioPolicyManagerBase.cpp
libhardware_legacy: Add ifdefs for non-QCOM hardware

Change-Id: Ic39f17d4626dc9970edf5c5466b3ccd6d16cbd3e

Conflicts:
	audio/AudioPolicyManagerBase.cpp

Conflicts:
	audio/AudioPolicyManagerBase.cpp
libhardware_legacy: Add support for oneshot WiFi setup

 * For a certain device, we need to wait for the RIL to dump out
   the NV items which contain the WiFi MAC address. This is
   done by starting a service and waiting for it to set a property
   indicating completion. The existing module loader already works
   like this, so we can just use that.
 * Reorder the ifdefs so this works when the driver is not built
   as a module.

Change-Id: Ic69dd5c1087122b3b7d939a8647785bf97b95a0c
audio: Disable sonification on digital USB outputs

 * We don't want to hear touch sounds on our badass USB DACs. Just
   play the damn music, please :)

Change-Id: I08b1c5d672d853fc7116c03cd77b8828881d3a5b
audio: fix offload enabling test parameter

passing NULL as the default to property_get doesn't return false,
it returns random memory junk that evaluates to true... Explicitly
default the state of this property to "false" as a default

Change-Id: Ib2808bf2540b2b4fdf754d489fb44aa5d9e061a8
audio: fix for multi-channel HDMI playback

- Overwrite playback flag to AUDIO_OUTPUT_FLAG_DIRECT
  for PCM_16_BIT multi-channel clips so that HDMI
  profile is used for playback.

Change-Id: Ibf295f506e6ec62ffbd79091361793c18213d494

Conflicts:
	audio/AudioPolicyManagerBase.cpp

Change-Id: Ibf295f506e6ec62ffbd79091361793c18213d494

Conflicts:
	audio/AudioPolicyManagerBase.cpp
libhardware: Fix merge damage which was breaking direct output

Change-Id: Ic247e590039c20ace09ed3a19f61e263b1410e96

Conflicts:
	audio/AudioPolicyManagerBase.cpp
audio: Do not allow Compress offload mode for AV streaming content

Add system property check to use compress offload mode or not for
audio+video streaming content.

Change-Id: I10aa22995d2d1320b41f58ff9bb2303787c9d40d
CRs-fixed: 587600
audio: Add support for DOLBY DD+ decoding

- Add DOLBY AC3/EAC3 format enums
- Use offload profile for DOLBY decoding
  regardless of duration

Change-Id: I2c9738fa34635304aeca8fb529dbe8c2aa5e528d
audio: Add support for compressed VoIP

Add changes needed to enable VoIP calls using compressed
audio formats.

Change-Id: I7ebdfa1c2cc9b97666c7d8392b5e6ebd9b477184
AudioPolicyManagerBase : MUTE_TIME_MS reduced to 500ms

 - Some streams are muted while the audio path
   is switched for different device switch like
   BT, Headset, AOS and HDMI etc. Audio drop is
   observed for more than 3-4 secs. So tuning
   this macro for better results.

Change-Id: I8bb0b6f5eb5e526b755fce97f31a3f8f6dd22064
CRs-fixed: 572654
libhardware_legacy: Clean up all the audio ifdefs

 * Remove duplicates and differentiate between legacy targets

Change-Id: Iad22875513846b16fa1e5d602d3fd4289d5fbde2
audio :Make isVirtualInputDevice as protected method

- startInput is overridden in AudioPolicyManagerALSA and is
  making a call to isVirtualInputDevice which is private in
  AudioPolicyManagerBase.
- Make isVirtualInputDevice as protected in base class so
  that it can be called from the derived class

Change-Id: I7e499b0c06f9412bc191179d497298cd57af2c3a
CRs-Fixed: 591788
wifi: remove p2p interface on supplicant stop

remove p2p interface on wpa_supplicant stop
so next time it is started it won't fail when trying
to create p2p again

Change-Id: I7a4c5e9a82a013afc75548d175d5850d67fcd927