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

Commit 764b2d2e authored by Vignesh Kulothungan's avatar Vignesh Kulothungan Committed by Gerrit - the friendly Code Review server
Browse files

asoc: pcm: modify component extraction



Component for channel map mixer control should be
extracted from pcm runtime instead of kcontrol's private data,
because kcontrol's private data in this case points to channel
map info.

CRs-Fixed: 2420279
Change-Id: Ibaeac4739b73a89d17f16cbacb1b5095d546968b
Signed-off-by: default avatarVignesh Kulothungan <vigneshk@codeaurora.org>
parent 527070fc
Loading
Loading
Loading
Loading
+16 −13
Original line number Diff line number Diff line
@@ -1604,7 +1604,7 @@ static int msm_pcm_chmap_ctl_put(struct snd_kcontrol *kcontrol,
	struct snd_soc_pcm_runtime *rtd = NULL;
	struct msm_plat_data *pdata = NULL;
	struct msm_pcm_channel_mixer *chmixer_pspd = NULL;
	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
	struct snd_soc_component *component = NULL;
	u64 fe_id = 0;

	pr_debug("%s", __func__);
@@ -1624,6 +1624,8 @@ static int msm_pcm_chmap_ctl_put(struct snd_kcontrol *kcontrol,
		/* update chmixer_pspd chmap cached with routing driver as well */
		rtd = substream->private_data;
		if (rtd) {
			component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
			if (component) {
				fe_id = rtd->dai_link->id;
				pdata = (struct msm_plat_data *)
						dev_get_drvdata(component->dev);
@@ -1639,6 +1641,7 @@ static int msm_pcm_chmap_ctl_put(struct snd_kcontrol *kcontrol,
				}
			}
		}
	}
	return 0;
}