alsa : check for valid verb index

- Check for valid verb index before indexing into the use case list
- This is to prevent an invalid lookup with a verb_index value of -1

Change-Id: I4676bd0c9b00364c185e77120744b39d8a675acb
CRs-Fixed: 436857
audio: Add support for audio recording using EC

- Add Support for Echo cancellation with Fluence topolog
  when fluence option selection from QC settings and num
  channels equal to one
- with Fluence option selection from QC settings and num
  of channels selected from sound recording is greater
  than one, apply Audio Topology without EC.

CRs-fixed: 437475
Change-Id: I583eec7eeba6b1acb1d35e249c2a19229c364088
Update copyright to The Linux Foundation

Change-Id: I482b7fd6b5502b86ca095a1b7bce4f03c10c9304
audio: fix for audio recording

- Read SSR system prop only for surround
  sound recording use case.
- Change input buffer size for 8974 to 512 bytes

Change-Id: I70064769e92149cb6675a92018fb35533900e65f
 Fix for MT call ringtone on USB headset

- Issue:when usb headset connected MT call ringtone heard
  only on speaker and expected behaviour is ringtone should
  be heard on both speaker and usb headset.
- Fixed by defining combo device usb proxy rx speaker

Change-Id: I0474651ed6fa40636038dcd7b25c7962cecc7239
CRs-Fixed: 443227
audio: update device for all outputs in setPhoneState

- Change routing for all outputs is nessary in setPhoneState
  Update devices not only for primary outputs but also other
  outputs including direct, tunnel, HDMI and so on

Change-Id: I4861e67c8aab9e39f83386c27b9a9e167befd347
CRs-Fixed: 438651
alsa-sound: AudioSessionOut synchronization fixes

- Modify synchronization between AudioSink and EventThread
- Move the code block related to drain to a different function
- Reset EOS flags in write()
- Do not depend on the filled queue size to set mReachedEOS

Change-Id: Ie8cd7b9ff9cab495f236f2cfa9c68a9f3a204fe4
CRs-Fixed: 439892
alsa-sound : Fix a deadlock

- openOutputStream() deletes an object of type AudioSessionOut
  if the object initialization fails.
- This leads to a deadlock as the AudioSessionOut::reset() tries
  to acquire the same lock held by openOutputStream.
- Release the lock in openOutputStream before deleting the
  AudioSessionOut object.

Change-Id: If763eded702a59828ae51adfa4dca23749bd7300
CRs-Fixed: 442365
libalsa: Fix voip voice calibration issue

- check is added to send voice calibration for
  targets other than fusion, since acdb on APQ
  side is not used on fusion platform
- For Voip uses case, this check is breaking
  the functionality for applying acdb tuning
  parameters
- Fix the issue by allowing voice calibration
  for voip use case

CRs-fixed: 446557

Change-Id: I9662325a90b796fe0261f897920477ee8e709fc9