Revert "audio: primary desc check for sonification"

 * Handled in libhardware_legacy now.

This reverts commit 01f7fcc7694b23b07c59de6c786ae5c3e715d212.
hal: Update BT sample rate for BT input device

-BT sample rate should be set before opening BT SCO output
 or input device. Currently it is set only for output device.
-Set sample rate for BT SCO input device also

Change-Id: I356557a727f5946ff3b4eb89ea16e4c16d84d21c
audio: use of audio_route_{apply/reset}_and_update_path APIs

1) Update enable/disable device and route to use the new APIs.
   With this change, mixer controls will be updated in the order
   listed in mixer paths XML file.
2) update_mixer is now an unused var.

Change-Id: Ic0a8874e4a2080347cfa0c2e66af606a08a207a7
CRs-Fixed: 581453
Revert "Revert "audio: primary desc check for sonification""

 * Voodoo. Sort this out later.

This reverts commit aef8ce5477cdf0c9117c8be7e9eb250326cad204.
hal: Set echo reference from mixer file

Set echo reference from mixer file.
Change-Id: I8b9d1209002ead0f82eb6052d41ab00ba41ce6a2
Revert "  hal: Fix device disable/enable sequence"

This reverts commit 8db53270733939a81e5fdda89de3c8c0eaf939e4.

Change-Id: Id6cf69819bc97bde73dbdcc007afe550b81668d1
hal: Correct PCM offload fragment size

- Correct the fragment size to use bytes instead of bits
  per sample
- Use 80ms as pcm offload buffer duration for video streaming
  usecases and 1 sec for video + audio usecases

Change-Id: Iec8e24c2b158368742a55710a46da94ce5d3c170
audio: Remove unused var 'update_mixer'

Remove update_mixer (as its unused) and change function
signatures wherever used.

Change-Id: I465ddc4bfeba714a7f0d14a7e319a3d1ddc62dbb
CRs-Fixed: 581453
Audiod: Priority change for AudioDaemon

- Device getting crash after preforming
  ADSP/LPASS SSR during compress playback

- Due to continous compress write calls
  to compress driver audio daemon not getting
  schduled which results system crash

- Change AudioDaemon priority from PRIORITY_AUDIO
  to PRIORITY_URGENT_AUDIO to make sure audio daemon
  scheduled prior to audio HAL

Change-Id: I0d7dff30908d4e1f727c1eb6af9e66ed74095148
hal: Fix VoIP Mute failure in SIP call during Voice call HOLD

- Unable to apply the mute in MT SIP call during Voice call
  in CALL_HOLD.
- Mute is only applied if the voice call state is INACTIVE.
  Thus when SIP call is made during Voice call in CALL_HOLD,
  the mute is not being reflected.
- Fix this issue by checking voice stream type to allow
  the mute to be applied.

Change-Id: I3af5225edd8e9a4123867b647de9405d5c4b9efc
CRs-Fixed: 642893
hal/usb: Add initial volume setting for USB headset

Some USB headsets start at 0 volume because of this even
if the Media Player volume is maximum cannot hear any audio.
Initialize device volume before starting the playback.

Change-Id: Ie6940fae6fd7946ce0a90a142aaf110d829eea8f
CRs-Fixed: 639168
hal: Add path for VR headset

 * Needed to keep Listen from derping.
 * Just point to regular headset device by default.

Change-Id: I64975c196fcb5f2b32d34d54ba01a0d73a90db4f