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: 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
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
wifi: check if supplicant is running before starting it

Wrong property was used to check if wpa_supplicant was running.
Fix this

Change-Id: I6a5bd7a3acae84f5ba4bba317d04191e0e59b2e7
Author: Jonathan DE CESCO <jonathan.de.cesco@intel.com>
Signed-off-by: Jonathan DE CESCO <jonathan.de.cesco@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 66748
Set the wifi mode