MLK-17309-2: ASoC: fsl_hifi: use new way to realize multi-codec
authorWeiguang Kong <weiguang.kong@nxp.com>
Tue, 26 Dec 2017 10:57:27 +0000 (18:57 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:52:23 +0000 (14:52 -0500)
commitcafba6c6cb052056c2f78473652da1c414966df1
tree6ed0d56afeeb3b6f8c341e2fea34962ff7dccb1e
parent5d45961b302ab7287fa50b9abeb1243c302863b9
MLK-17309-2: ASoC: fsl_hifi: use new way to realize multi-codec

In current hifi driver, some resources are shared when multi
codec decodes together. When switching between multi-codec,
the hifi driver and framework need to save and restore the shared
resources,this will waster time and complicate the hifi driver.

So by distributing private resources for each codec to avoid
this problem. When the user space wants to enable a new codec,
it can send "HIFI4_CLIENT_REGISTER" command to hifi driver to apply
an available resource, the driver will send a client id to
user space. When the user space wants to release the resource,
it can send "HIFI4_CLIENT_UNREGISTER" command to hifi driver,
then the driver will mark this resource available.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
sound/soc/fsl/fsl_hifi4.c
sound/soc/fsl/fsl_hifi4.h