mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
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: Vignesh Kulothungan <vigneshk@codeaurora.org>
This commit is contained in:
parent
527070fcf2
commit
764b2d2e8e
1 changed files with 16 additions and 13 deletions
|
|
@ -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,18 +1624,21 @@ 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) {
|
||||
fe_id = rtd->dai_link->id;
|
||||
pdata = (struct msm_plat_data *)
|
||||
dev_get_drvdata(component->dev);
|
||||
chmixer_pspd = pdata ?
|
||||
pdata->chmixer_pspd[fe_id][SESSION_TYPE_RX] : NULL;
|
||||
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);
|
||||
chmixer_pspd = pdata ?
|
||||
pdata->chmixer_pspd[fe_id][SESSION_TYPE_RX] : NULL;
|
||||
|
||||
if (chmixer_pspd && chmixer_pspd->enable) {
|
||||
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V8; i++)
|
||||
chmixer_pspd->in_ch_map[i] = prtd->channel_map[i];
|
||||
chmixer_pspd->override_in_ch_map = true;
|
||||
msm_pcm_routing_set_channel_mixer_cfg(fe_id,
|
||||
SESSION_TYPE_RX, chmixer_pspd);
|
||||
if (chmixer_pspd && chmixer_pspd->enable) {
|
||||
for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL_V8; i++)
|
||||
chmixer_pspd->in_ch_map[i] = prtd->channel_map[i];
|
||||
chmixer_pspd->override_in_ch_map = true;
|
||||
msm_pcm_routing_set_channel_mixer_cfg(fe_id,
|
||||
SESSION_TYPE_RX, chmixer_pspd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue