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
wifi: remove local nl80211 header

* Sync with omapzoom d-jb-mr2.1-release

Change-Id: I89cb2c3bdf667f38ff4c94c164cdfb3d750478e2
audio_policy: Prevent dumping string NULL termination

Change-Id: Ia2e08de45a5e4880c9547a5cf8f93e72d4dd6baa
policy: Offload enhancements

 * Port changes from audio-caf to the generic HAL to bring
   support for these features to more devices.

Change-Id: I74ff10dd7574498654d4771a74285e0875dd8580
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
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
audio: primary desc check for sonification

- Audio glitches on alarm expiry if alarm starts
  on screen lock/standby mode

- On alarm expiry alarm tone will start play on combo device
  &screen unlock tone try to play on headset which results
  multiple device switch, as a result audio glitches are audible

- If sonfication strategy is used by primary desc , we will
  treat all non music streams with sonfication stragey which
  will avoid device switch

Change-Id: Id7d8dfa75f8d881549d57f01e3bb1025135d4b2c
CRs-Fixed: 514467
CRs-Fixed: 657274
uevent: Allow multiple uevent listeners from the same process

The netlink socket created by uevent_init sets the nl_pid to the
current PID. nl_pid must be unique per-process, however it does not
have to do with the PID. From the documentation:

"
For a user-space process, nl_pid
is usually the PID of the process owning the destination socket.
However, nl_pid identifies a netlink socket, not a process.  If a
process owns several netlink sockets, then nl_pid can be equal to the
process ID only for at most one socket.
"

In use cases where a single process calls uevent_init more than one
time, the second one will always fail. This patch sets the nl_pid
to 0, which lets the kernel pick its own unique identifier as per the
documentation:

"
If the application sets it to 0, the kernel takes
care of assigning it.  The kernel assigns the process ID to the first
netlink socket the process opens and assigns a unique nl_pid to every
netlink socket that the process subsequently creates.
"

The behavior stays the same for the first socket but will also succeed
in subsequent calls.

Change-Id: I6fa74adc9d5835ff39b86187799998111fc12001
wifi: Add log message if we fail to read the wifi type.

Change-Id: Ia02d754e42608a1a895b2df07dc5bd1842473779
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
wifi: Add semco3rd and wisol for BCM4354.

Change-Id: Icaf3884c2565587358fb59827985feb68992b771
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>