diff options
author | Zhang Peng <peng.zhang_8@nxp.com> | 2020-04-01 18:26:29 +0800 |
---|---|---|
committer | Zhang Peng <peng.zhang_8@nxp.com> | 2020-04-07 12:48:18 +0800 |
commit | d235be4b28d4fa4ff4bd5e3e21d1c692ad800762 (patch) | |
tree | c3164f869a45fb4d9573e01e25ff404d56752658 /sound/soc/fsl/fsl_dsp_platform_compress.c | |
parent | 5e9570b387a7d8990096a38b40a84e286384ed2a (diff) |
MLK-23701-2 ASoc:fsl: Add support cplay in mp board
1. Add clk necessary in dsp driver
2. Add renderer type for select sai or esai
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dsp_platform_compress.c')
-rw-r--r-- | sound/soc/fsl/fsl_dsp_platform_compress.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/fsl/fsl_dsp_platform_compress.c b/sound/soc/fsl/fsl_dsp_platform_compress.c index 43b07af3cbfe..e6f95a065801 100644 --- a/sound/soc/fsl/fsl_dsp_platform_compress.c +++ b/sound/soc/fsl/fsl_dsp_platform_compress.c @@ -162,13 +162,16 @@ static int dsp_platform_compr_set_params(struct snd_compr_stream *cstream, drv->codec_type, ret); goto err_pool_alloc; } - + if (sysfs_streq(dsp_priv->audio_iface, "sai")) + drv->renderer_type = RENDER_SAI; + else + drv->renderer_type = RENDER_ESAI; ret = xaf_comp_create(drv->client, p_proxy, &drv->component[1], - RENDER_ESAI); + drv->renderer_type); if (ret) { dev_err(component->dev, "create component failed, type = %d, err = %d\n", - RENDER_ESAI, ret); + drv->renderer_type, ret); goto err_comp0_create; } @@ -178,14 +181,14 @@ static int dsp_platform_compr_set_params(struct snd_compr_stream *cstream, dev_err(component->dev, "add component failed, type = %d, err = %d\n", drv->codec_type, ret); - goto err_comp1_create; + goto err_comp0_create; } ret = xaf_comp_add(&drv->pipeline, &drv->component[1]); if (ret) { dev_err(component->dev, "add component failed, type = %d, err = %d\n", - drv->codec_type, ret); + drv->renderer_type, ret); goto err_comp1_create; } |