From d54626ee0e764256f2a57d363b70a456352ac825 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 13 Nov 2017 12:46:22 +0000 Subject: [PATCH] ASoC: tegra-alt: Add support for I2S5 I2S5 is not enable for Jetson-TX1 although the interface is available on 30-pin header J26. Enable suppot for this interface so that it can be tested. Bug 2020869 Change-Id: I87fe177d2139fe94098cb02fadb490e2080dbb6c Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/1597135 (cherry picked from commit 8d5dc2df30835ecd3efec606c5f3e2d8ecec3d1a) Reviewed-on: https://git-master.nvidia.com/r/1601696 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- .../machine_drivers/tegra_machine_driver_mobile.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c index 894ed69f..b749b7d8 100644 --- a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c +++ b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c @@ -284,6 +284,7 @@ static const struct snd_soc_dapm_widget tegra_machine_dapm_widgets[] = { SND_SOC_DAPM_SPK("d1 Headphone", NULL), SND_SOC_DAPM_SPK("d2 Headphone", NULL), + SND_SOC_DAPM_HP("w Headphone", NULL), SND_SOC_DAPM_HP("x Headphone", NULL), SND_SOC_DAPM_HP("y Headphone", NULL), SND_SOC_DAPM_HP("z Headphone", NULL), @@ -293,6 +294,7 @@ static const struct snd_soc_dapm_widget tegra_machine_dapm_widgets[] = { SND_SOC_DAPM_HP("s Headphone", NULL), SND_SOC_DAPM_MIC("Int Mic", NULL), + SND_SOC_DAPM_MIC("w Mic", NULL), SND_SOC_DAPM_MIC("x Mic", NULL), SND_SOC_DAPM_MIC("y Mic", NULL), SND_SOC_DAPM_MIC("z Mic", NULL), @@ -764,6 +766,17 @@ static int tegra_machine_dai_init(struct snd_soc_pcm_runtime *runtime, dai_params->rate_min = clk_rate; } + rtd = snd_soc_get_pcm_runtime(card, "spdif-dit-5"); + if (rtd) { + dai_params = + (struct snd_soc_pcm_stream *)rtd->dai_link->params; + + /* update link_param to update hw_param for DAPM */ + dai_params->rate_min = clk_rate; + dai_params->channels_min = channels; + dai_params->formats = formats; + } + rtd = snd_soc_get_pcm_runtime(card, "dspk-playback-r"); if (rtd) { dai_params =