hal: Use new acdb-loader init api

Use acdb_loader_init_v2 instead of acdb_loader_init_ACDB.
The new v2 api allows the codec name to be passed to
acdb-loader allowing the calibration files to be selected
based on the codec name.

Change-Id: Ib596111902b5e873fe9c770ced36dadd4d001232
hal: Fix input device selection for stereo recording

Only if the fluence type is dual mic or quad mic and the channel
count is 2, the dmic device is selected as input device.

Change-Id: I22f9d2f154e9b6348ef547ff68014b5e68ae7e5f
CRs-fixed: 599947
audio: update the vifeedback pcm device id

Due to changes in machine driver pcm device id has changed.
Change updates pcm device id for vifeedback usecase.

Change-Id: I75323f80b07fda9cf21d9aef09e4849d767c11b9
CRs-fixed: 602026
hal: fix a memeory leak caused by using str_parms_to_str()

str_parms_to_str() requires the caller to free() the
returned string. Free the memory pointed to by "str"
before overwriting the "str" with the new pointer which
is returned by strdup() function.

Change-Id: I602ae37cce684e0c62b0ec310080bb0cd675e35a
CRs-fixed: 608384
audio: Changes to support AV streaming in offload path

- Widevine sends ADTS data, set ADTS based on the parameter
- Set offload fragment size 2k for all video streaming

Change-Id: I4c2376408e2998354db583a9f54649476a880f01
Merge "hal: Use new acdb-loader init api"
Merge "audio: Changes to support AV streaming in offload path"
Merge "audio: update the vifeedback pcm device id"
Merge "hal: fix a memeory leak caused by using str_parms_to_str()"
Merge "hal: Fix input device selection for stereo recording"
Merge branch 'kk' of git://codeaurora.org/platform/hardware/qcom/audio into cm-11.0

Change-Id: Idd8552295ea37acd3bbb6a5c5ebce22ce708b66b
mm-audio: Add some guards around legacy libraries

Change-Id: Iae72ad211c3fede5508a57f5ca73fa394cfa7841
Revert "hal: Use new acdb-loader init api"

This reverts commit 490d347a424fc95dbe5974a1c9fc80404e19a2a5.

Change-Id: Ib40868052574323d581d67179ad78b877b6ab96f
mm-audio: Fix openmax encoder hang during flush

Flush issued by command thread should unblock the read/write calls
in openmax component.
There is race condition between input/output thread and command
thread in openmax component due to which read/write is not unblocked
which results in a hang.
This change makes command thread to issue multiple flush when it is
wait for ack to avoid a hang.

Change-Id: Ia4486f2e53f56a8413c2115b7f418b29b4bc54c5
CRs-fixed: 466764
 audio: Increase the period size for USB audio

 -During USB audio playback, breaks are heard .This is
  primarily due to overruns of USB buffer from the audio
  HAL.
 -By increasing the period size of USB buffer we are
  avoiding overruns .

  CRs-Fixed: 574897

Change-Id: I78fb1bd5d7201fe789a2fcc5090eb1555af408ea
audio: Add support for AUXPCM BT

Atheros BT chip uses AUXPCM instead of slimbus. Audio HAL has
to use different UCM files depending on whether it's
internal or external BT chip

Change-Id: If6580ea1608b9dc8bb24be58dd2c4d2bbc331f92
hal: Remove extra checks for proprietary features

 * If headers available, build it.

Change-Id: I31481e3e810706b6050f409e38c11620532f158a
hal: Minor usb stability fix

- Adding buffer of one byte for the strstr usecase to make
  the passed string is NULL terminated.

Change-Id: Ief8531e149b05f4020cb1338110bbfad4a74f7d0
Crs-fixed: 607454
Merge branch 'CyanogenMod/cm-11.0'