summaryrefslogtreecommitdiff
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorWalter Yang <yandongy@codeaurora.org>2015-03-05 14:14:42 +0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:11:09 -0700
commit110ad9d27a96477f5fb9940a3b17e89a6d3b1336 (patch)
treeb7167c867b849536513486e1d99c9da0995dad5f /include/sound/soc.h
parente9c2d518bee63b4cca6c31b0d38faab4fcf9265f (diff)
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 operations run in parallel. Change-Id: I17e7e1c3d406713cc728ec262cfe388f7251f7de Signed-off-by: Walter Yang <yandongy@codeaurora.org> Signed-off-by: Fred Oh <fred@codeaurora.org> Conflicts: include/sound/soc.h sound/soc/soc-compress.c sound/soc/soc-pcm.c
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index c51647e34221..8f57adfae53d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -22,6 +22,7 @@
#include <linux/kernel.h>
#include <linux/regmap.h>
#include <linux/log2.h>
+#include <linux/async.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/compress_driver.h>
@@ -975,6 +976,14 @@ struct snd_soc_platform {
struct snd_soc_component component;
};
+enum snd_soc_async_ops {
+ ASYNC_DPCM_SND_SOC_OPEN = 1 << 0,
+ ASYNC_DPCM_SND_SOC_CLOSE = 1 << 1,
+ ASYNC_DPCM_SND_SOC_PREPARE = 1 << 2,
+ ASYNC_DPCM_SND_SOC_HW_PARAMS = 1 << 3,
+ ASYNC_DPCM_SND_SOC_FREE = 1 << 4,
+};
+
struct snd_soc_dai_link {
/* config - must be set by machine driver */
const char *name; /* Codec name */
@@ -1066,6 +1075,9 @@ struct snd_soc_dai_link {
/* pmdown_time is ignored at stop */
unsigned int ignore_pmdown_time:1;
+
+ /* this value determines what all ops can be started asynchronously */
+ enum snd_soc_async_ops async_ops;
};
struct snd_soc_codec_conf {
@@ -1214,6 +1226,8 @@ struct snd_soc_pcm_runtime {
long pmdown_time;
unsigned char pop_wait:1;
+ /* err in case of ops failed */
+ int err_ops;
/* runtime devices */
struct snd_pcm *pcm;
struct snd_compr *compr;