Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20df5529 authored by Ravi Kumar Alamanda's avatar Ravi Kumar Alamanda Committed by Banajit Goswami
Browse files

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: default avatarRavi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent 7ffe84e1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -728,6 +728,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;