post_proc: Enable effects param in DSP to start effect

-During switch to tunnel playback, offload effects-flags remain
disabled. This stops effects being applied on tunnel playback.
-Send effects enable params to DSP to start effects during switch.

Change-Id: Ibe1e50b41ca25b51537e4a0ad80dbd5184379133
CRs-Fixed: 593509
hal: Send device based parameters for DAP and DDP

Send device based parameters for DAP and DDP

Change-Id: I2cb977a573a3065f121d7aa096355ebda15f5948
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
Merge "post_proc: Enable effects param in DSP to start effect"
hal: Add static internal function at the top of the file

-Add check_and_set_gapless_mode and get_offload_buffer_size functions
 at the begining of hal file.

Change-Id: I134dffac4aa81ed52fc6a2668cb53fbda60103ca
hal: Reduce the deep buffer period count.

-Deep buffer period count in the driver is 8. This adds to latency
 of 160ms. This also results in the common block to have 8 buffers.
-The total latency used for AV sync is 320ms. AV sync issues are
 seen due to this big latency
-Reduce the deep buffer cound from 8 to 4. This would reduce the
 latency.

CRs-Fixed: 598792
Change-Id: I1c057ee9d7c8a8cb747661e3dc62c9f44bf9ee79
hal : Send drain to the driver if next track returns error

-Partial drain is send to the driver after next track ioctl.
-If next track times out or returns any error then call drain.
-Partial drain will not  be executed if next track fails.

CRs-Fixed: 594977
Change-Id: I0665f21a5ea01f7776408b5155344f542021c299
post_proc: disable adsp reverb when preset is 'None'

Audio HAL set corresponding preset id into adsp, but doesn't disabe
reverb explicitly when 'None' preset is chosen. However, preset=0
means custom preset in adsp, so adsp won't stop reverb processing.

Change-Id: I0c42dd13c09579a6bd3bef2141b857477ec65f2e
CRs-Fixed: 604982
Merge "hal: Send device based parameters for DAP and DDP"
Merge "hal: Add static internal function at the top of the file"
Merge "hal: Reduce the deep buffer period count."
Merge "hal : Send drain to the driver if next track returns error"
Merge "post_proc: disable adsp reverb when preset is 'None'"
hal: avoid audio rerouting to different device when hfp is active

 - when hfp is active we make sure we do not reroute anything
   new to different device with same backend.

CRs-Fixed: 592390
Change-Id: I75e69916a8fe7e711b326cf82b206e3e16508b60
hal: add input source check to open compress voip input

Compress voip input requires input source type to be of
AUDIO_SOURCE_VOICE_COMMUNICATION. Move the opening of compress
voip input to in_set_parameters() function which is the first
place in HAL where the source type information is available.

Change-Id: I3758eba6049ccd4f1a4465ef264420d9afb6a795
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
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
Merge "hal: Fix input device selection for stereo recording"
policy_hal: Correct device selection in STRATEGY_ENFORCED_AUDIBLE

- When strategy is STRATEGY_ENFORCED_AUDIBLE, do not select
  unsupported combo devices Proxy+Speaker, HDMI+Speaker,
  and FM_TX + Speaker.

Change-Id: Icd4f6de74807a6efc5f6eb8258c020ad990aaf9b
Crs-fixed: 600799
Merge "audio: update the vifeedback pcm device id"