postproc: Add exceptions for USB digital out

Change-Id: Idc7f926d31e855ea67dedfb579a9757316e3f526
audio: Disabled excessive logging in OMX AACEncoder

- Too many debug logs are enabled in AAC Encoder by default
- Fix is to disable all the logs except the error messages
  and logs indicating loading and unloading of the encoder

Change-Id: If4b37fb654b1c70796bfdc1c839839fab3ea20dc
CRs-Fixed: 619677
hal: update csd soft volume and mute controls

Update csd volume and mute controls with new apis which
takes ramp duration as a parameter. Set default mute
ramp duration to 20 ms.

Change-Id: Id8dcbc9bc12ac4e9c56962abc58b6bd1de0530a7
hal: fix listen and audio calibration concurency

- ACDB loader is maintaining the same calibration buffers
for both listen and audio. So there is a possibility that
the audio calibration buffers may be overwritten with listen
calibration soon after notifying the device busy state to
listen hal
- Avoid this issue by notifying listen hal before sending the
audio calibration so that listen hal can complete pushing its
calibration

Change-Id: I4d954b1287b59ee4e1510707db25f466d14dca97
hal: fix to handle voip issue when input stream starts first

- adev_open_output_stream() fails if the use case is already enabled.
Because of this, in case of VoIP, when the input stream is created
and started before creating Audio Track, then the output stream
creation fails.

- Fix this issue by giving exception for VoIP use case.

Change-Id: I5e7329d64075a09b99e5760a9050ace8c62a4e87
CRs-fixed: 651761
 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: Idfa37478fa19cd5a1c75c7e1d2f77b4dc02b311a
hal: Ensure all the mutexes are initialized

- Ensure all the mutex locks are initialized before using them,
  to avoid native crashes.

Change-Id: I7b6253f1d08a36a24d366d69004ce969d73c13e1
CRs-Fixed: 654375
hal: fix BT device switch issue for audio playback during VoIP call

- When VoIP call is active on non-BT device and if the music playback
tries to switch to BT device, it will continue to route to non-BT
device on which the VoIP call is active already.
- Fix the issue by not selecting VoIP devices for audio playback when
they are on different back ends.

Change-Id: Iff9251fcf02f897d9b1cdc17fcf27c262518ada8
CRs-fixed: 652129
policy_hal: remove VGS check for BT volume

-Currently voice volume is forced to MAX when VGS is set for BT.
 But VGS parameter is not used anymore in BT stack so it never
 set the value.
-Removed VGS check as this is deprecated and keep the behavior
 same as default policy.

Change-Id: I69de60987835cc7bfbf26e6b89eb39447423fd9d
  hal: Fix device disable/enable sequence

  In Skype call, observed no rx data when headset is inserted
  during call.

  During device switch from handset to headset, audio HAL is
  enabling the headset mixer controls first then disabling
  handset mixer controls leading to no audio during downlink
  as codec clock in 8916 is disabled due to the followed
  sequence.

  The current device switch logic doesn't make sure that all
  previous devices are disabled before enabling the selected
  devices. Fix this by changing the logic to disable all the
  previous devices first and enable the selected devices.

  CRs-Fixed: 648710

Change-Id: I0adfb62ea0ad8e2a2fe1a5473732e8bef61c492a
hal: Correct the V/I feedback PCM device for 8974

 * This got moved around after merging multisession Listen.

Change-Id: I3dcc1f1ccf1373819dcbfa296dcf781f66bae9af
Merge pull request #2 from CyanogenMod/cm-11.0

cm-11.0