summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_dsp_xaf_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/fsl_dsp_xaf_api.c')
-rw-r--r--sound/soc/fsl/fsl_dsp_xaf_api.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_dsp_xaf_api.c b/sound/soc/fsl/fsl_dsp_xaf_api.c
index 2befc7c144b0..f721854ac67c 100644
--- a/sound/soc/fsl/fsl_dsp_xaf_api.c
+++ b/sound/soc/fsl/fsl_dsp_xaf_api.c
@@ -180,6 +180,7 @@ int xaf_comp_create(struct xf_client *client, struct xf_proxy *proxy,
struct xf_buffer *buf;
int ret = 0, size;
bool loadlib = true;
+ bool request_inbuf = true;
memset((void *)p_comp, 0, sizeof(struct xaf_comp));
@@ -190,9 +191,14 @@ int xaf_comp_create(struct xf_client *client, struct xf_proxy *proxy,
p_comp->comp_type = comp_type;
- if (comp_type == RENDER_ESAI || comp_type == RENDER_SAI)
+ /* No need to load library for PCM */
+ if (comp_type == RENDER_ESAI || comp_type == RENDER_SAI || comp_type == CODEC_PCM_DEC)
loadlib = false;
+ /* Need to allocate in buffer for PCM */
+ if (comp_type == RENDER_ESAI || comp_type == RENDER_SAI)
+ request_inbuf = false;
+
if (loadlib) {
p_comp->codec_lib.filename = lib_path;
p_comp->codec_wrap_lib.filename = lib_wrap_path;
@@ -200,6 +206,9 @@ int xaf_comp_create(struct xf_client *client, struct xf_proxy *proxy,
}
switch (comp_type) {
+ case CODEC_PCM_DEC:
+ p_comp->dec_id = "audio-decoder/pcm";
+ break;
case CODEC_MP3_DEC:
p_comp->dec_id = "audio-decoder/mp3";
strcat(lib_path, "lib_dsp_mp3_dec.so");
@@ -245,7 +254,9 @@ int xaf_comp_create(struct xf_client *client, struct xf_proxy *proxy,
dev_err(dsp_priv->dev, "load codec lib error\n");
goto err_codec_load;
}
+ }
+ if (request_inbuf) {
/* ...allocate input buffer */
if (dsp_priv->dsp_is_lpa)
size = INBUF_SIZE_LPA;