summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorGe Lei <b42127@freescale.com>2012-11-15 14:58:33 +0800
committerChen Liangjun <b36089@freescale.com>2012-11-15 17:19:17 +0800
commitd878a76a445ba49ba28b960175f7c5123170f7e1 (patch)
treefe2497f1a8f52e4401a37c193d436e2a798a47d8 /sound
parent83da6a52d9907ebd4898f5e9fe1071bfd064158f (diff)
ENGR00233570-3 ASRC: Use function pointer to support ASRC loadable
In ASoC ESAI machine driver, use ASRC ops instead of directly use ASRC function calling, so that it can support ASRC loadable. Signed-off-by: Ge Lei <b42127@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-cs42888.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/imx/imx-cs42888.c b/sound/soc/imx/imx-cs42888.c
index acec900618b1..62d221fb3908 100644
--- a/sound/soc/imx/imx-cs42888.c
+++ b/sound/soc/imx/imx-cs42888.c
@@ -82,7 +82,8 @@ static int config_asrc(struct snd_pcm_substream *substream,
if ((channel != 2) && (channel != 4) && (channel != 6))
return -EINVAL;
- ret = asrc_req_pair(channel, &iprtd->asrc_index);
+ ret = iprtd->asrc_pcm_p2p_ops_ko->
+ asrc_p2p_req_pair(channel, &iprtd->asrc_index);
if (ret < 0) {
pr_err("Fail to request asrc pair\n");
return -EINVAL;
@@ -97,7 +98,7 @@ static int config_asrc(struct snd_pcm_substream *substream,
config.inclk = INCLK_NONE;
config.outclk = OUTCLK_ESAI_TX;
- ret = asrc_config_pair(&config);
+ ret = iprtd->asrc_pcm_p2p_ops_ko->asrc_p2p_config_pair(&config);
if (ret < 0) {
pr_err("Fail to config asrc\n");
return ret;
@@ -142,8 +143,11 @@ static int imx_3stack_surround_hw_free(struct snd_pcm_substream *substream)
if (iprtd->asrc_enable) {
if (iprtd->asrc_index != -1) {
- asrc_release_pair(iprtd->asrc_index);
- asrc_finish_conv(iprtd->asrc_index);
+ iprtd->asrc_pcm_p2p_ops_ko->
+ asrc_p2p_release_pair(
+ iprtd->asrc_index);
+ iprtd->asrc_pcm_p2p_ops_ko->
+ asrc_p2p_finish_conv(iprtd->asrc_index);
}
iprtd->asrc_index = -1;
}