diff options
author | Ravi Kumar Alamanda <ralama@codeaurora.org> | 2013-11-25 10:38:40 -0800 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:09:58 -0700 |
commit | 53aea8efd3c0f9cab09125dc1e8ab46da21b0f53 (patch) | |
tree | 5f4f287bc052a01a513458a0ac0387f8aa535717 /sound/soc/soc-compress.c | |
parent | 20040e1da8d72efe6bce9d1f1a6fa2631c3707ed (diff) |
ASoC: Compress: Check and set pcm_new driver op
Check and set if pcm_new driver op is initialized by the driver.
This allows the compress offload drivers to register mixer
controls.
Change-Id: If54fa36cf19cbca7239d6e3e30455472e9a173d8
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Diffstat (limited to 'sound/soc/soc-compress.c')
-rw-r--r-- | sound/soc/soc-compress.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 12a9820feac1..748d37371af1 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -702,6 +702,14 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->compr = compr; compr->private_data = rtd; + if (platform->driver->pcm_new) { + ret = platform->driver->pcm_new(rtd); + if (ret < 0) { + pr_err("asoc: compress pcm constructor failed\n"); + goto compr_err; + } + } + printk(KERN_INFO "compress asoc: %s <-> %s mapping ok\n", codec_dai->name, cpu_dai->name); return ret; |