diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2014-09-09 17:21:25 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-23 16:57:30 +0300 |
commit | c2054b7bdbd8782b81fe54aae9db2fdd9843b691 (patch) | |
tree | 962b4edae8ff8c15f9516364a4c617eb4db6a0eb /sound/soc/fsl/fsl_asrc.c | |
parent | 45af4f543eb754b03edd33f1fbe4e8efc25d2c9a (diff) |
MLK-11398: ASoC: fsl_asrc: Add Memory to Memory support
cherry-pick below patch from v3.14.y:
ENGR00330403-4: ASoC: fsl_asrc: Add Memory to Memory support
ASRC M2M function is not able to put upstream due to its self-designed
ioctl protocol. So I just make a single patch for it and make it merge
into P2P driver as simply as possible.
The patch can only be maintained internally unless some one designs a
new protocol or implement the originally protocol by using some common
approach provided by Linux Kernel.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit b5a7a98da076b0202334db01ecc3833342a7ca11)
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.c')
-rw-r--r-- | sound/soc/fsl/fsl_asrc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 1d82f68305c3..9d95ca126c56 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -729,6 +729,8 @@ static const struct regmap_config fsl_asrc_regmap_config = { .cache_type = REGCACHE_FLAT, }; +#include "fsl_asrc_m2m.c" + /** * Initialize ASRC registers with a default configurations */ @@ -933,6 +935,12 @@ static int fsl_asrc_probe(struct platform_device *pdev) return ret; } + ret = fsl_asrc_m2m_init(asrc_priv); + if (ret) { + dev_err(&pdev->dev, "failed to init m2m device %d\n", ret); + return ret; + } + return 0; } @@ -994,6 +1002,8 @@ static int fsl_asrc_suspend(struct device *dev) { struct fsl_asrc *asrc_priv = dev_get_drvdata(dev); + fsl_asrc_m2m_suspend(asrc_priv); + regmap_read(asrc_priv->regmap, REG_ASRCFG, &asrc_priv->regcache_cfg); @@ -1043,6 +1053,7 @@ MODULE_DEVICE_TABLE(of, fsl_asrc_ids); static struct platform_driver fsl_asrc_driver = { .probe = fsl_asrc_probe, + .remove = fsl_asrc_m2m_remove, .driver = { .name = "fsl-asrc", .of_match_table = fsl_asrc_ids, |