wifi: add a new "loading" state

Set wlan.driver.status to "loading" in wifi_load_driver to allow
external action being triggered by property change.

Change-Id: I72004b8b5bc711ea83cc7ae4b6a39382c05cb02f
libhardware_legacy: Add enums to support for FM and ANC features

- Added required AudioSystem enums to support FM and FM on A2DP
  features
- Also added support for ANC and FM Tx devices.

Change-Id: I2ec25f3b35d9ff6cd2e8a237eef439c8bcd10ddf
hardware/libhardware_legacy: Add interface function for LPA and FM

- New interface function prototypes are added for LPA and FM
  features

Change-Id: I1e7cb94668e2999b055acfa0c31652d5d1e719c1
libhardware_legacy: Add support for audio session

- Allow audio sessions to be opened and close
- This is required for LPA

Change-Id: Iff7192a0853dbb394b8c34962f5fbf70c9bfd6bb
libhardware_legacy: Add PolicyClient APIs for FM feature

- Added AudioPolicyClinet interface functions required for FM

Change-Id: I73f0cf6f5aca061f49e514c4a241aa6fbdc11252
audio_legacy: ignore screen_state=off/on parameter

Change-Id: I8b22f9e494bff1db84a493315a1c716d45f3bab6
power/power: Update Code for Logical and Physical Hotplug.

Change-Id: I577a92a2e8983b0e435eebaf21ac5a0c70448414
audio: Don't use QCOM_HARDWARE when AUDIO_LEGACY is active

The older (GB) blobs used with AUDIO_LEGACY do not support the
new enums.

Change-Id: I958e27fe02b79ef795fb767c4dd3f87f65378092
audio: Don't use QCOM_HARDWARE when AUDIO_LEGACY active (more)

This completes the work started in
commit b054def640e54999a3173d59624abbb2cf2ac8b4
    audio: Don't use QCOM_HARDWARE when AUDIO_LEGACY is active

    The older (GB) blobs used with AUDIO_LEGACY do not support the
    new enums.

Change-Id: Ieb9e78011b4b6cde43577dda03fd2c003beff052
extend LEGACY_AUDIO_COMPAT to undo QCOM_HARDWARE changes

some of the fm stuff doesnt hurt anything but its best to just leave
it out until the HAVE_FM_RADIO stuff is merged. Other defines like
those in AudioSystemLegacy.h does break audio

Change-Id: If6a69e712e7797edd64d69f6e34f68f19498f44f
hardware/libhardware_legacy: Use direct output for VoIP feature

- Added changes in AudioPolicyManagerBase to use direct output
  instead of hardware output for VoIP RX path

Change-Id: I7aa32970dacf1cf06856b51271f020df59186afe
libhardware_legacy: Send correct channel mask in voice call recording

-Channel mask getting over-written for input source in voice call
 recording case
-Sending correct channel mask now

Change-Id: I57159ec5a870eb10b1feb985909aea33b0bba8f7
libhardware_legacy: Use direct output only for voip call

Voip session is getting opened instead of recording session
for some applications as it selects direct output device.
Avoid this by adding a check so that direct output device
is elected only when phone state is set to voip call mode

(cherry picked from commit 7c3da2e8407c88dba52911359ef138dfb8f7224c)

Change-Id: I7ecf326b80a3a92d2107c55bad5f5a666beb5079
CRs-Fixed: 345217
add LEGACY_AUDIO_COMPAT to new ifdef's introduced in previous patches.

Change-Id: Ib61e2cb0b8156cca5c33e3ae8e5112901454a52c
wifi: Add AP specific API

This allow the use of a different kernel modules configuration when
initializing Hotspot.

wifi: allow dynamic override of module args

wlan.module.arg and wlan.ap.module.arg properties can be used to
dynamically override wifi and hotspot module parameters.

Change-Id: Iaae1a2db6dc7ee07a78f1f2718bdafc73528c4b1
ensure the driver is loaded before changing fw path

In some cases (like starting Wifi Direct), the kernel driver
may not yet be loaded. The driver must be loaded before we
can load new firmware. This change loads the kernel driver if
it has not already been laoded.

Change-Id: I4eb9dda725a5c61dcd323260f22dd1ace5c492a1
wifi: Choose correct nvram file on Samsung hardware

 * Samsung's US devices have at least three different Wi-Fi variations.
 * The kernel driver writes out the variant in /data/.cid.info
 * macloader will prime this file
 * Read the file and choose the correct nvram_net.txt

Change-Id: I0e6aec7b622b4b90d849e63928e0352d0d730d8a
wifi.c: allow devices to specify driver delay if needed

This appears to be needed on the Samsung exynos4 tablets in order to enable wifi within a reasonable amount of time.

Reference: http://review.android.git.linaro.org/1875

Change-Id: I4316ac03447870c04765427d202d9d35937c65f1
Upstream merge