diff options
author | Bing Song <bing.song@nxp.com> | 2020-08-12 10:22:04 +0800 |
---|---|---|
committer | Bing Song <bing.song@nxp.com> | 2020-08-14 16:48:50 +0800 |
commit | c731ea37eeb2390ebf91d5185ffb8860c86ffc34 (patch) | |
tree | 8fb6b891b8eb98a312d4fd939b323f345ab563c2 /sound/soc/fsl/fsl_dsp_proxy.c | |
parent | 5ae911fd64fb27e97fd95b0e5f4813a4b2546e2f (diff) |
MLK-24501-5 dsp: add lpa pcm support.
Use reserved memory as PCM mode need more memory.
Use ping-pong buffer for PCM LPA playback to avoid underrun.
Signed-off-by: Bing Song <bing.song@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dsp_proxy.c')
-rw-r--r-- | sound/soc/fsl/fsl_dsp_proxy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_dsp_proxy.c b/sound/soc/fsl/fsl_dsp_proxy.c index 84271e0a17a5..73e6e4cb6147 100644 --- a/sound/soc/fsl/fsl_dsp_proxy.c +++ b/sound/soc/fsl/fsl_dsp_proxy.c @@ -288,6 +288,9 @@ u32 xf_proxy_b2a(struct xf_proxy *proxy, void *b) else if ((u32)(b - dsp_priv->scratch_buf_virt) < dsp_priv->scratch_buf_size) return (u32)(b - dsp_priv->scratch_buf_virt); + else if (dsp_priv->dsp_is_lpa && ((u32)(b - dsp_priv->dram_reserved_vir_addr) < + dsp_priv->dram_reserved_size)) + return (u32)(b - dsp_priv->dram_reserved_vir_addr + dsp_priv->scratch_buf_size); else return XF_PROXY_BADADDR; } @@ -300,6 +303,8 @@ void *xf_proxy_a2b(struct xf_proxy *proxy, u32 address) if (address < dsp_priv->scratch_buf_size) return dsp_priv->scratch_buf_virt + address; + else if (dsp_priv->dsp_is_lpa && (address < dsp_priv->scratch_buf_size + dsp_priv->dram_reserved_size)) + return dsp_priv->dram_reserved_vir_addr + address - dsp_priv->scratch_buf_size; else if (address == XF_PROXY_NULL) return NULL; else |