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

Commit 2bb0a2d2 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: Compress: Check and set pcm_new driver op"

parents 0d8ec305 7ffe0db0
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -982,8 +982,21 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
	rtd->compr = compr;
	compr->private_data = rtd;

	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");
				goto compr_err;
			}
		}
	}

	dev_info(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n",
		 codec_dai->name, cpu_dai->name);

	return ret;

compr_err: