hal: Fix progress bar issue during compress offload playback

During MP3 (with no gapless meta data) playback in 'repeat one song'
mode observed that from second iteration onwards the progress
bar continues to increase beyond the clip duration.
At the end of second iteration the drain command is not reaching the
driver as the compress_set_gapless_metadata() is not called.
Fix the issue by ensuring that it gets called for every iteration.

Change-Id: If71c145c5a02c99ff55f528522f1f36e20ec8871
audio: Avoid mute during AFE PROXY Usecase

Silence data is getting written from in_read when voice
call is muted with USB Headset connected. This resulting
in muting Rx path too along with Tx path in this
scenario. USB Voice call scenario, PROXY_IN device is
responsible for reading RX data. So not supposed to be
muted.

Fix is to avoid muting if the current use case is AFE_PROXY

CRs-Fixed: 763152

Change-Id: I1fbd5545f343cbaea865e941214be05791dec14e
hal: bug fixes for PCM offload

When pcm offload is done, override the buffer size
that was calculated and use the value from the system property
Make write call blocking if small buffers are used in offload
Update latency value for pcm offload with small buffer hint based
on period size and period count.

Change-Id: Ic74caa6bd172c8e4554384e9fa98a5137117f07c
audio: Reject incall record request when call is not active

- If application selects AUDIO_SOURCE_VOICE_CALL when voice call is
  not active, audio HAL is selecting afe-proxy use case which is
  wrong. afe-proxy usecase/device expected to be selected during
  USB Voice call scenario only

- Fix is to fail opening the input stream with
  AUDIO_DEVICE_IN_TELEPHONY_RX or AUDIO_DEVICE_IN_VOICE_CALL if
  the call is not active

Change-Id: Iae2d25d192b3b5011dd45816778ffc03d3049449
Correction of dolby format name from EAC3 to E_AC3

Change-Id: I0222fd5b3d78261215c3fa8f4abff990a130d0de
hal: fix null pointer de-reference

When speaker protection is turned on input stream can be
NULL. Add a check to fix de-referencing NULL pointer.

Change-Id: I75647d9360a559b5255c29d0baca264b1274eba2
hal: Check for multiple offload usecases

While checking if a usecase is compressed offload, consider
concurrent multiple offload usecases

Change-Id: If01424137d4d5640e97ead58f151300a168f0912
platform-info: Fix error messages

Change-Id: I543d5c99e5c07e6acc43811608a1f5917d7d595f
audio-caf-msm8974: Fix log message

Change-Id: If1e161b55b587076f3baeb763792f1d29aca361b
platform-info: Fix fixing error messages...

I accidentally changed one too any messages in commit
I543d5c99e5c07e6acc43811608a1f5917d7d595f.

Change-Id: I24e725a011a0f3fb887b3b299d3dabe494f9b7af
Revert "hal: Add support for listen playback concurrency"

This reverts commit 27455110c99d038ff401752953e296f0af3b48c2.

Change-Id: Ia363f51a4c4de08a981ce0b40058d099e60671d8
audio-caf: msm8974: Correctly handle the lack of voice_extn

When building without

AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS:=true

the voice_extn functions return -ENOSYS when called.  Treat that
return code from the set_parameter functions as success rather
than failing the entire set_parameter sequence.

Prior to this change, adev_set_parameters does nothing when the
voice extensions are not compiled into the code because it
immediately calls voice_set_parameters which then itself immediately
fails due to -ENOSYS being returned from voice_extn_set_parameters.

Change-Id: I5b74f8a94325c26d9f24ba7bd85f5b21b5f1cbdf