tegra-alt: Jetson-E/CV: Update DMIC DAI params
Viswanath L [Mon, 31 Aug 2015 12:46:21 +0000 (17:46 +0530)]
Update DAI params for "spdif-dit-2" (DMIC) so that DMIC driver
receives correct PCM configuration

Bug 200135303
Bug 200078772

Change-Id: Id65fea270483cff0953ad75f5d1e2142f508631f
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
(cherry picked from commit af71a7ce59de6b2fa59cb886e586d66a24720d4f)
Reviewed-on: http://git-master/r/794222
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

sound/soc/tegra-alt/tegra_t210ref_mobile_alt.c
sound/soc/tegra-alt/tegra_t210ref_mobile_rt565x_alt.c

index 8148aeb..7ae0cb3 100644 (file)
@@ -293,6 +293,17 @@ static int tegra_t210ref_dai_init(struct snd_soc_pcm_runtime *rtd,
                }
        }
 
+       idx = tegra_machine_get_codec_dai_link_idx("spdif-dit-2");
+       if (idx != -EINVAL) {
+               dai_params =
+               (struct snd_soc_pcm_stream *)card->rtd[idx].dai_link->params;
+
+               /* update link_param to update hw_param for DAPM */
+               dai_params->rate_min = rate;
+               dai_params->channels_min = channels;
+               dai_params->formats = formats;
+       }
+
        idx = tegra_machine_get_codec_dai_link_idx("spdif-dit-3");
        if (idx != -EINVAL) {
                dai_params =
index a401b1c..b2a94fe 100644 (file)
@@ -300,6 +300,17 @@ static int tegra_t210ref_dai_init(struct snd_soc_pcm_runtime *rtd,
                }
        }
 
+       idx = tegra_machine_get_codec_dai_link_idx("spdif-dit-2");
+       if (idx != -EINVAL) {
+               dai_params =
+               (struct snd_soc_pcm_stream *)card->rtd[idx].dai_link->params;
+
+               /* update link_param to update hw_param for DAPM */
+               dai_params->rate_min = rate;
+               dai_params->channels_min = channels;
+               dai_params->formats = formats;
+       }
+
        idx = tegra_machine_get_codec_dai_link_idx("spdif-dit-3");
        if (idx != -EINVAL) {
                dai_params =