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
audio: Fix check for sonification on digital docks

Change-Id: If077bc6336ce57256dd078d0cbe80c3b5e3a0b6e
Revert "audio: Fix check for sonification on digital docks"

This reverts commit 7a133590ff567fe09b7f415371c78480d39a83e7.

Change-Id: I27968a26e755e85d4d0c150278bf7988cc86f4e6
audio: Handle sonification for last stream in stopOutput

-Low visibility stream is not muted during voice call when
played back to back.
-In startOutput, handleInCallSonification is called only for
first time i.e. mRefCount is 1. While in stopOutput, it is
called without any check on refCount.
So the second notification stream gets played when stopOutput
of first stream unmutes the muted stream.
-Handle sonification while in call only for last stream in
stopOutput i.e. mRefCount is 0.

CRs-Fixed: 645543
Change-Id: I73727c3cc39e7ceecfbc961c3accb109cd013d96
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
 Audio: Fix for audio loss on switching between speaker and USB headset

 - snd device reference count is not decremented when usb headset is
   unplugged, because touch tone is still active on usb headset.
   So when usb is plugged again device routing is not triggered as
   present and prev devices are same
 - Fix is to route audio to speaker as soon as usb headset is
   disconnected

   CRs-Fixed: 630425

Change-Id: Id07bc44a39f72f33b39fd180efd1859de63650e5
wlan: Fix for improper comparison of driver_status string

This commit ensures driver load failure status is compared with
valid string which has the failure/success information.

Change-Id: I3b619ad0c005fb793d127bd2a23b376ed961d0b7
CRs-Fixed: 652539
Revert "audio: Handle sonification for last stream in stopOutput"

 * Weird voodoo here. Will revisit.

This reverts commit faa89e38febf7a542ff3d414fc8bc7827f43de57.
audio: improve logging.

- log msgs showing device switches
- log msgs shoing open/close of input/output streams

Change-Id: Ic6fbedc4b48db72bf2cf8af38ade0e3e80243640
audio: Increased mute wait for USB Playback

- Sometimes, when touch tones are played over USB Headset
  glitch is heard. This issue is seen when startOuput
  is called for touch tone after the device goes into
  standby

- Fix is to increase the mute wait during starting of the
  output to give additional time for the proxy device to
  come up

CRs-Fixed: 615405

Change-Id: I37b772582058ec6939ca13067a31360a4de9784b
Audio: Add new format and property for PCM offload

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

Change-Id: I8dcc2e35e1c8635a5b8f6f8de15167a40b842767
audio: New audio format for FLAC

- Add string to enum conversion for new audio format
  FLAC

Change-Id: Ie49170947a6524aa7412855106d666b467104a93
audio: Handle sonification for last stream in stopOutput

-Low visibility stream is not muted during voice call when
played back to back.
-In startOutput, handleInCallSonification is called only for
first time i.e. mRefCount is 1. While in stopOutput, it is
called without any check on refCount.
This causes second notification stream to be played when
stopOutput of first stream unmutes the muted stream.
-Handle sonification while in call only for last stream in
stopOutput i.e. only if mRefCount is 1.

CRs-Fixed: 663101
Change-Id: If6cbf24aa814a115c98358883794a7c92aec0c86
audio_policy: Fix for audio routing speaker though BT is connected

- Speaker device is selected by getDeviceForStrategy() though BT is
  connected as mA2dpSuspended is still remaining as 'true' even
  after ending the voice call.
- This flasg is not updated by checkA2dpSuspend() as force usage
  for communication and record is still FORCE_BT_SCO after ending
  voice call.
- Modified condition check to set mA2dpSuspended to 'false' as soon
  as phone state is changed to MODE_NORMAL
  porting from change:Ib3a67268be33a10c6bcdf6437868990a92a06c2f

Change-Id: I86ebb66cd165e8009bfa6193d2ad9ab383996283
CRs-Fixed: 671810
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_hardware_libhardware_legacy into HEAD