audio: fix output flag test in open_output_stream

If flag AUDIO_OUTPUT_FLAG_DIRECT is set, we should only
try to open a multi channel HDMI PCM output if flag
AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD is not set.

Bug: 8174410.
Change-Id: I63fe6cabca590e70c077dea13c86c6948700e606
merge in klp-release (no-op)
hal: Fix for Audio Route issue when sound path changes

- if you make an outgoing call as mp3 playback is runnign with headset,
  Right side of headset is not functional when keep changing sound path
  from headset to speaker
- Fix the issue by separating loop related of disable/enable_snd_device

Bug: 11232052
Change-Id: Id02a6d7221c77cf4003d97749d75a062d8575d02
Merge "audio: fix output flag test in open_output_stream" into klp-dev
hal: Fix voice calls starting on speaker unintendedly

If setParameters(vsid, callstate) call is processed before
setparameter(routing), voice calls will be started on speaker.
Fix by not starting voice calls by checking if the primary output
device is speaker.

Change-Id: If3ecb83bbcb02d5da40d66340276263413adabc9
hal: Fix the audio loss issue on codec back end

- Start music playback, plug in and plug out headset and press
  'Next' button in the Music app immediately. Repeating these steps
  result complete loss of audio on HW codec.
- When headset is pluged out and Next is pressed immediately, the
  audio HAL triggers audio routing change from Headset to Speaker,
  and closure of compress playback driver. The later is not lock
  protected which result un protected access of back end information
  in the ALSA framework. This leads to incorrect routing and hence
  loss of audio. It is also observed that sometimes it could lead
  to crash in kernel and phone reboots.
- Fix by ensuring that the kernel driver close is also lock protected
  along with other routing events.

Bug: 11088400
Change-Id: I785effb09e5cef7ba20ee43e0ef91dc296d4e58a
alsa_sound: Fix a memory leak

A pointer variable was not being freed up which is
causing memory leak.
This change is to fix the same.

Change-Id: I12728a4a75fb303d34d10657fe9cbc1b55c1687e
CRs-Fixed: 523572
hal: Add the correct pcm device for compress capture.

The dai-link id is 20 for compress capture on 8x26. Add the correct id
for 8x26.

Change-Id: Ie41b2c039816a6014ac32af4f191c2e3aaad37a1
hal: Add audio support for 8092

- Add support for OMX audio encoder components for mpq8092.

Change-Id: I7a652581fd48fc22c025193d2c825b6e747edcfe
hal: In-call recording and In-call music support on APQ targets

-In-call recording feature support is added in APQ.
-In-call music delivery support is added in APQ.

Change-Id: Id473eac87da33f1f566b6910ec1feadcd3f08317
Update copyright to The Linux Foundation

Change-Id: Ibaced495ccbe2ef8b53e7d5101dfe59855b5476b
hal: update devices for APQ8084 cdp and liquid

APQ8084 CDP and Liquid might use a different set of devices
compared to MTP device for the same use case. Update device
list to use the right set of mixer controls for use cases
for APQ8084 CDP and Liquid

Change-Id: Ia40c31bc6cd94155d2b6dcc966bf4524906ea687
hal: Added support for HFP

 - Added setparameter to be set from hfp app to enable
   and disable hfp session.
 - Implemeted start and stop hfp session which takes
   care of switching device and setting the session

Change-Id: Ie8697328ccbfee09d0d162f6fad01ddb552e4f83
hal: fix channel mask for m-ch offload playback

- Update channel mask with compress parameters for
  compress offload playback on HDMI device

Change-Id: I89263f56923588fcb906facfd4ae9ebf95203743
Merge "hal: Add the correct pcm device for compress capture."
Merge "hal: In-call recording and In-call music support on APQ targets"
audio: avoid muting already muted stream

-Issue: FM or music is getting mixed with ringtone over the
 speaker when BT or wired HS is connected. Because the stream will
 not get temporarily muted if its already muted.But during unmute,
 there is no condition to check whether stream is temporarily muted
 or not.This is leading to unmuting of non-muted stream
-Fix is added to avoid muting of stream if its already
 muted

CRs-Fixed: 574271
Change-Id: I6b4962f402b87781846e37aed1872a639d06f488
Initial mpq8092 HAL upload

Initial mpq8092 HAL upload

Depends-on: 531569 531557
Change-Id: Ic130ab0a5ae2ffee09d98b7ca2c3ee4374965466
audio: mpq: Move audio output activities to audio_stream_out

Move output activities to audio_stream_out, output activites on
mpq may involve multiple handles for a single hal session, and
needs elaborate handling.

Change-Id: I42b7e16cf316be89cbe22bd70b6c685d89f15f27
mpq8092: Add bitstream files

Add bitstream files

Change-Id: I002b2fe4249ffc28665b7efc80d9a5d7ad90ea74