summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/fsl/fsl_dsp_xaf_api.c8
-rw-r--r--sound/soc/fsl/fsl_dsp_xaf_api.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_dsp_xaf_api.c b/sound/soc/fsl/fsl_dsp_xaf_api.c
index e7c71d33aaf8..2befc7c144b0 100644
--- a/sound/soc/fsl/fsl_dsp_xaf_api.c
+++ b/sound/soc/fsl/fsl_dsp_xaf_api.c
@@ -178,7 +178,7 @@ int xaf_comp_create(struct xf_client *client, struct xf_proxy *proxy,
char lib_wrap_path[200];
struct xf_handle *p_handle;
struct xf_buffer *buf;
- int ret = 0;
+ int ret = 0, size;
bool loadlib = true;
memset((void *)p_comp, 0, sizeof(struct xaf_comp));
@@ -247,7 +247,11 @@ int xaf_comp_create(struct xf_client *client, struct xf_proxy *proxy,
}
/* ...allocate input buffer */
- ret = xf_pool_alloc(client, proxy, 1, INBUF_SIZE,
+ if (dsp_priv->dsp_is_lpa)
+ size = INBUF_SIZE_LPA;
+ else
+ size = INBUF_SIZE;
+ ret = xf_pool_alloc(client, proxy, 1, size,
XF_POOL_INPUT, &p_comp->inpool);
if (ret) {
dev_err(dsp_priv->dev, "alloc input buf error\n");
diff --git a/sound/soc/fsl/fsl_dsp_xaf_api.h b/sound/soc/fsl/fsl_dsp_xaf_api.h
index 09aa5c043e1f..051a943f29e4 100644
--- a/sound/soc/fsl/fsl_dsp_xaf_api.h
+++ b/sound/soc/fsl/fsl_dsp_xaf_api.h
@@ -18,6 +18,9 @@
/* ...number of max input buffers */
#define INBUF_SIZE 4096
+/* ...buffer size of the buffer shared between A core and DSP. Use large */
+/* ...to let A core suspend longer time to save power.*/
+#define INBUF_SIZE_LPA 65536
#define OUTBUF_SIZE 16384
struct xaf_pipeline;