mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
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> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
a70116e190
commit
45b5e1f757
1 changed files with 13 additions and 1 deletions
|
|
@ -959,9 +959,21 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
|
|||
|
||||
rtd->compr = compr;
|
||||
compr->private_data = rtd;
|
||||
|
||||
#ifdef CONFIG_AUDIO_QGKI
|
||||
for_each_rtdcom(rtd, rtdcom) {
|
||||
component = rtdcom->component;
|
||||
|
||||
if (component->driver->pcm_new) {
|
||||
ret = component->driver->pcm_new(rtd);
|
||||
if (ret < 0) {
|
||||
pr_err("asoc: compress pcm constructor failed\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
dev_dbg(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n",
|
||||
codec_dai->name, cpu_dai->name);
|
||||
codec_dai->name, cpu_dai->name);
|
||||
#else
|
||||
dev_info(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n",
|
||||
codec_dai->name, cpu_dai->name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue