async: introduce 'async_domain' type

This is in preparation for teaching async_synchronize_full() to sync all
pending async work, and not just on the async_running domain.  This
conversion is functionally equivalent, just embedding the existing list
in a new async_domain type.

The .registered attribute is used in a later patch to distinguish
between domains that want to be flushed by async_synchronize_full()
versus those that only expect async_synchronize_{full|cookie}_domain to
be used for flushing.

[jejb: add async.h to scsi_priv.h for struct async_domain]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: Cold start latency reduction

This patch parallelizes FE (front end) and BE (back end)
when playback/capture path is set up. FE's and BE's which can
be parallelized should be indicated in corresponding machine file.
All the operations can be started asynchronously provided the usecase
supports asynchronous operation.
Parallelizing reduces the startup latency as both FE and BE opeations
run in parallel.

Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm8974: Machine driver async ops change

Asoc framework supports parallelization of operations
which reduces the startup latency. Machine driver will
specify which usecases support parallelization. This
change updates the machine driver to enable the parallelization.

Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: move hw_params into prepare

Asoc framework supports parallelization of operations
which reduces the startup latency.
Moving hw_params into prepare further reduces this start
up latency.

Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: Add MP2 decode support in compress driver

Add MP2 decoder support to ALSA compressed driver. It
allows user-space application to play MP2 audio data through
QDSP6.

Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: Add support for WMA DSP decode

WMA V9 and WMA Pro tunnel-mode supports are added to
compressed driver. It allows user-space application to
decode WMA V9 and WMA Pro audio stream through QDSP6.

Signed-off-by: Manish Dewangan <manish@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: Fix wma pro block alignment parameter

The current code assigns and sends the wrong block
alignment information to the adsp because of which wma pro
playback fails. The fix assigns the correct block alignment
information for wma pro.

Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: qdsp6: Add MP2 decoder format support

New ASM message format is added to support tunnel-mode MP2
decoder through QDSP6.

Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: Update pcm media format block to use correct stream id

Repeat mode is not working in pcm offload path. When two streams
are used in a single session pcm format block should be sent
specific to each stream. Data sent on stream 2 is ignored by DSP
because pcm format block is always sent on stream 1. Fix is to
update pcm media format block to use correct stream id before
data is sent to DSP.

Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: qdsp: fix aac encoder configuration validation

Unsupported encoder configuration was getting forwarded to
DSP causing encode failure at latter stage.
Corrected encoder validation logic which would throw
error for unsupported configuration values and would use
default conf in such cases, preventing failure at latter
stage where error from dsp cannot be handled gracefully.
Also updated userspace to driver format mapping.

Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>